Changeset 5829


Ignore:
Timestamp:
Feb 19, 2020, 3:21:30 PM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #1218: Implement MIPs alignment

Added AnnotateBamWithUmis step.

Location:
extensions/net.sf.basedb.reggie/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/config/reggie-config.xml

    r5827 r5829  
    198198          <path>/usr/local/packages/snpeff/4.3s/SnpSift.jar</path>
    199199        </snpsift>
     200        <fgbio>
     201          <!-- full path to the fgbio.jar file (required) -->
     202          <path>/usr/local/packages/fgbio/0.8.1/fgbio.jar</path>
     203        </fgbio>
    200204      </programs>
    201205     
     
    335339        </trimmomatic>
    336340       
     341       
    337342      </align-mips>
    338343     
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/MipsAlignJobCreator.java

    r5828 r5829  
    143143    }
    144144    String picard_path = cfg.getRequiredConfig("programs/picard/path", alignParameterSet);
     145    String fgbio_path = cfg.getRequiredConfig("programs/fgbio/path", alignParameterSet);
    145146
    146147    // Options for the programs
     
    258259      script.cmd("JAVA="+java_path);
    259260      script.cmd("TrimmomaticJAR="+trimmomatic_path);
     261      script.cmd("FgBioJAR="+fgbio_path);
    260262      script.cmd("ArchiveRoot="+archiveRoot);
    261263      script.cmd("FastqFolder=${ArchiveRoot}"+fastQFolder);
     
    281283      script.cmd("mkdir trimmomatic.2");
    282284      script.cmd("mkdir bam.1");
     285      script.cmd("mkdir bam.2");
    283286      script.cmd("cp ${ScriptDir}/stdwrap.sh .");
    284287      script.cmd("cp ${ScriptDir}/mips_adapters.sh .");
     
    337340      script.cmd("done");
    338341     
    339       script.comment("Run Picard FastqToSam");
     342      script.comment("Run Picard FastqToSam and annotat the BAM files with UMI");
    340343      script.cmd("for prefix in ${FastqPrefix[@]} ; do");
    341344      // Picard2 uses different parameter syntax, but the .rg file is stored in picard1 syntax
    342345      script.cmd("   rg_info=`./convert_picard_parameters.sh < fastq/${prefix}.rg`");
    343346
    344       String toSamCmd = "./stdwrap.sh ./picard2 FastqToSam";
    345       toSamCmd += " -SORT_ORDER queryname";
    346       toSamCmd += " -QUALITY_FORMAT Standard";
    347       toSamCmd += " ${rg_info}";
    348       toSamCmd += " -FASTQ trimmomatic.2/${prefix}_R1.fastq";
    349       toSamCmd += " -FASTQ2 trimmomatic.2/${prefix}_R2.fastq";
    350       toSamCmd += " -OUTPUT bam.1/${prefix}.bam";
    351       toSamCmd += " >> fastqtosam.out";
    352       script.cmd("   " + toSamCmd);
     347      String toBamCmd = "./stdwrap.sh ./picard2 FastqToSam";
     348      toBamCmd += " -SORT_ORDER queryname";
     349      toBamCmd += " -QUALITY_FORMAT Standard";
     350      toBamCmd += " ${rg_info}";
     351      toBamCmd += " -FASTQ trimmomatic.2/${prefix}_R1.fastq";
     352      toBamCmd += " -FASTQ2 trimmomatic.2/${prefix}_R2.fastq";
     353      toBamCmd += " -OUTPUT bam.1/${prefix}.bam";
     354      toBamCmd += " >> fastqtosam.out";
     355     
     356      String umiCmd = "./stdwrap.sh ${JAVA} -jar ${FgBioJAR} AnnotateBamWithUmis";
     357      umiCmd += " --fail-fast true -t RX";
     358      umiCmd += " -i bam.1/${prefix}.bam";
     359      umiCmd += " -f fastq/${prefix}_UMI.fastq.gz";
     360      umiCmd += " -o bam.2/${prefix}.bam";
     361      umiCmd += " >> annotatebam.out";
     362     
     363      script.cmd("   " + toBamCmd);
     364      script.cmd("   " + umiCmd);
    353365      script.cmd("done");
    354366      /*
Note: See TracChangeset for help on using the changeset viewer.