Changeset 2553


Ignore:
Timestamp:
Aug 5, 2014, 9:39:11 AM (7 years ago)
Author:
Nicklas Nordborg
Message:

References #614: Improve error handling when executing jobs on the cluster

Started to incorporate alignment step into main script. The call to to tophat seems to be working, but there are several additional steps from the tophat_single.sh script that remains.

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

Legend:

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

    r2552 r2553  
    8787      <reference-gidx>scanb/hg19_1-22_XM_extra_b37_Y_decoy.bt2/hg19_1-22_XM_extra_b37_Y_decoy</reference-gidx>
    8888      <reference-tidx>scanb/UCSC_Human_hg19_knownGenes_GTF_appended_10sep2012v209.bt2/knownGenes</reference-tidx>
     89      <!-- static options for tophat -->
     90      <options>--library-type fr-firststrand --keep-fasta-order --no-coverage-search</options>
    8991    </tophat>
    9092  </host>
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/MaskAlignServlet.java

    r2552 r2553  
    292292        String tophat_tidx = cluster.getRequiredConfig("tophat/reference-tidx");
    293293        String tophat_gidx = cluster.getRequiredConfig("tophat/reference-gidx");
    294        
     294        String tophat_options = cluster.getConfig("tophat/options", "");
     295     
    295296        // Load common items
    296297        ItemSubtype maskedType = Subtype.MASKED_SEQUENCES.get(dc);
     
    368369          script.cmd("mkdir -p " + tmpFolder);
    369370          script.cmd("cd " + tmpFolder);
    370           script.cmd("cp ${ScriptDir}/tophat_single.sh .");
    371371          script.cmd("cp ${ScriptDir}/picard .");
    372372          script.cmd("cp ${ScriptDir}/statistics_tophat.sh .");
     
    381381          script.cmd("fi");
    382382          script.cmd("mkdir fastq");
    383           script.cmd("mkdir fastq.masked");
    384383          script.cmd("cp " + projectRoot + "/" + fastQFolder + "/*.fastq.gz fastq");
    385384          script.newLine();
     
    392391          script.comment("Run Bowtie2");
    393392          script.progress(20, "Running Bowtie2");
    394          
     393          script.cmd("mkdir fastq.masked");
    395394          String maskCmd = "./stdwrap.sh bowtie2";
    396395          maskCmd += " -p ${NumThreads}";
     
    401400          maskCmd += " -2 ${FASTQ2}";
    402401          maskCmd += " -S /dev/null";
    403           maskCmd += " >> " + jobFolder + "/masked.out";
     402          maskCmd += " > " + jobFolder + "/masked.out";
    404403          script.cmd(maskCmd);
    405404          script.newLine();
     
    407406          script.comment("Run tophat");
    408407          script.progress(40, "Running tophat");
    409           script.cmd("R1=`find fastq.masked -name \"*_R1.fastq.gz\" -print -quit 2> /dev/null`");
    410          
    411           script.cmd("./tophat_single.sh ${R1} " + ca_size + " " + FlowCellSampleSheetExporter.DEFAULT_LIBRARY_WIDTH + " >& tophat.out");
    412           script.newLine();
     408          script.cmd("mkdir fastq.masked.tophat");
     409         
     410          String tophatCmd = "./stdwrap.sh tophat";
     411          tophatCmd += " -p ${NumThreads}";
     412          tophatCmd += " -o fastq.masked.tophat";
     413          tophatCmd += " --mate-inner-dist " + ca_size;
     414          tophatCmd += " --mate-std-dev " + FlowCellSampleSheetExporter.DEFAULT_LIBRARY_WIDTH;
     415          tophatCmd += " --transcriptome-index ${Tidx}";
     416          tophatCmd += " " + tophat_options;
     417          tophatCmd += " ${Gidx}";
     418          tophatCmd += " fastq.masked/R1.fastq.gz";
     419          tophatCmd += " fastq.masked/R2.fastq.gz";
     420          tophatCmd += " > " + jobFolder + "/tophat.out";
     421          script.cmd(tophatCmd);
     422          script.newLine();
     423         
     424          // TODO - other scripts from tophat_single.sh script
    413425
    414426          script.comment("Run alignment analysis");
Note: See TracChangeset for help on using the changeset viewer.