Changeset 2552


Ignore:
Timestamp:
Aug 5, 2014, 8:12:37 AM (7 years ago)
Author:
Nicklas Nordborg
Message:

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

Got rid of the problematic PE_filter.sh script for running bowtie. The servlet now generate an equivalent call to bowtie, but output files are named a bit differently so the tophat step follwing is not currently working.

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

Legend:

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

    r2497 r2552  
    7070
    7171    <pe-filter>
     72      <!-- static options for bowtie -->
     73      <bowtie-options>-q --fr -k 1 --phred33 -t --local</bowtie-options>
     74
    7275      <!-- parallel environment option to the queue system -->
    7376      <!-- the default setting use all slots on hosts with at least 8 slots available -->
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/MaskAlignServlet.java

    r2535 r2552  
    288288        String pefilter_referenceName = cluster.getRequiredConfig("pe-filter/reference-name");
    289289        String pefilter_parallel_environment = cluster.getConfig("pe-filter/parallel-environment", "smp 8-");
     290        String pefilter_bowtie_options = cluster.getConfig("pe-filter/bowtie-options", "");
    290291
    291292        String tophat_tidx = cluster.getRequiredConfig("tophat/reference-tidx");
     
    355356          script.newLine();
    356357          script.comment("Setting up scripting environment and copying script to tmp folder");
    357           script.cmd("export ScriptDir=" + cluster.getScriptFolder());
    358           script.cmd("export ReferenceDir=" + referenceRoot);
    359           script.cmd("export RMidx=${ReferenceDir}/" + pefilter_referenceName);
     358          script.cmd("ScriptDir=" + cluster.getScriptFolder());
     359          script.cmd("ReferenceDir=" + referenceRoot);
     360          script.cmd("RMidx=${ReferenceDir}/" + pefilter_referenceName);
    360361          script.cmd("export Gidx=${ReferenceDir}/" + tophat_gidx);
    361362          script.cmd("export Tidx=${ReferenceDir}/" + tophat_tidx);
    362363          script.cmd("export TransferDir="+projectRoot+"/" + projectName);
    363364          script.cmd("export TophatDir="+tophatFolder);
    364           script.newLine();
     365          script.cmd("NumThreads=`nproc`");
     366          script.newLine();
     367         
    365368          script.cmd("mkdir -p " + tmpFolder);
    366369          script.cmd("cd " + tmpFolder);
    367           script.cmd("cp ${ScriptDir}/PE_filter.sh .");
    368370          script.cmd("cp ${ScriptDir}/tophat_single.sh .");
    369371          script.cmd("cp ${ScriptDir}/picard .");
     
    371373          script.cmd("cp ${ScriptDir}/sync_resultfiles.sh .");
    372374          script.newLine();
     375         
    373376          script.comment("Copy FASTQ files to tmp folder");
    374377          script.progress(10, "Copying FASTQ files");
     
    378381          script.cmd("fi");
    379382          script.cmd("mkdir fastq");
     383          script.cmd("mkdir fastq.masked");
    380384          script.cmd("cp " + projectRoot + "/" + fastQFolder + "/*.fastq.gz fastq");
     385          script.newLine();
     386
    381387          script.comment("Find FASTQ files");
    382           script.cmd("find fastq -name \"*_R1.fastq.gz\" > fastq.list");
    383           script.comment("Run PE_filter script");
    384           script.progress(20, "Running PE_filter");
    385          
    386           script.cmd("./PE_filter.sh < fastq.list >& filter.out");
    387           script.comment("Copy filter information back to job folder for importing into BASE");
    388           script.cmd("cp fastq.masked/*.out " + jobFolder + "/masked.out");
     388          script.cmd("FASTQ1=`find fastq -name \"*_R1.fastq.gz\" -print -quit 2> /dev/null`");
     389          script.cmd("FASTQ2=`find fastq -name \"*_R2.fastq.gz\" -print -quit 2> /dev/null`");
     390          script.newLine();
     391
     392          script.comment("Run Bowtie2");
     393          script.progress(20, "Running Bowtie2");
     394         
     395          String maskCmd = "./stdwrap.sh bowtie2";
     396          maskCmd += " -p ${NumThreads}";
     397          maskCmd += " " + pefilter_bowtie_options;
     398            maskCmd += " --un-conc-gz fastq.masked/R%.fastq.gz";
     399          maskCmd += " -x ${RMidx}";
     400          maskCmd += " -1 ${FASTQ1}";
     401          maskCmd += " -2 ${FASTQ2}";
     402          maskCmd += " -S /dev/null";
     403          maskCmd += " >> " + jobFolder + "/masked.out";
     404          script.cmd(maskCmd);
    389405          script.newLine();
    390406
Note: See TracChangeset for help on using the changeset viewer.