Changeset 5839


Ignore:
Timestamp:
Feb 25, 2020, 9:34:29 AM (22 months ago)
Author:
Nicklas Nordborg
Message:

References #1218: Implement MIPs alignment

Re-designed the post-processing steps: re-header, split and mark duplicates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/MipsAlignJobCreator.java

    r5837 r5839  
    297297      script.cmd("TrimOptionsQual=\""+align_trimmomaticOptions2+"\"");
    298298      script.cmd("NovoAlignOptions=\""+novoalign_options+"\"");
     299      script.cmd("MarkDuplicatesOptions=\""+mark_duplicate_options+"\"");
    299300     
    300301      script.newLine();
     
    375376      script.cmd("merge_bam");
    376377      script.newLine();
    377      
    378       /*
    379       script.comment("Re-header BAM files");
    380       script.cmd("${samtools} view -H bam.merged/novo.bam | grep -v \"^@SQ\" > header.sam");
    381       script.cmd("grep \"^@SQ\" ${GenomeDict} >> header.sam");
    382       script.cmd("${samtools} reheader -P header.sam bam.merged/novo.bam > bam.merged/novo_reheaded.bam");
    383       script.newLine();
    384 
    385       script.comment("Separate concordant, discordant and unmapped read pairs");
    386       script.cmd("${samtools} view -b -h -@ 2 -f 3 bam.merged/novo_reheaded.bam > bam.merged/concordant.bam");
    387       script.cmd("${samtools} view -b -h -@ 2 -G 12 -F 2 bam.merged/novo_reheaded.bam > bam.merged/discordant.bam");
    388       script.cmd("${samtools} view -b -h -@ 2 -f 12 bam.merged/novo_reheaded.bam > bam.merged/unmapped.bam");
    389      
    390       script.comment("Picard UmiAwareMarkDuplicatesWithMateCigar");
    391       String markDupCmd = "./stdwrap.sh ./picard2 UmiAwareMarkDuplicatesWithMateCigar";
    392       markDupCmd += " " + mark_duplicate_options;
    393       markDupCmd += " -UMI_METRICS bam.final/concordant.umi_metrics.txt";
    394       markDupCmd += " -METRICS_FILE bam.final/concordant.dedup_metrics.txt";
    395       markDupCmd += " -INPUT bam.merged/concordant.bam";
    396       markDupCmd += " -OUTPUT bam.final/concordant.bam";
    397       markDupCmd += " >> markduplicates.out";
    398       script.cmd(markDupCmd);
    399      
    400       markDupCmd = "./stdwrap.sh ./picard2 UmiAwareMarkDuplicatesWithMateCigar";
    401       markDupCmd += " " + mark_duplicate_options;
    402       markDupCmd += " -UMI_METRICS bam.final/discordant.umi_metrics.txt";
    403       markDupCmd += " -METRICS_FILE bam.final/discordant.dedup_metrics.txt";
    404       markDupCmd += " -INPUT bam.merged/discordant.bam";
    405       markDupCmd += " -OUTPUT bam.final/discordant.bam";
    406       markDupCmd += " >> markduplicates.out";
    407       script.cmd(markDupCmd);
    408       */
     378
     379      script.comment("Re-header BAM file");
     380      script.progress(70, "Post-processing aligned BAM file");
     381      script.cmd("reheader_bam");
     382      script.newLine();
     383     
     384      script.comment("Split BAM file into concordant, discordant and unmapped");
     385      script.cmd("split_bam");
     386      script.newLine();
     387
     388      script.comment("Mark duplicates");
     389      script.progress(80, "Marking duplicates");
     390      script.cmd("mark_duplicates \"concordant\"");
     391      script.cmd("mark_duplicates \"discordant\"");
     392      script.newLine();
     393
    409394      /*
    410395      script.progress(95, "Copying result files to project archive");
Note: See TracChangeset for help on using the changeset viewer.