Repository 'slamdunk'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/slamdunk

Changeset 7:5a26589d95ad (2021-09-25)
Previous changeset 6:141f65f7c7c8 (2021-07-13)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/slamdunk commit b5aa6e762b55a9793dc7514efcda05eb2ccd529c"
modified:
alleyoop.xml
macros.xml
slamdunk.xml
test-data/reads_slamdunk_mapped_filtered_tcount.tsv
added:
test-data/reads_slamdunk_mapped_filtered_snp.vcf
b
diff -r 141f65f7c7c8 -r 5a26589d95ad alleyoop.xml
--- a/alleyoop.xml Tue Jul 13 14:01:12 2021 +0000
+++ b/alleyoop.xml Sat Sep 25 18:21:39 2021 +0000
[
b'@@ -1,9 +1,9 @@\n-<tool id="alleyoop" name="Alleyoop" version="@TOOL_VERSION@+galaxy1" profile="@PROFILE@">\n+<tool id="alleyoop" name="Alleyoop" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">\n     <description>- post-processing and QC of Slamdunk analyses</description>\n     <macros>\n         <import>macros.xml</import>\n     </macros>\n-    <expand macro="requirements" />\n+    <expand macro="requirements"/>\n     <version_command>alleyoop --version</version_command>\n     <command detect_errors="exit_code"><![CDATA[\n #import re\n@@ -49,11 +49,11 @@\n \n alleyoop rates -o ./stats -r reference.fa -mq $mq ./filter/*bam &&\n \n-alleyoop utrrates -o ./stats -r reference.fa -b $Reference -t \\${GALAXY_SLOTS:-1} -l $l -mq $mq ./filter/*bam &&\n+alleyoop utrrates -o ./stats -r reference.fa -b $reference -t \\${GALAXY_SLOTS:-1} -l $l -mq $mq ./filter/*bam &&\n \n alleyoop tcperreadpos -o ./stats -r reference.fa -s ./snp -t \\${GALAXY_SLOTS:-1} -l $l -mq $mq ./filter/*bam &&\n \n-alleyoop tcperutrpos -o ./stats -r reference.fa -s ./snp -t \\${GALAXY_SLOTS:-1} -l $l -b $Reference -mq $mq ./filter/*bam\n+alleyoop tcperutrpos -o ./stats -r reference.fa -s ./snp -t \\${GALAXY_SLOTS:-1} -l $l -b $reference -mq $mq ./filter/*bam\n \n #if $bams:\n     && alleyoop read-separator -o ./splitbams -s ./snp -r reference.fa ./filter/*bam\n@@ -61,62 +61,62 @@\n \n     ]]></command>\n     <inputs>\n-        <expand macro="reference_files" />\n-        <param name="reads" type="data" format="sam,bam" multiple="True" label="Slamdunk BAM files" />\n-        <param name="count_tsvs" type="data" format="tabular" multiple="True" label="Slamdunk Count TSV files" />\n-        <param name="variants" type="data" format="vcf" multiple="True" label="Slamdunk VCF files" />\n-        <param argument="-mq" type="integer" label="Minimum base quality"\n+        <expand macro="reference_files"/>\n+        <param name="reads" type="data" format="sam,bam" multiple="True" label="Slamdunk BAM files"/>\n+        <param name="count_tsvs" type="data" format="tabular" multiple="True" label="Slamdunk Count TSV files"/>\n+        <param name="variants" type="data" format="vcf" multiple="True" label="Slamdunk VCF files"/>\n+        <param name="mq" argument="--min-basequality" type="integer" label="Minimum base quality"\n                 value="27" min="0"\n-                help="Minimum base quality for T>C conversions (default: 27)." />\n-        <param argument="-l" type="integer" label="Read length"\n-            value="50" min="50" help="Maximum read length (before trimming)." />\n+                help="Minimum base quality for T>C conversions (default: 27)."/>\n+        <param name="l" argument="--max-read-length" type="integer" label="Read length"\n+            value="50" min="50" help="Maximum read length (before trimming)."/>\n         <param name="bams" type="boolean" truevalue="True" falsevalue="False" checked="False" label="Output T>C separated BAM files?" help="If this option is set to Yes, the Alleyoop read-separator module will be run to output BAM files of separated T>C reads from non T>C reads. Default: No"/>\n     </inputs>\n     <outputs>\n          <collection name="outputSummary" type="list" label="${tool.name} on ${on_string}: Summary tables">\n-            <discover_datasets pattern="(?P&lt;name&gt;.+)\\.txt$" format="tabular" directory="." visible="false" />\n+            <discover_datasets pattern="(?P&lt;name&gt;.+)\\.txt$" format="tabular" directory="." visible="false"/>\n         </collection>\n         <collection name="outputStats" type="list" label="${tool.name} on ${on_string}: Stats tables">\n-            <discover_datasets pattern="(?P&lt;name&gt;.+)\\.csv$" format="tabular" directory="./stats" visible="false" />\n+            <discover_datasets pattern="(?P&lt;name&gt;.+)\\.csv$" format="tabular" directory="./stats" visible="false"/>\n         </collection>\n         <collection name="outputTCReads" type="list" label="${tool.name} on ${on_string}: TC Reads">\n-            <discover_da'..b'alse"/>\n             <filter>bams</filter>\n         </collection>\n         <collection name="outputbkgdReads" type="list" label="${tool.name} on ${on_string}: Background Reads">\n-            <discover_datasets pattern="(?P&lt;name&gt;.+)_backgroundReads.bam$" format="bam" directory="./splitbams" visible="false" />\n+            <discover_datasets pattern="(?P&lt;name&gt;.+)_backgroundReads.bam$" format="bam" directory="./splitbams" visible="false"/>\n             <filter>bams</filter>\n         </collection>\n     </outputs>\n     <tests>\n         <!-- Ensure default output works -->\n         <test expect_num_outputs="2">\n-            <param name="reference_source_selector" value="history" />\n-            <param name="ref_file" ftype="fasta" value="ref.fa" />\n-            <param name="Reference" ftype="bed" value="actb.bed" />\n-            <param name="reads" ftype="bam" value="reads1.bam,reads2.bam" />\n-            <param name="count_tsvs" ftype="tabular" value="reads1_tcount.tsv,reads2_tcount.tsv" />\n-            <param name="variants" ftype="vcf" value="reads1_snp.vcf,reads2_snp.vcf" />\n-            <param name="l" value="100" />\n-            <param name="mq" value="27" />\n+            <param name="reference_source_selector" value="history"/>\n+            <param name="ref_file" ftype="fasta" value="ref.fa"/>\n+            <param name="reference" ftype="bed" value="actb.bed"/>\n+            <param name="reads" ftype="bam" value="reads1.bam,reads2.bam"/>\n+            <param name="count_tsvs" ftype="tabular" value="reads1_tcount.tsv,reads2_tcount.tsv"/>\n+            <param name="variants" ftype="vcf" value="reads1_snp.vcf,reads2_snp.vcf"/>\n+            <param name="l" value="100"/>\n+            <param name="mq" value="27"/>\n             <output_collection name="outputSummary" count="2">\n-                <element name="summary" ftype="tabular" file="summary.txt" />\n+                <element name="summary" ftype="tabular" file="summary.txt" lines_diff="2"/>\n             </output_collection>\n             <output_collection name="outputStats" count="8">\n-                <element name="reads1_overallrates" ftype="tabular" file="reads1_overallrates.csv"  />\n+                <element name="reads1_overallrates" ftype="tabular" file="reads1_overallrates.csv" lines_diff="2"/>\n             </output_collection>\n         </test>\n         <!-- Ensure BAM output works -->\n         <test expect_num_outputs="4">\n-            <param name="reference_source_selector" value="history" />\n-            <param name="ref_file" ftype="fasta" value="ref.fa" />\n-            <param name="Reference" ftype="bed" value="actb.bed" />\n-            <param name="reads" ftype="bam" value="reads1.bam,reads2.bam" />\n-            <param name="count_tsvs" ftype="tabular" value="reads1_tcount.tsv,reads2_tcount.tsv" />\n-            <param name="variants" ftype="vcf" value="reads1_snp.vcf,reads2_snp.vcf" />\n-            <param name="l" value="100" />\n-            <param name="mq" value="27" />\n-            <param name="bams" value="True" />\n+            <param name="reference_source_selector" value="history"/>\n+            <param name="ref_file" ftype="fasta" value="ref.fa"/>\n+            <param name="reference" ftype="bed" value="actb.bed"/>\n+            <param name="reads" ftype="bam" value="reads1.bam,reads2.bam"/>\n+            <param name="count_tsvs" ftype="tabular" value="reads1_tcount.tsv,reads2_tcount.tsv"/>\n+            <param name="variants" ftype="vcf" value="reads1_snp.vcf,reads2_snp.vcf"/>\n+            <param name="l" value="100"/>\n+            <param name="mq" value="27"/>\n+            <param name="bams" value="True"/>\n             <output_collection name="outputTCReads" count="2">\n                 <element name="reads1" ftype="bam" file="reads1_TCReads.bam" lines_diff="8"/>\n             </output_collection>\n@@ -163,6 +163,6 @@\n \n     ]]></help>\n     <citations>\n-        <expand macro="citations" />\n+        <expand macro="citations"/>\n     </citations>\n </tool>\n'
b
diff -r 141f65f7c7c8 -r 5a26589d95ad macros.xml
--- a/macros.xml Tue Jul 13 14:01:12 2021 +0000
+++ b/macros.xml Sat Sep 25 18:21:39 2021 +0000
b
@@ -1,6 +1,7 @@
 <?xml version="1.0"?>
 <macros>
-    <token name="@TOOL_VERSION@">0.4.1</token>
+    <token name="@TOOL_VERSION@">0.4.3</token>
+    <token name="@VERSION_SUFFIX@">1</token>
     <token name="@PROFILE@">20.05</token>
     <xml name="requirements">
         <requirements>
@@ -14,7 +15,7 @@
                 <option value="history">Use a FASTA from history</option>
             </param>
             <when value="cached">
-                <param name="ref_file" type="select" label="Use built-in FASTA" help="Select genome from the list">
+                <param name="ref_file" argument="--reference" type="select" label="Use built-in FASTA" help="Select genome from the list">
                     <options from_data_table="all_fasta">
                         <filter type="sort_by" column="2" />
                         <validator type="no_options" message="No reference genomes are available" />
@@ -23,10 +24,10 @@
                 </param>
             </when>
             <when value="history">
-                <param name="ref_file" type="data" format="fasta" label="Use the following dataset as the FASTA" help="You can upload a FASTA sequence to the history and use it as reference" />
+                <param name="ref_file" argument="--reference" type="data" format="fasta" label="Use the following dataset as the FASTA" help="You can upload a FASTA sequence to the history and use it as reference" />
             </when>
         </conditional>
-        <param name="Reference" type="data" format="bed" label="Reference 3'UTRs BED file" />
+        <param argument="--reference" type="data" format="bed" label="Reference 3'UTRs BED file" />
     </xml>
     <xml name="citations">
         <citation type="doi">
b
diff -r 141f65f7c7c8 -r 5a26589d95ad slamdunk.xml
--- a/slamdunk.xml Tue Jul 13 14:01:12 2021 +0000
+++ b/slamdunk.xml Sat Sep 25 18:21:39 2021 +0000
[
b'@@ -1,159 +1,172 @@\n-<tool id="slamdunk" name="Slamdunk" version="@TOOL_VERSION@+galaxy3" profile="@PROFILE@">\n+<tool id="slamdunk" name="Slamdunk" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">\n     <description>- streamlining SLAM-seq analysis with ultra-high sensitivity</description>\n     <macros>\n         <import>macros.xml</import>\n     </macros>\n-    <expand macro="requirements" />\n+    <expand macro="requirements"/>\n     <version_command>slamdunk --version</version_command>\n     <command detect_errors="exit_code"><![CDATA[\n #import re\n \n+mkdir fastq &&\n+#set $reads_id = re.sub(\'[^\\w\\-\\.]\', \'_\', str($reads.element_identifier))\n+ln -s \'$reads\' \'./fastq/$reads_id\' &&\n+\n #if $reference_source.reference_source_selector == \'history\':\n     ln -f -s \'$reference_source.ref_file\' reference.fa &&\n #else:\n     ln -f -s \'$reference_source.ref_file.fields.path\' reference.fa &&\n #end if\n \n-mkdir ./fastq &&\n-#for $fastq in $reads:\n-    #set $fastq_name = re.sub(\'[^\\w\\-\\.]\', \'_\', str($fastq.element_identifier))\n-    ln -s \'$fastq\' \'./fastq/${fastq_name}\' &&\n-#end for\n-\n-    slamdunk all -r reference.fa -b \'$Reference\' -o ./out\n+    slamdunk all -r reference.fa -b \'$reference\' -o ./out\n        -t \\${GALAXY_SLOTS:-1}\n        -n $multimapper.multimappers\n-       $multimapper.multimap\n-       #if $multimapper.filterbed.bedtofilter:\n-        -fb $multimapper.filterbed.bedtofilter\n-       #end if\n-       -5 $quantseq.trim5\n-       -a $quantseq.maxpolyA\n-       $advanced.endtoend\n-       -mq $advanced.minMQ\n-       -mi $advanced.minID\n-       -nm=$advanced.maxNM\n-       -mc $advanced.minCov\n-       -mv $advanced.minVar\n-       -mbq $advanced.minBaseQual\n-    -rl $readLength\n-    -c $covThresh\n-    ./fastq/*\n+        $multimapper.multimap\n+        #if $multimapper.filterbed.bedtofilter:\n+            -fb $multimapper.filterbed.bedtofilter\n+        #end if\n+        -5 $quantseq.trim5\n+        -a $quantseq.maxpolyA\n+        $advanced.endtoend\n+        -mq $advanced.minMQ\n+        -mi $advanced.minID\n+        -nm=$advanced.maxNM\n+        -mc $advanced.minCov\n+        -mv $advanced.minVar\n+        -mbq $advanced.minBaseQual\n+        -rl $readLength\n+        -c $covThresh\n+        #if $advanced.vcf\n+            --vcf $advanced.vcf\n+        #end if\n+        \'./fastq/$reads_id\'\n+\n+        && mv out/filter/*_slamdunk_mapped_filtered.bam \'$outputBam\'\n+        && mv out/count/*_slamdunk_mapped_filtered_tcount.tsv \'$outputTsv\'\n+        #if not $advanced.vcf\n+            && mv out/snp/*_slamdunk_mapped_filtered_snp.vcf \'$outputVcf\'\n+        #end if\n     ]]></command>\n     <inputs>\n-        <expand macro="reference_files" />\n-        <param name="reads" type="data" format="fastqsanger,fastqsanger.gz" multiple="True" label="FASTQ files"/>\n+        <expand macro="reference_files"/>\n+        <param name="reads" type="data" format="fastqsanger,fastqsanger.gz" label="FASTQ files"/>\n         <section name="multimapper" title="Multimapper recovery"\n             expanded="false">\n             <section name="filterbed"\n                 title="Use separate 3\' UTR bed to filter multimappers." expanded="false">\n-                <param name="bedtofilter" type="data" format="bed" optional="true"\n-                    label="Bed to filter" />\n+                <param name="bedtofilter" argument="--filterbed" type="data" format="bed" optional="true"\n+                    label="Bed to filter"/>\n             </section>\n-            <param name="multimappers" type="integer" min="1" value="1"\n+            <param name="multimappers" argument="--topn" type="integer" min="1" value="1"\n                 label="Maximum number of alignments to report per read"\n-                help="The maximum number of alignments is used to track multimapping read alignments. The more are allowed, the more sensitive the multimapper filtering will be, but also the longer the runtime will be. 100 was used in previous publications." />\n-            <param name="multimap" type="bool'..b'               compare="re_match"  />\n-            </output_collection>\n-            <output_collection name="outputVcf">\n-                <element name="reads_slamdunk_mapped_filtered" ftype="vcf" file="reads1_snp.vcf" compare="sim_size" />\n-            </output_collection>\n+            <output name="outputBam" ftype="bam" value="reads1.bam" compare="sim_size"/>\n+            <output name="outputTsv" ftype="tabular" value="reads_slamdunk_mapped_filtered_tcount.tsv" compare="re_match"/>\n+            <output name="outputVcf" ftype="vcf" file="reads1_snp.vcf" compare="sim_size"/>\n         </test>\n-        <test>\n+        <test expect_num_outputs="3">\n             <!--Ensure built-in fasta works -->\n-            <param name="reference_source_selector" value="cached" />\n-            <param name="ref_file" value="hg38full" />\n-            <param name="Reference" value="actb.bed" />\n-            <param name="reads" ftype="fastqsanger" dbkey="hg38" value="reads.fq" />\n-            <param name="readLength" value="100" />\n+            <param name="reference_source_selector" value="cached"/>\n+            <param name="ref_file" value="hg38full"/>\n+            <param name="reference" value="actb.bed"/>\n+            <param name="reads" ftype="fastqsanger" dbkey="hg38" value="reads.fq"/>\n+            <param name="readLength" value="100"/>\n             <section name="quantseq">\n-                <param name="trim5" value="0" />\n+                <param name="trim5" value="0"/>\n             </section>\n             <section name="advanced">\n-                <param name="minBaseQual" value="27" />\n+                <param name="minBaseQual" value="27"/>\n             </section>\n-            <output_collection name="outputBam">\n-                <element name="reads_slamdunk_mapped_filtered" ftype="bam" file="reads1.bam" compare="sim_size" />\n-            </output_collection>\n-            <output_collection name="outputTsv">\n-                <element name="reads_slamdunk_mapped_filtered" ftype="tabular" file="reads_slamdunk_mapped_filtered_tcount.tsv"\n-                compare="re_match"  />\n-            </output_collection>\n-            <output_collection name="outputVcf">\n-                <element name="reads_slamdunk_mapped_filtered" ftype="vcf" file="reads1_snp.vcf" compare="sim_size" />\n-            </output_collection>\n+            <output name="outputBam" ftype="bam" value="reads1.bam" compare="sim_size"/>\n+            <output name="outputTsv" ftype="tabular" value="reads_slamdunk_mapped_filtered_tcount.tsv" compare="re_match"/>\n+            <output name="outputVcf" ftype="vcf" file="reads1_snp.vcf" compare="sim_size"/>\n+        </test>\n+        <test expect_num_outputs="2">\n+            <!-- test with vcf -->\n+            <param name="reference_source_selector" value="history"/>\n+            <param name="ref_file" value="ref.fa"/>\n+            <param name="reference" value="actb.bed"/>\n+            <param name="reads" value="reads.fq"/>\n+            <param name="readLength" value="100"/>\n+            <section name="quantseq">\n+                <param name="trim5" value="0"/>\n+            </section>\n+            <section name="advanced">\n+                <param name="vcf" value="reads_slamdunk_mapped_filtered_snp.vcf" ftype="vcf"/>\n+                <param name="minBaseQual" value="27"/>\n+            </section>\n+            <output name="outputBam" ftype="bam" value="reads1.bam" compare="sim_size"/>\n+            <output name="outputTsv" ftype="tabular" value="reads_slamdunk_mapped_filtered_tcount.tsv" compare="re_match"/>\n+            <assert_stderr>\n+                <not_has_text text="Running slamDunk SNP"/>\n+            </assert_stderr>\n+            <assert_command>\n+                <has_text text="--vcf"/>\n+            </assert_command>\n         </test>\n     </tests>\n     <help><![CDATA[\n@@ -221,6 +234,6 @@\n \n     ]]></help>\n     <citations>\n-        <expand macro="citations" />\n+        <expand macro="citations"/>\n     </citations>\n </tool>\n'
b
diff -r 141f65f7c7c8 -r 5a26589d95ad test-data/reads_slamdunk_mapped_filtered_snp.vcf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/reads_slamdunk_mapped_filtered_snp.vcf Sat Sep 25 18:21:39 2021 +0000
b
@@ -0,0 +1,24 @@
+##fileformat=VCFv4.1
+##source=VarScan2
+##INFO=<ID=ADP,Number=1,Type=Integer,Description="Average per-sample depth of bases with Phred score >= 15">
+##INFO=<ID=WT,Number=1,Type=Integer,Description="Number of samples called reference (wild-type)">
+##INFO=<ID=HET,Number=1,Type=Integer,Description="Number of samples called heterozygous-variant">
+##INFO=<ID=HOM,Number=1,Type=Integer,Description="Number of samples called homozygous-variant">
+##INFO=<ID=NC,Number=1,Type=Integer,Description="Number of samples not called">
+##FILTER=<ID=str10,Description="Less than 10% or more than 90% of variant supporting reads on one strand">
+##FILTER=<ID=indelError,Description="Likely artifact due to indel reads at this position">
+##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
+##FORMAT=<ID=GQ,Number=1,Type=Integer,Description="Genotype Quality">
+##FORMAT=<ID=SDP,Number=1,Type=Integer,Description="Raw Read Depth as reported by SAMtools">
+##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Quality Read Depth of bases with Phred score >= 15">
+##FORMAT=<ID=RD,Number=1,Type=Integer,Description="Depth of reference-supporting bases (reads1)">
+##FORMAT=<ID=AD,Number=1,Type=Integer,Description="Depth of variant-supporting bases (reads2)">
+##FORMAT=<ID=FREQ,Number=1,Type=String,Description="Variant allele frequency">
+##FORMAT=<ID=PVAL,Number=1,Type=String,Description="P-value from Fisher's Exact Test">
+##FORMAT=<ID=RBQ,Number=1,Type=Integer,Description="Average quality of reference-supporting bases (qual1)">
+##FORMAT=<ID=ABQ,Number=1,Type=Integer,Description="Average quality of variant-supporting bases (qual2)">
+##FORMAT=<ID=RDF,Number=1,Type=Integer,Description="Depth of reference-supporting bases on forward strand (reads1plus)">
+##FORMAT=<ID=RDR,Number=1,Type=Integer,Description="Depth of reference-supporting bases on reverse strand (reads1minus)">
+##FORMAT=<ID=ADF,Number=1,Type=Integer,Description="Depth of variant-supporting bases on forward strand (reads2plus)">
+##FORMAT=<ID=ADR,Number=1,Type=Integer,Description="Depth of variant-supporting bases on reverse strand (reads2minus)">
+#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT Sample1
b
diff -r 141f65f7c7c8 -r 5a26589d95ad test-data/reads_slamdunk_mapped_filtered_tcount.tsv
--- a/test-data/reads_slamdunk_mapped_filtered_tcount.tsv Tue Jul 13 14:01:12 2021 +0000
+++ b/test-data/reads_slamdunk_mapped_filtered_tcount.tsv Sat Sep 25 18:21:39 2021 +0000
[
@@ -1,4 +1,4 @@
-#slamdunk v0.4.1 3 sample info: sample_0 0 NA -1
+#slamdunk v[.0-9]+ 3 sample info: .+ [-0-9]+ .+ [-0-9]+
 #annotation: dataset_.*.dat .*
 Chromosome Start End Name Length Strand ConversionRate ReadsCPM Tcontent CoverageOnTs ConversionsOnTs ReadCount TcReadCount multimapCount ConversionRateLower ConversionRateUpper
 chr5 120498 122492 Actb 1994 \+ 0.022\d* 666666.66\d* 445 90 2 8 4 0 -1\.0 -1\.0