Changeset 5936


Ignore:
Timestamp:
May 14, 2020, 1:20:19 PM (3 weeks ago)
Author:
Nicklas Nordborg
Message:

Fixes #1245: Picard demux should output compressed fastq files

File:
1 edited

Legend:

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

    r5930 r5936  
    152152    String demux_trimmomaticOptions2 = cfg.getRequiredConfig("demux/trimmomatic-options/step-2", mergeParameterSet);
    153153    String pigzOptions = cfg.getConfig("demux/pigz-options", mergeParameterSet, "-5");
     154    boolean compressOutputs = true; // Config option??
    154155   
    155156    // We need all possible barcodes to create the
     
    307308          fastqCmd += " -NUM_PROCESSORS ${NumThreads}";
    308309          fastqCmd += " -TMP_DIR ${TMPDIR}";
     310          if (compressOutputs)
     311          {
     312            fastqCmd += " -COMPRESS_OUTPUTS";
     313          }
    309314          if (demux_fastqOptions != null)
    310315          {
     
    368373        String R1_name = baseFileName+"_R1.fastq";
    369374        String R2_name = baseFileName+"_R2.fastq";
     375        String suffix = compressOutputs ? ".gz" : "";
    370376        String SAM_name = baseFileName + ".sam";
    371377        String fragments_name = baseFileName + "_fragmentsize.txt";
     
    376382        script.cmd("echo [" + mergeName + "] >> " + filesOut);
    377383        script.cmd("echo [" + mergeName + "] >> " + fragmentsOut);
    378         script.cmd("cat fastq/" + mergeName + "_*.1.fastq > fastq.merged/"+R1_name);
    379         script.cmd("cat fastq/" + mergeName + "_*.2.fastq > fastq.merged/"+R2_name);
     384        script.cmd("cat fastq/" + mergeName + "_*.1.fastq"+suffix+" > fastq.merged/"+R1_name+suffix);
     385        script.cmd("cat fastq/" + mergeName + "_*.2.fastq"+suffix+" > fastq.merged/"+R2_name+suffix);
    380386        if (earlyCleanup)
    381387        {
     
    393399        alignCmd += " --un-conc fastq.aligned/"+mergeName+"_R%.fastq";
    394400        alignCmd += " -x ${Gidx}";
    395         alignCmd += " -1 fastq.merged/"+R1_name;
    396         alignCmd += " -2 fastq.merged/"+R2_name;
     401        alignCmd += " -1 fastq.merged/"+R1_name+suffix;
     402        alignCmd += " -2 fastq.merged/"+R2_name+suffix;
    397403        alignCmd += " -S fastq.aligned/" +  SAM_name;
    398404        alignCmd += " > fastq.aligned/" + SAM_name + ".out";
     
    406412        String trimCmd1 = "./stdwrap.sh ./trimmomatic PE";
    407413        trimCmd1 += " -threads ${NumThreads}";
    408         trimCmd1 += " fastq.merged/"+R1_name;
    409         trimCmd1 += " fastq.merged/"+R2_name;
     414        trimCmd1 += " fastq.merged/"+R1_name+suffix;
     415        trimCmd1 += " fastq.merged/"+R2_name+suffix;
    410416        trimCmd1 += " fastq.trimmomatic.1/"+R1_name;
    411417        trimCmd1 += " fastq.trimmomatic.1/un_"+R1_name;
Note: See TracChangeset for help on using the changeset viewer.