Changeset 6001


Ignore:
Timestamp:
Sep 11, 2020, 11:25:42 AM (12 months ago)
Author:
Nicklas Nordborg
Message:

References #1266: Run prepDE.py in the StringTie? pipeline

Now implemented in the script. We use the alignement name (with external specimen id) as SAMPLEID. Output is stored in gene_count.csv and transcript_count.csv.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/branches/4.27-stable/src/net/sf/basedb/reggie/grid/StringTieJobCreator.java

    r5930 r6001  
    2828import net.sf.basedb.core.Protocol;
    2929import net.sf.basedb.core.RawBioAssay;
     30import net.sf.basedb.core.Sample;
    3031import net.sf.basedb.core.SessionControl;
    3132import net.sf.basedb.core.Software;
     
    171172    String pipeline_scripts_path = cfg.getRequiredConfig("programs/pipeline-scripts/path", null);
    172173    String stringtie_path = cfg.getRequiredConfig("programs/stringtie/path", parameterSet);
     174    String prepde_path = stringtie_path.substring(0, stringtie_path.lastIndexOf('/'))+"/prepDE.py";
    173175
    174176    // Options for the programs
     
    202204     
    203205      Library lib = Library.get(aligned.getExtract());
     206      Sample specimen =  (Sample)lib.findSingleParent(dc, Subtype.SPECIMEN);
    204207      boolean isExternal = Reggie.isExternalItem(aligned.getName());
    205208      String archiveRoot = isExternal ? externalRoot : projectRoot;
    206209      String bamFolder = (String)Annotationtype.DATA_FILES_FOLDER.getAnnotationValue(dc, aligned);
    207210      File bamFile = Datafiletype.BAM.getFile(dc, aligned);
     211     
     212      String alignedName = ScriptUtil.checkValidScriptParameter(aligned.getName());
     213      if (specimen != null && specimen.getExternalId() != null)
     214      {
     215        // Replace SCANB-ID in alignedName with Sample.externalId
     216        alignedName = alignedName.replace(specimen.getName(), specimen.getExternalId());
     217      }
    208218     
    209219      // Create job
     
    289299      stringTieCmd += " bam/alignment.bam";
    290300      script.cmd(stringTieCmd + " > stringtie/stringtie.out");
     301      script.newLine();
     302     
     303      script.comment("Run prepDE");
     304      script.progress(90, "Running prepDE");
     305      String prepDECmd = prepde_path;
     306      prepDECmd += " -i input.lst";
     307//      prepDECmd += " -l " + readLength; TODO!!
     308      prepDECmd += " -g stringtie/gene_count.csv";
     309      prepDECmd += " -t stringtie/transcript_count.csv";
     310      script.cmd("echo " + alignedName + " ./stringtie/transcript.gtf > input.lst");
     311      script.cmd(prepDECmd + " > stringtie/prepde.out");
    291312      script.newLine();
    292313
Note: See TracChangeset for help on using the changeset viewer.