Repository 'manta'
hg clone https://toolshed.g2.bx.psu.edu/repos/artbio/manta

Changeset 5:f55d45b0c6d1 (2020-06-09)
Previous changeset 4:d09254e37c68 (2020-06-08) Next changeset 6:cb5691381acb (2023-06-08)
Commit message:
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/manta commit 86427647db100383faa432008b58e768b56ac416"
modified:
manta.xml
manta_macros.xml
test-data/candidateSV.vcf.gz
test-data/candidateSmallIndels.vcf.gz
test-data/somaticSV.vcf.gz
added:
customConfigManta.py
removed:
customized.ini
b
diff -r d09254e37c68 -r f55d45b0c6d1 customConfigManta.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/customConfigManta.py Tue Jun 09 06:23:39 2020 -0400
[
@@ -0,0 +1,80 @@
+import argparse
+
+
+def Parser():
+    the_parser = argparse.ArgumentParser()
+    the_parser.add_argument(
+        '--minCandidateVariantSize', type=int, default=8,
+        help="Run Manta reporting for all SVs/indels at or above this size")
+    the_parser.add_argument(
+        '--rnaMinCandidateVariantSize', type=int, default=1000,
+        help="Separate option (to provide different default) used for \
+              runs in RNA-mode")
+    the_parser.add_argument(
+        '--minEdgeObservations', type=int, default=3,
+        help="Remove all edges from the graph unless they're supported \
+              by this many 'observations'")
+    the_parser.add_argument(
+        '--graphNodeMaxEdgeCount', type=int, default=10,
+        help="If both nodes of an edge have an edge count higher than this, \
+              then skip evaluation of the edge")
+    the_parser.add_argument(
+        '--minCandidateSpanningCount', type=int, default=3,
+        help="Run discovery and candidate reporting for all SVs/indels with \
+              at least this many spanning support observations")
+    the_parser.add_argument(
+        '--minScoredVariantSize', type=int, default=50,
+        help="After candidate identification, only score and report \
+              SVs/indels at or above this size")
+    the_parser.add_argument(
+        '--minDiploidVariantScore', type=int, default=10,
+        help="minimum VCF QUAL score for a variant to be included in \
+              the diploid vcf")
+    the_parser.add_argument(
+        '--minPassDiploidVariantScore', type=int, default=20,
+        help="VCF QUAL score below which a variant is marked as \
+              filtered in the diploid vcf")
+    the_parser.add_argument(
+        '--minPassDiploidGTScore', type=int, default=15,
+        help="minimum genotype quality score below which single samples \
+              are filtered for a variant in the diploid vcf")
+    the_parser.add_argument(
+        '--minSomaticScore', type=int, default=10,
+        help="minimum VCF QUAL score for a variant to be included in the \
+              diploid vcf")
+    the_parser.add_argument(
+        '--minPassSomaticScore', type=int, default=30,
+        help="somatic quality scores below this level are filtered in the \
+              somatic vcf")
+    the_parser.add_argument(
+        '--enableRemoteReadRetrievalForInsertionsInGermlineCallingModes',
+        type=int, default=1,
+        help="includes tumor-normal subtraction and tumor-only calling")
+    the_parser.add_argument(
+        '--enableRemoteReadRetrievalForInsertionsInCancerCallingModes',
+        type=int, default=0,
+        help="GermlineCallingModes includes all other calling modes")
+    the_parser.add_argument(
+        '--useOverlapPairEvidence', type=int, default=0,
+        help="Set 1 if an overlapping read pair will be considered as \
+              evidence. Set to 0 to skip overlapping read pairs")
+    args = the_parser.parse_args()
+    return args
+
+
+if __name__ == "__main__":
+    args = Parser()
+    # recover arguments as a dictionary with keys = argument name and values
+    # are argument values
+    argsDict = args.__dict__
+    ini_lines = []
+    # implement first, hard-coded ini lines
+    ini_lines.append('[manta]')
+    ini_lines.append('referenceFasta = /dummy/path/to/genome.fa')
+    # implement the rest of the ini lines for the argsDict
+    for argument in argsDict:
+        ini_lines.append("%s = %s" % (argument, str(argsDict[argument])))
+    # print ini_lines in configManta.py.ini
+    handler = open('configManta.py.ini', 'w')
+    for line in ini_lines:
+        handler.write("%s\n" % line)
b
diff -r d09254e37c68 -r f55d45b0c6d1 customized.ini
--- a/customized.ini Mon Jun 08 03:11:56 2020 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,58 +0,0 @@
-
-#
-# This section contains all configuration settings for the top-level manta workflow,
-#
-[manta]
-
-referenceFasta = /illumina/development/Isis/Genomes/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta/genome.fa
-
-# Run discovery and candidate reporting for all SVs/indels at or above this size
-# Separate option (to provide different default) used for runs in RNA-mode
-minCandidateVariantSize = 8
-rnaMinCandidateVariantSize = 1000
-
-# Remove all edges from the graph unless they're supported by this many 'observations'.
-# Note that one supporting read pair or split read usually equals one observation, but evidence is sometimes downweighted.
-minEdgeObservations = 3
-
-# If both nodes of an edge have an edge count higher than this, then skip evaluation of the edge.
-# Set to 0 to turn this filtration off
-graphNodeMaxEdgeCount = 10
-
-# Run discovery and candidate reporting for all SVs/indels with at least this
-# many spanning support observations
-minCandidateSpanningCount = 3
-
-# After candidate identification, only score and report SVs/indels at or above this size:
-minScoredVariantSize = 50
-
-# minimum VCF "QUAL" score for a variant to be included in the diploid vcf:
-minDiploidVariantScore = 10
-
-# VCF "QUAL" score below which a variant is marked as filtered in the diploid vcf:
-minPassDiploidVariantScore = 20
-
-# minimum genotype quality score below which single samples are filtered for a variant in the diploid vcf:
-minPassDiploidGTScore = 15
-
-# somatic quality scores below this level are not included in the somatic vcf:
-minSomaticScore = 10
-
-# somatic quality scores below this level are filtered in the somatic vcf:
-minPassSomaticScore = 30
-
-# Remote read retrieval is used ot improve the assembly of putative insertions by retrieving any mate reads in remote
-# locations with poor mapping quality, which pair to confidently mapping reads near the insertion locus. These reads
-# can help to fully assemble longer insertions, under certain circumstances this feature can add a very large runtime
-# burden. For instance, given the very high chimeric pair rates found in degraded FFPE samples, the runtime of the read
-# retrieval process can be unpredicable. For this reason the feature is disabled by default for somatic variant calling.
-# This feature can be enabled/disabled separately for germline and cancer calling below.
-#
-# Here "CancerCallingModes" includes tumor-normal subtraction and tumor-only calling. "GermlineCallingModes" includes
-# all other calling modes.
-enableRemoteReadRetrievalForInsertionsInGermlineCallingModes = 1
-enableRemoteReadRetrievalForInsertionsInCancerCallingModes = 0
-
-# Set if an overlapping read pair will be considered as evidence
-# Set to 0 to skip overlapping read pairs
-useOverlapPairEvidence = 0
b
diff -r d09254e37c68 -r f55d45b0c6d1 manta.xml
--- a/manta.xml Mon Jun 08 03:11:56 2020 -0400
+++ b/manta.xml Tue Jun 09 06:23:39 2020 -0400
[
b'@@ -24,26 +24,27 @@\n     ln -s \'$bam_input.tumor_bam_file.metadata.bam_index\' tumor.bai &&\n     #end if\n \n-    #if str( $set_configuration.set_configuration_switch ) == "Customized":\n-        sed -i \'s/minCandidateVariantSize = 8/minCandidateVariantSize = $set_configuration.minCandidateVariantSize/\' ./configManta.py.ini &&\n-        sed -i \'s/rnaMinCandidateVariantSize = 1000/rnaMinCandidateVariantSize = $set_configuration.rnaMinCandidateVariantSize/\' ./configManta.py.ini &&\n-        sed -i \'s/minEdgeObservations = 3/minEdgeObservations = $set_configuration.minEdgeObservations/\' ./configManta.py.ini &&\n-        sed -i \'s/graphNodeMaxEdgeCount = 10/graphNodeMaxEdgeCount = $set_configuration.graphNodeMaxEdgeCount/\' ./configManta.py.ini &&\n-        sed -i \'s/minCandidateSpanningCount = 3/minCandidateSpanningCount = $set_configuration.minCandidateSpanningCount/\' ./configManta.py.ini &&\n-        sed -i \'s/minScoredVariantSize = 50/minScoredVariantSize = $set_configuration.minScoredVariantSize/\' ./configManta.py.ini &&\n-        sed -i \'s/minDiploidVariantScore = 10/minDiploidVariantScore = $set_configuration.minDiploidVariantScore/\' ./configManta.py.ini &&\n-        sed -i \'s/minPassDiploidVariantScore = 20/minPassDiploidVariantScore = $set_configuration.minPassDiploidVariantScore/\' ./configManta.py.ini &&\n-        sed -i \'s/minPassDiploidGTScore = 15/minPassDiploidGTScore = $set_configuration.minPassDiploidGTScore/\' ./configManta.py.ini &&\n-        sed -i \'s/minSomaticScore = 10/minSomaticScore = $set_configuration.minSomaticScore/\' ./configManta.py.ini &&\n-        sed -i \'s/minPassSomaticScore = 30/minPassSomaticScore = $set_configuration.minPassSomaticScore/\' ./configManta.py.ini &&\n-        sed -i \'s/enableRemoteReadRetrievalForInsertionsInGermlineCallingModes = 1/enableRemoteReadRetrievalForInsertionsInGermlineCallingModes = $set_configuration.enableRemoteReadRetrievalForInsertionsInGermlineCallingModes/\' ./configManta.py.ini &&\n-        sed -i \'s/enableRemoteReadRetrievalForInsertionsInCancerCallingModes = 0/enableRemoteReadRetrievalForInsertionsInCancerCallingModes = $set_configuration.enableRemoteReadRetrievalForInsertionsInCancerCallingModes/\' ./configManta.py.ini &&\n-        sed -i \'s/useOverlapPairEvidence = 0/useOverlapPairEvidence = $set_configuration.useOverlapPairEvidence/\' ./configManta.py.ini &&\n-    #end if\n-\n     #if str( $set_configuration.set_configuration_switch ) == "Custom_config_file":\n         cp \'$set_configuration.CustomConfigFile\' ./configManta.py.ini &&\n     #end if\n+    #if str( $set_configuration.set_configuration_switch ) == "Customized":\n+        rm ./configManta.py.ini &&\n+        python $__tool_directory__/customConfigManta.py\n+        --minCandidateVariantSize \'$set_configuration.minCandidateVariantSize\'\n+        --rnaMinCandidateVariantSize \'$set_configuration.rnaMinCandidateVariantSize\'\n+        --minEdgeObservations \'$set_configuration.minEdgeObservations\'\n+        --graphNodeMaxEdgeCount \'$set_configuration.graphNodeMaxEdgeCount\'\n+        --minCandidateSpanningCount \'$set_configuration.minCandidateSpanningCount\'\n+        --minScoredVariantSize \'$set_configuration.minScoredVariantSize\'\n+        --minDiploidVariantScore \'$set_configuration.minDiploidVariantScore\'\n+        --minPassDiploidVariantScore \'$set_configuration.minPassDiploidVariantScore\'\n+        --minPassDiploidGTScore \'$set_configuration.minPassDiploidGTScore\'\n+        --minSomaticScore \'$set_configuration.minSomaticScore\'\n+        --minPassSomaticScore \'$set_configuration.minPassSomaticScore\'\n+        --enableRemoteReadRetrievalForInsertionsInGermlineCallingModes \'$set_configuration.enableRemoteReadRetrievalForInsertionsInGermlineCallingModes\'\n+        --enableRemoteReadRetrievalForInsertionsInCancerCallingModes \'$set_configuration.enableRemoteReadRetrievalForInsertionsInCancerCallingModes\'\n+        --useOverlapPairEvidence \'$set_configuration.useOverlapPairEvidence\' &&\n+    #end if\n     \n     configManta.py --referenceFasta=\'${refe'..b'        <param name="candidateSmallIndels_check" value="True"/>\n-                <param name="somaticSV_check" value="True"/>\n-                <output name="candidateSmallIndels" file="candidateSmallIndels.vcf.gz" decompress="true" lines_diff="4"/>\n-                <output name="somaticSV" file="somaticSV.vcf.gz" decompress="true" lines_diff="4"/>\n+                <output name="candidateSmallIndels" file="candidateSmallIndels.vcf.gz" decompress="true" lines_diff="6"/>\n+                <output name="somaticSV" file="somaticSV.vcf.gz" decompress="true" lines_diff="6"/>\n         </test>\n-        <test>\n+         <test>\n+                <param name="reference_source_selector" value="cached"/>\n+                <param name="index" value="hg19"/>\n+                <param name="bam_input_selector" value="tumor_bam" dbkey="hg19"/>\n+                <param name="normal_bam_file" ftype="bam" value="HCC1954_normal.bam"/>\n+                <param name="tumor_bam_file" ftype="bam" value="HCC1954_tumor.bam"/>\n+                <param name="set_configuration_switch" value="Customized"/>\n+                <param name="callMemMb" value="1000"/>\n+                <param name="candidateSmallIndels_check" value="True"/>\n+                <output name="candidateSmallIndels" file="candidateSmallIndels.vcf.gz" decompress="true" lines_diff="6"/>\n+                <output name="somaticSV" file="somaticSV.vcf.gz" decompress="true" lines_diff="6"/>\n+        </test>\n+       <test>\n                 <param name="reference_source_selector" value="cached"/>\n                 <param name="index" value="hg19"/>\n                 <param name="bam_input_selector" value="tumor_bam" dbkey="hg19"/>\n@@ -185,7 +175,8 @@\n                 <param name="set_configuration_switch" value="Default_config_file"/>\n                 <param name="callMemMb" value="1000"/>\n                 <param name="candidateSmallIndels_check" value="True"/>\n-                <output name="candidateSmallIndels" file="candidateSmallIndels.vcf.gz" decompress="true" lines_diff="4"/>\n+                <output name="candidateSmallIndels" file="candidateSmallIndels.vcf.gz" decompress="true" lines_diff="6"/>\n+                <output name="somaticSV" file="somaticSV.vcf.gz" decompress="true" lines_diff="6"/>\n         </test>\n         <test>\n                 <param name="reference_source_selector" value="history"/>\n@@ -196,7 +187,8 @@\n                 <param name="set_configuration_switch" value="Default_config_file"/>\n                 <param name="callMemMb" value="1000"/>\n                 <param name="candidateSV_check" value="True"/>\n-                <output name="candidateSV" file="candidateSV.vcf.gz" decompress="true" lines_diff="4"/>\n+                <output name="candidateSV" file="candidateSV.vcf.gz" decompress="true" lines_diff="6"/>\n+                <output name="somaticSV" file="somaticSV.vcf.gz" decompress="true" lines_diff="6"/>\n         </test>\n         <test>\n                 <param name="reference_source_selector" value="history"/>\n@@ -207,10 +199,10 @@\n                 <param name="set_configuration_switch" value="Default_config_file"/>\n                 <param name="callMemMb" value="1000"/>\n                 <param name="candidateSmallIndels_check" value="True"/>\n-                <output name="candidateSmallIndels" file="candidateSmallIndels.vcf.gz" decompress="true" lines_diff="4"/>\n+                <output name="candidateSmallIndels" file="candidateSmallIndels.vcf.gz" decompress="true" lines_diff="6"/>\n+                <output name="somaticSV" file="somaticSV.vcf.gz" decompress="true" lines_diff="6"/>\n         </test>\n- </tests>\n-\n+    </tests>\n     <help><![CDATA[\n **Outputs**\n   The primary Manta outputs are a set of VCF 4.1 files. Currently there are 3 VCF files\n@@ -333,10 +325,8 @@\n \n     For further info see: https://github.com/Illumina/manta\n \n-    ]]></help>\n-\n+  ]]></help>\n     <citations>\n         <citation type="doi">10.1093/bioinformatics/btv710</citation>\n     </citations>\n-\n </tool>\n'
b
diff -r d09254e37c68 -r f55d45b0c6d1 manta_macros.xml
--- a/manta_macros.xml Mon Jun 08 03:11:56 2020 -0400
+++ b/manta_macros.xml Tue Jun 09 06:23:39 2020 -0400
[
@@ -1,7 +1,7 @@
 <macros>
 
     <token name="@VERSION@">1.6</token>
-    <token name="@WRAPPER_VERSION@">@VERSION@+galaxy6</token>
+    <token name="@WRAPPER_VERSION@">@VERSION@+galaxy7</token>
     <token name="@pipefail@"><![CDATA[set -o | grep -q pipefail && set -o pipefail;]]></token>
 
     <token name="@set_reference_fasta_filename@"><![CDATA[
b
diff -r d09254e37c68 -r f55d45b0c6d1 test-data/candidateSV.vcf.gz
b
Binary file test-data/candidateSV.vcf.gz has changed
b
diff -r d09254e37c68 -r f55d45b0c6d1 test-data/candidateSmallIndels.vcf.gz
b
Binary file test-data/candidateSmallIndels.vcf.gz has changed
b
diff -r d09254e37c68 -r f55d45b0c6d1 test-data/somaticSV.vcf.gz
b
Binary file test-data/somaticSV.vcf.gz has changed