Repository 'salmon'
hg clone https://toolshed.g2.bx.psu.edu/repos/bgruening/salmon

Changeset 16:49121db48873 (2021-07-22)
Previous changeset 15:cc05793bb896 (2020-10-03) Next changeset 17:c8903f357804 (2022-12-05)
Commit message:
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/salmon commit 26e9f1627e91a4be6bdc7e71cd44f1ea1701ee6f"
modified:
macros.xml
salmonquant.xml
test-data/postSample.bam
vpolo_convert.py
b
diff -r cc05793bb896 -r 49121db48873 macros.xml
--- a/macros.xml Sat Oct 03 18:22:45 2020 +0000
+++ b/macros.xml Thu Jul 22 14:05:28 2021 +0000
b
b'@@ -1,24 +1,18 @@\n <macros>\n-    <token name="@VERSION@">1.3.0</token>\n+    <token name="@VERSION@">1.5.1</token>\n     <token name="@GALAXY_VERSION@">galaxy0</token>\n     <token name="@IDX_VERSION@">q7</token>\n+    <token name="@PROFILE_VERSION@">20.01</token>\n     <xml name="requirements">\n         <requirements>\n             <requirement type="package" version="@VERSION@">salmon</requirement>\n             <requirement type="package" version="1.3">seqtk</requirement>\n-            <requirement type="package" version="1.10">samtools</requirement>\n+            <requirement type="package" version="1.12">samtools</requirement>\n             <requirement type="package" version="0.2.0">vpolo</requirement>\n-            <requirement type="package" version="1.0.3">pandas</requirement>\n-            <requirement type="package" version="1.4.1">scipy</requirement>\n+            <requirement type="package" version="1.3.0">pandas</requirement>\n+            <requirement type="package" version="1.7.0">scipy</requirement>\n         </requirements>\n     </xml>\n-    <xml name="stranded">\n-        <param name="strandedness" type="select" label="Specify the strandedness of the reads">\n-                <option value="U" selected="True">Not stranded (U)</option>\n-                <option value="SF">read comes from the forward strand (SF)</option>\n-                <option value="SR">read comes from the reverse strand (SR)</option>\n-        </param>\n-    </xml>\n     <xml name="orient">\n         <param name="orientation" type="select" label="Relative orientation of reads within a pair">\n             <option value="M">Mates are oriented in the same direction (M = matching)</option>\n@@ -26,6 +20,40 @@\n             <option value="I" selected="True">Mates are oriented toward each other (I = inward)</option>\n         </param>\n     </xml>\n+    <xml name="stranded">\n+        <conditional name="libtype" >\n+            <param name="strandedness" type="select" label="Specify the strandedness of the reads" help="--libtype">\n+                <option value="A" selected="true">Infer automatically (A)</option>\n+                <option value="U">Not stranded (U)</option>\n+                <option value="SF">read comes from the forward strand (SF)</option>\n+                <option value="SR">read comes from the reverse strand (SR)</option>\n+            </param>\n+            <yield/>\n+        </conditional>\n+    </xml>\n+    <xml name="stranded_se">\n+        <expand macro="stranded">\n+            <when value="A"/>\n+            <when value="U"/>\n+            <when value="SF"/>\n+            <when value="SR"/>\n+        </expand>\n+    </xml>\n+    <xml name="stranded_pe">\n+        <expand macro="stranded">\n+            <when value="A">\n+            </when>\n+            <when value="U">\n+                <expand macro="orient"/>\n+            </when>\n+            <when value="SF">\n+                <expand macro="orient"/>\n+            </when>\n+            <when value="SR">\n+                <expand macro="orient"/>\n+            </when>\n+        </expand>\n+    </xml>\n     <xml name="index">\n         <conditional name="refTranscriptSource">\n             <param name="TranscriptSource" type="select" label="Select a reference transcriptome from your history or use a built-in index?"\n@@ -63,23 +91,20 @@\n                 </param>\n                 <when value="single">\n                     <param name="input_singles" type="data" format="fastq,fasta,fastq.gz,fastq.bz2" label="FASTQ/FASTA file" help="FASTQ file." />\n-                    <expand macro="stranded"/>\n+                    <expand macro="stranded_se"/>\n                 </when>\n                 <when value="paired">\n                     <param name="input_mate1" type="data" format="fastq,fasta,fastq.gz,fastq.bz2,fastqsanger,fastqsanger.gz,fastqsanger.bz2" label="Mate pair 1" help="FASTQ file." />\n                     <param name="input_mate2" type="data" format="fastq,fasta,fastq.gz,fastq.bz2,fastqsanger,fastqsanger.gz,fastqsanger.bz2'..b'en computing the conditional probability of observing a fragment given that it arises from a specific transcript. This is because in long-read sequencing, we do not expect to observe (i.e. sequence) multiple fragments from the same molecule, and thus we do not expect the transcript length to directly affect the observed fragment count directly"/>\n         <param name="transcript" type="data" format="fasta,fa" label="Transcript file"/>\n-        <expand macro="stranded"/>\n+        <expand macro="stranded_se"/>\n         <param name="discardOrphans" type="boolean" truevalue="--discardOrphans" falsevalue="" checked="False"\n         label="Discard orphans"\n         help="Discard orphan alignments in the input. If this flag is passed, then only paired alignments will be considered toward quantification estimates. The default behavior is to consider orphan alignments if no valid paired mappings exist."/>\n@@ -230,7 +256,7 @@\n             label="Use the traditional EM algorithm for optimization in the batch passes."\n             help=""/>\n             <param name="rangeFactorizationBins" type="integer" value="0" label="Range of factorization bins"\n-            help="Factorizes the likelihood used in quantification by adopting a new notionof equivalence classes based on the conditional probabilities with which fragments are generated from different transcripts. This is a more fine-grained factorization than the normal rich equivalence classes. The default value (0) corresponds to the standard rich equivalence classes, and larger values imply a more fine-grained factorization. If range factorization is enabled, a common value to select for this parameter is 4."/>\n+            help="Factorizes the likelihood used in quantification by adopting a new notion of equivalence classes based on the conditional probabilities with which fragments are generated from different transcripts. This is a more fine-grained factorization than the normal rich equivalence classes. The default value (0) corresponds to the standard rich equivalence classes, and larger values imply a more fine-grained factorization. If range factorization is enabled, a common value to select for this parameter is 4."/>\n             <param name="numGibbsSamples" type="integer" value="0" optional="True"\n             label="Number of Gibbs sampling rounds to perform."\n             help="" />\n@@ -360,7 +386,7 @@\n         salmon quant\n             --index \'$index_path\'\n             #if $quant_type.input.single_or_paired.single_or_paired_opts == \'single\':\n-                --libType ${quant_type.input.single_or_paired.strandedness}\n+                --libType ${quant_type.input.single_or_paired.libtype.strandedness}\n                 #if $compressed == \'GZ\':\n                     --unmatedReads <(zcat < ./single.$ext)\n                 #else if $compressed == \'BZ2\':\n@@ -369,7 +395,12 @@\n                     --unmatedReads ./single.$ext\n                 #end if\n             #else:\n-                --libType \'${quant_type.input.single_or_paired.orientation}${quant_type.input.single_or_paired.strandedness}\'\n+                --libType\n+                #if $quant_type.input.single_or_paired.libtype.strandedness == \'A\'\n+                    A\n+                #else\n+                    ${quant_type.input.single_or_paired.libtype.orientation}${quant_type.input.single_or_paired.libtype.strandedness}\n+                #end if\n                 #if $quant_type.input.single_or_paired.single_or_paired_opts == \'paired_interleaved\':\n                     #if $compressed == \'BZ2\':\n                         --mates1 <(bzcat < ./mate1.$ext | seqtk seq -1)\n@@ -435,8 +466,9 @@\n         #end if\n         salmon quant\n         -t \'${quant_type.transcript}\'\n-        -l \'${quant_type.strandedness}\'\n+        -l \'${quant_type.libtype.strandedness}\'\n         -a \'${quant_type.afile}\'\n+        $quant_type.ont\n         --threads "\\${GALAXY_SLOTS:-4}"\n         ${quant_type.discardOrphans}\n         ${quant_type.noErrorModel}\n'
b
diff -r cc05793bb896 -r 49121db48873 salmonquant.xml
--- a/salmonquant.xml Sat Oct 03 18:22:45 2020 +0000
+++ b/salmonquant.xml Thu Jul 22 14:05:28 2021 +0000
b
@@ -1,4 +1,4 @@
-<tool id="salmon" name="Salmon quant" version="@VERSION@+galaxy1">
+<tool id="salmon" name="Salmon quant" version="@VERSION@+@GALAXY_VERSION@" profile="@PROFILE_VERSION@">
     <description>Perform dual-phase, reads or mapping-based estimation of transcript abundance from RNA-seq reads</description>
     <macros>
         <import>macros.xml</import>
@@ -59,10 +59,14 @@
                     </section>
                 </conditional>
                 <section name="input">
-                    <param name="single_or_paired.single_or_paired_opts" value="paired" />
-                    <param name="single_or_paired.input_mate1" value="fastqs/reads_1.fastq" />
-                    <param name="single_or_paired.input_mate2" value="fastqs/reads_2.fastq" />
-                    <param name="single_or_paired.strandedness" value="U"/>
+                    <conditional name="single_or_paired">
+                        <param name="single_or_paired_opts" value="paired" />
+                        <param name="input_mate1" value="fastqs/reads_1.fastq" />
+                        <param name="input_mate2" value="fastqs/reads_2.fastq" />
+                        <conditional name="libtype">
+                            <param name="strandedness" value="U"/>
+                        </conditional>
+                    </conditional>
                 </section>
                 <param name="writeMappings" value="true"/>
             </conditional>
@@ -80,6 +84,43 @@
                     <has_n_columns n="5" />
                 </assert_contents>
             </output>
+            <assert_command>
+                <has_text text="--libType IU"/>
+            </assert_command>
+        </test>
+        <test expect_num_outputs="2">
+            <conditional name="quant_type">
+                <param name="qtype" value="reads"/>
+                <conditional name="refTranscriptSource">
+                    <param name="TranscriptSource" value="history"/>
+                    <section name="s_index">
+                        <param name="fasta" value="transcripts.fasta"/>
+                    </section>
+                </conditional>
+                <section name="input">
+                    <param name="single_or_paired.single_or_paired_opts" value="paired" />
+                    <param name="single_or_paired.input_mate1" value="fastqs/reads_1.fastq" />
+                    <param name="single_or_paired.input_mate2" value="fastqs/reads_2.fastq" />
+                </section>
+                <param name="writeMappings" value="true"/>
+            </conditional>
+            <output name="output_quant" ftype="tabular">
+                <assert_contents>
+                    <has_text text="EffectiveLength" />
+                    <has_text text="TPM" />
+                    <has_text text="NM_001168316" />
+                    <has_text text="NM_174914" />
+                    <has_text text="NM_018953" />
+                    <has_text text="NR_003084" />
+                    <has_text text="NM_017410" />
+                    <has_text text="NM_153693" />
+                    <has_text text="NR_031764" />
+                    <has_n_columns n="5" />
+                </assert_contents>
+            </output>
+            <assert_command>
+                <has_text text="--libType A"/>
+            </assert_command>
         </test>
         <test expect_num_outputs="1">
             <conditional name="quant_type">
@@ -152,11 +193,30 @@
                 <param name="noErrorModel" value="--noErrorModel"/>
                 <param name="numErrorBins" value="5"/>
             </conditional>
-            <output name="postSample" ftype="bam" value="postSample.bam"/>
+            <!-- bam output uses non-deterministic sampling, so can only use compare="sim_size" -->
+            <output name="postSample" ftype="bam" value="postSample.bam" compare="sim_size" delta="20000"/>
             <assert_stderr>
                 <has_text text="Sampling alignments; outputting results to ./output/postSample.bam"/>
             </assert_stderr>
         </test>
+        <test expect_num_outputs="2">
+            <conditional name="quant_type">
+                <param name="qtype" value="alignment"/>
+                <param name="afile" value="salmonbam.bam"/>
+                <param name="ont" value="true" />
+                <param name="transcript" value="transcripts.fasta"/>
+                <param name="sampleOut" value="--sampleOut"/>
+                <param name="sampleUnaligned" value="--sampleUnaligned"/>
+                <param name="noErrorModel" value="--noErrorModel"/>
+                <param name="numErrorBins" value="5"/>
+            </conditional>
+            <assert_stderr>
+                <has_text text="Sampling alignments; outputting results to ./output/postSample.bam"/>
+            </assert_stderr>
+            <assert_command>
+                <has_text text=" --ont "/>
+            </assert_command>
+        </test>
         <test expect_num_outputs="1">
             <conditional name="quant_type">
                 <param name="qtype" value="reads"/>
b
diff -r cc05793bb896 -r 49121db48873 test-data/postSample.bam
b
Binary file test-data/postSample.bam has changed
b
diff -r cc05793bb896 -r 49121db48873 vpolo_convert.py
--- a/vpolo_convert.py Sat Oct 03 18:22:45 2020 +0000
+++ b/vpolo_convert.py Thu Jul 22 14:05:28 2021 +0000
b
@@ -4,7 +4,6 @@
 
 from vpolo.alevin import parser as par
 
-
 parser = argparse.ArgumentParser()
 parser.add_argument("--mtx", "-m", action="store_true", help="--dumpMtx flag set")
 parser.add_argument("--umi", "-u", action="store_true", help="--dumpUmiGraph flag set")