Changeset 5795


Ignore:
Timestamp:
Dec 16, 2019, 2:33:10 PM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #1215: Include mutation signature analysis in the variant calling pipeline

Implemented a step in the variant calling pipeline for calling the mutation_signature.R script.

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

Legend:

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

    r5762 r5795  
    371371        <!-- static options for the SnpSift command (required) -->
    372372        <snpsift-options>-s ${BaseDir}/rna_chr_set.txt -s ${BaseDir}/intogen-BRCA-genes-list_patch.txt -e ${BaseDir}/filter_expression.txt</snpsift-options>
     373       
     374        <!-- path to the COSMIC mutation signature data -->
     375        <mutation-signature>${BaseDir}/COSMIC_Cancer_signatures_probabilities.RData</mutation-signature>
    373376      </variant-call>
    374377     
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/VariantCallingJobCreator.java

    r5794 r5795  
    202202    String snpeff_options = cfg.getRequiredConfig("variant-call/snpeff-options", parameterSet);
    203203    String snpsift_options = cfg.getRequiredConfig("variant-call/snpsift-options", parameterSet);
     204    String cosmic_signatures_path = cfg.getRequiredConfig("variant-call/mutation-signature", parameterSet);
    204205
    205206    // Selected items must be removed from this list
     
    246247     
    247248      String libName = ScriptUtil.checkValidScriptParameter(lib.getName());
    248       // Remove all after the first dot not followed by a number
    249249      if (specimen != null && specimen.getExternalId() != null)
    250250      {
     
    351351      script.cmd("cp ${ScriptDir}/gc_stat.toml .");
    352352      script.cmd("cp ${ScriptDir}/g5_dist.toml .");
     353      script.cmd("cp ${ScriptDir}/mutation_signature.R .");
    353354      script.cmd("mkdir bam");
    354355      script.cmd("mkdir mosdepth");
     
    474475        script.cmd(snpSiftCmd);
    475476        script.newLine();
     477
     478        // 'grep' to find number of variants The ' || true' is critical since 'grep' will exit with code 1 if there are no matches
     479        script.cmd("NUMFILTERED=`grep -c -v '^#' resultsfilter/variants-filtered.vcf || true`");
     480        script.cmd("if [ $NUMFILTERED -gt 0 ]; then");
     481        String mutSignCmd = "./mutation_signature.R";
     482        mutSignCmd += " " + libName;
     483        mutSignCmd += " resultsfilter/variants-filtered.vcf";
     484        mutSignCmd += " " + cosmic_signatures_path;
     485        mutSignCmd += " resultsfilter/mutation_signature.pdf";
     486        mutSignCmd += " > resultsfilter/mutation_signature.txt";
     487        script.cmd(mutSignCmd);
     488        script.newLine();
     489        script.cmd("fi");
     490       
    476491        script.cmd("else");
    477492        script.cmd("  cat tmp/variants-raw-2.vcf | bgzip -c > resultsfilter/variants-annotated.vcf.gz");
Note: See TracChangeset for help on using the changeset viewer.