Changeset 2556
- Timestamp:
- Aug 5, 2014, 3:58:08 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/MaskAlignServlet.java
r2555 r2556 380 380 script.cmd("cp ${ScriptDir}/stdwrap.sh ."); 381 381 script.cmd("cp ${ScriptDir}/picard ."); 382 script.cmd("cp ${ScriptDir}/ statistics_tophat.sh .");382 script.cmd("cp ${ScriptDir}/alignment_statistics.sh ."); 383 383 script.cmd("cp ${ScriptDir}/sync_resultfiles.sh ."); 384 384 script.newLine(); … … 432 432 script.newLine(); 433 433 434 script.progress( 60, "Running picard MarkDuplicates");434 script.progress(70, "Running picard MarkDuplicates"); 435 435 String picardCmd = "./picard MarkDuplicates"; 436 436 picardCmd += " INPUT=fastq.masked.tophat/accepted_hits.bam"; … … 441 441 script.cmd(picardCmd); 442 442 script.cmd("mv fastq.masked.tophat/accepted_hits.bam.tmp_picard fastq.masked.tophat/accepted_hits.bam"); 443 444 // TODO - other scripts from tophat_single.sh script 445 446 script.comment("Run alignment analysis"); 447 script.progress(80, "Running alignment analysis"); 448 script.cmd("find fastq.masked.tophat -name \"accepted_hits.bam\" > accepted.list"); 449 // TODO duplicate.sh and other scripts have hardocded paths to other scripts and folders 450 script.comment("./duplicate.sh < accepted.list >& duplicate.out"); 451 script.bkgr("./statistics_tophat.sh < accepted.list >& statistics_tophat.out"); 443 script.newLine(); 444 445 script.progress(80, "Creating BAM index"); 446 script.cmd("samtools index fastq.masked.tophat/accepted_hits.bam"); 447 script.newLine(); 448 449 script.progress(90, "Culculating alignment statistics"); 450 script.cmd("./alignment_statistics.sh fastq.masked.tophat > " + jobFolder + "/alignment_statistics.out"); 452 451 script.newLine(); 453 452 … … 456 455 script.newLine(); 457 456 458 script.progress(90, "Copying result files"); 459 script.comment("Copy filter information back to job folder for importing into BASE"); 460 script.cmd("cp fastq.masked.tophat/*_tophatstats.out " + jobFolder + "/tophatstats.out"); 461 script.newLine(); 457 script.progress(90, "Copying result files to project archive"); 462 458 script.comment("Sync result files to project archive"); 463 459 script.cmd("echo " + merged.getName() + " > sync.list"); … … 630 626 { 631 627 CmdResult masked = cluster.executeCmd(ssh, "cat " + cluster.getJobFolder() + "/" + jobStatus.getJobName() + "/masked.out", 2); 632 CmdResult tophat = cluster.executeCmd("cat " + cluster.getJobFolder() + "/" + jobStatus.getJobName() + "/tophatstats.out" , 2);633 if (masked.getExitStatus() == 0 && tophat.getExitStatus() == 0)634 { 635 long[] reads = parseMaskedAndAlignedOut(sc, job, masked.getStdout(), tophat.getStdout());628 CmdResult statistics = cluster.executeCmd("cat " + cluster.getJobFolder() + "/" + jobStatus.getJobName() + "/alignment_statistics.out" , 2); 629 if (masked.getExitStatus() == 0 && statistics.getExitStatus() == 0) 630 { 631 long[] reads = parseMaskedAndAlignedOut(sc, job, masked.getStdout(), statistics.getStdout()); 636 632 // 0 = number of reads after filter, 1 = number of reads after align 637 633 return Values.formatNumber(reads[0]/1000000f, 1) + "M reads after mask; " + Values.formatNumber(reads[1]/1000000f, 1) + "M reads after alignment"; … … 639 635 else 640 636 { 641 job.setDescription(masked.getStderr() + "\n" + tophat.getStderr());637 job.setDescription(masked.getStderr() + "\n" + statistics.getStderr()); 642 638 } 643 639 return null;
Note: See TracChangeset
for help on using the changeset viewer.