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

Changeset 17:4dbb23a9fccc (2025-10-29)
Previous changeset 16:b0fe3e482cb7 (2024-10-28) Next changeset 18:528052085629 (2025-10-31)
Commit message:
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/salmon commit 1971e35a365a91ae36c990b374a552a46196e888
modified:
alevin.xml
macros.xml
test-data/full_data_structure.txt
umiout.sh
b
diff -r b0fe3e482cb7 -r 4dbb23a9fccc alevin.xml
--- a/alevin.xml Mon Oct 28 17:50:35 2024 +0000
+++ b/alevin.xml Wed Oct 29 10:47:09 2025 +0000
[
b'@@ -5,63 +5,55 @@\n     </macros>\n     <expand macro="xrefs"/>\n     <expand macro="requirements"/>\n+    <expand macro="version_command"/>\n     <command detect_errors="exit_code"><![CDATA[\n-        mkdir ./index\n-        && mkdir ./output\n-        #if $refTranscriptSource.TranscriptSource != "indexed":\n-            && salmon index -i ./index\n-                --kmerLen \'${refTranscriptSource.s_index.kmer}\'\n-                --gencode\n-                --transcripts \'${refTranscriptSource.s_index.fasta}\'\n-            #set $index_path = \'./index\'\n-        #else\n-            #set $index_path = $refTranscriptSource.index.fields.path\n-        #end if\n+        ## salmon uses one thread to much\n+        ## https://github.com/COMBINE-lab/salmon/issues/993\n+        SLOTS=\\$(( \\${GALAXY_SLOTS:-4} > 1 ? \\${GALAXY_SLOTS:-4} - 1 : 1 ));\n+\n+        #set TRANSCRIPTSOURCE_CONDITIONAL = $refTranscriptSource\n+        @indexing@\n+\n         #if $pairstraight.readselect == \'paired\':\n-            #if $pairstraight.file1.is_of_type("fastq.gz"):\n-                && cp \'${pairstraight.file1}\' ./mate1.fastq.gz\n-                && gunzip ./mate1.fastq.gz\n-                && cp \'${pairstraight.file2}\' ./mate2.fastq.gz\n-                && gunzip ./mate2.fastq.gz\n-            #else if $pairstraight.file1.is_of_type("fastq.bz2"):\n-                && cp \'${pairstraight.file1}\' ./mate1.fastq.bz2\n-                && bzip2 -d ./mate1.fastq.bz2\n-                && cp \'${pairstraight.file2}\' ./mate2.fastq.bz2\n-                && bzip2 -d ./mate2.fastq.bz2\n+            #if $pairstraight.mates.forward.is_of_type("fastq.gz"):\n+                gunzip -c \'${pairstraight.mates.forward}\' > ./mate1.fastq &&\n+                gunzip -c \'${pairstraight.mates.reverse}\' > ./mate2.fastq &&\n+            #else if $pairstraight.mates.forward.is_of_type("fastq.bz2"):\n+                bunzip2 -c \'${pairstraight.mates.forward}\' > ./mate1.fastq &&\n+                bunzip2 -c \'${pairstraight.mates.reverse}\' > ./mate2.fastq &&\n             #else:\n-                && ln -s \'${pairstraight.file1}\' ./mate1.fastq\n-                && ln -s \'${pairstraight.file2}\' ./mate2.fastq\n+                ln -s \'${pairstraight.mates.forward}\' ./mate1.fastq &&\n+                ln -s \'${pairstraight.mates.reverse}\' ./mate2.fastq &&\n             #end if\n         #else:\n             #if $pairstraight.unmatedreads.is_of_type("fastq.gz"):\n-                && cp \'${pairstraight.unmatedreads}\' ./unmate.fastq.gz\n-                && gunzip ./unmate.fastq.gz\n+                gunzip -c \'${pairstraight.unmatedreads}\' > ./unmate.fastq &&\n             #else if $pairstraight.unmatedreads.is_of_type("fastq.bz2"):\n-                && cp \'${pairstraight.unmatedreads}\' ./unmate.fastq.bz2\n-                && bzip2 -d unmate.fastq.bz2\n+                bunzip2 -c \'${pairstraight.unmatedreads}\' > ./unmate.fastq &&\n             #else:\n-                && ln -s \'${pairstraight.unmatedreads}\' ./unmate.fastq\n+                ln -s \'${pairstraight.unmatedreads}\' ./unmate.fastq &&\n             #end if\n         #end if\n \n-        && ln -s \'${tgmap}\' ./alevinmap.tsv\n-        && salmon alevin -l\n+        ln -s \'${tgmap}\' ./alevinmap.tsv &&\n+        salmon --no-version-check alevin\n+        --libType\n         #if $pairstraight.readselect == \'paired\':\n             #if $pairstraight.libtype.strandedness == \'A\'\n                 A\n             #else\n                 ${pairstraight.libtype.orientation}${pairstraight.libtype.strandedness}\n             #end if\n-            -i $index_path\n-            -1 ./mate1.fastq\n-            -2 ./mate2.fastq\n+            --index $index_path\n+            --mates1 ./mate1.fastq\n+            --mates2 ./mate2.fastq\n         #else:\n             \'${pairstraight.libtype.strandedness}\'\n-            -i $index_path\n-            -r zcat ./unmate.fastq\n+            --index $index_path\n+            --unmatedReads ./unmate.fastq\n         #end if\n         -o ./output\n-        -p "\\${GALAXY_SLOTS:-4}"\n+        -p "\\$SLOTS"\n'..b'    </collection>\n+                </param>\n+                <conditional name="libtype">\n+                    <param name="orientation" value="I"/>\n+                    <param name="strandedness" value="SR"/>\n+                </conditional>\n             </conditional>\n             <conditional name="protocol_cond">\n                 <param name="protocol" value="--chromium"/>\n@@ -307,10 +310,11 @@\n                 <assert_contents>\n                     <has_text text="MatrixMarket" />\n                     <has_n_columns n="5" />\n-                    <has_n_lines n="105" />\n+                    <has_n_lines n="101" />\n                 </assert_contents>\n             </output>\n         </test>\n+        <!-- https://github.com/COMBINE-lab/salmon/issues/992\n         <test expect_num_outputs="8">\n             <conditional name="refTranscriptSource">\n                 <param name="TranscriptSource" value="history"/>\n@@ -320,13 +324,19 @@\n             </conditional>\n             <conditional name="pairstraight">\n                 <param name="readselect" value="paired"/>\n-                <param name="file1" value="fastqs/moreminifastq1.fastq.gz"/>\n-                <param name="file2" value="fastqs/moreminifastq2.fastq.gz"/>\n-                <param name="orientation" value="I"/>\n-                <param name="strandedness" value="SR"/>\n+                <param name="mates">\n+                    <collection type="paired" name="mates">\n+                        <element name="forward" value="fastqs/moreminifastq1.fastq.gz"/>\n+                        <element name="reverse" value="fastqs/moreminifastq2.fastq.gz"/>\n+                    </collection>\n+                </param>\n+                <conditional name="libtype">\n+                    <param name="orientation" value="I"/>\n+                    <param name="strandedness" value="SR"/>\n+                </conditional>\n             </conditional>\n             <conditional name="protocol_cond">\n-                <param name="protocol" value="-\\-indropV2"/>\n+                <param name="protocol" value="\\-\\-indropV2"/>\n                 <param name="w1" value="ATCAT"/>\n             </conditional>\n             <param name="tgmap" value="minitxp.tsv"/>\n@@ -343,7 +353,7 @@\n                     <has_n_lines n="105" />\n                 </assert_contents>\n             </output>\n-        </test>\n+        </test> -->\n         <test expect_num_outputs="14">\n             <conditional name="refTranscriptSource">\n                 <param name="TranscriptSource" value="history"/>\n@@ -353,10 +363,16 @@\n             </conditional>\n             <conditional name="pairstraight">\n                 <param name="readselect" value="paired"/>\n-                <param name="file1" value="fastqs/moreminifastq1.fastq.gz"/>\n-                <param name="file2" value="fastqs/moreminifastq2.fastq.gz"/>\n-                <param name="orientation" value="I"/>\n-                <param name="strandedness" value="SR"/>\n+                <param name="mates">\n+                    <collection type="paired" name="mates">\n+                        <element name="forward" value="fastqs/moreminifastq1.fastq.gz"/>\n+                        <element name="reverse" value="fastqs/moreminifastq2.fastq.gz"/>\n+                    </collection>\n+                </param>\n+                <conditional name="libtype">\n+                    <param name="orientation" value="I"/>\n+                    <param name="strandedness" value="SR"/>\n+                </conditional>\n             </conditional>\n             <conditional name="protocol_cond">\n                 <param name="protocol" value="--chromium"/>\n@@ -370,7 +386,7 @@\n                 <assert_contents>\n                     <has_text text="MatrixMarket" />\n                     <has_n_columns n="5" />\n-                    <has_n_lines n="17" />\n+                    <has_n_lines n="16" />\n                 </assert_contents>\n             </output>\n             <output name="salmon_quant_log" ftype="txt">\n'
b
diff -r b0fe3e482cb7 -r 4dbb23a9fccc macros.xml
--- a/macros.xml Mon Oct 28 17:50:35 2024 +0000
+++ b/macros.xml Wed Oct 29 10:47:09 2025 +0000
[
b'@@ -1,8 +1,8 @@\n <macros>\n     <token name="@TOOL_VERSION@">1.10.1</token>\n-    <token name="@VERSION_SUFFIX@">2</token>\n+    <token name="@VERSION_SUFFIX@">3</token>\n     <token name="@IDX_VERSION@">q7</token>\n-    <token name="@PROFILE_VERSION@">20.01</token>\n+    <token name="@PROFILE_VERSION@">24.1</token>\n     <xml name="xrefs">\n         <xrefs>\n             <xref type="bio.tools">salmon</xref>\n@@ -19,8 +19,11 @@\n             <requirement type="package" version="1.9.3">scipy</requirement>\n         </requirements>\n     </xml>\n+    <xml name="version_command">\n+        <version_command><![CDATA[salmon --no-version-check --version | cut -d" " -f2]]></version_command>\n+    </xml>\n     <xml name="orient">\n-        <param name="orientation" type="select" label="Relative orientation of reads within a pair">\n+        <param argument="--libType" 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             <option value="O">Mates are oriented away from each other (O = outward)</option>\n             <option value="I" selected="True">Mates are oriented toward each other (I = inward)</option>\n@@ -28,7 +31,7 @@\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+            <param argument="--libType" 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@@ -68,7 +71,7 @@\n                 <option value="history" selected="True">Use one from the history</option>\n             </param>\n             <when value="indexed">\n-                <param name="index" type="select" label="Select a reference transcriptome" help="If your transcriptome of interest is not listed, contact your Galaxy admin">\n+                <param argument="--index" type="select" label="Select a reference transcriptome" help="If your transcriptome of interest is not listed, contact your Galaxy admin">\n                     <options from_data_table="salmon_indexes_versioned">\n                         <filter type="sort_by" column="2"/>\n                         <filter type="static_value" column="4" value="@IDX_VERSION@" />\n@@ -78,14 +81,11 @@\n             </when>  <!-- build-in -->\n             <when value="history">\n                 <section name="s_index" title="Salmon index" expanded="true">\n-                    <param name="fasta" type="data" format="fasta" label="Transcripts FASTA file"/>\n-                    <param name="genome" type="data" format="fasta" optional="true" label="Reference genome" \n+                    <param argument="--transcripts" name="fasta" type="data" format="fasta" label="Transcripts FASTA file"/>\n+                    <param argument="--genome" type="data" format="fasta" optional="true" label="Reference genome" \n                         help="The reference genome is required for generating a decoy-away index. The decoy sequences are regions of the target genome \n                             that are sequence similar to annotated transcripts. These are the regions of the genome most likely to cause mismapping." />\n-                    <param name="kmer" type="integer" value="31" label="Kmer length"/>\n-                    <param name="phash" type="boolean" label="Perfect Hash" truevalue="--perfectHash" falsevalue="" checked="false"\n-                        help="Build the index using a perfect hash rather than a dense hash.  This will require less memory (especially during quantification), \n-                            but will take longer to construct"/>\n+                    <param argument="--kmerLen'..b' #if $quant_type.input.single_or_paired.single_or_paired_opts == \'single\':\n                 --libType ${quant_type.input.single_or_paired.libtype.strandedness}\n@@ -431,28 +375,18 @@\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-                        --mates2 <(bzcat < ./mate1.$ext | seqtk seq -2)\n-                    #else:\n-                        --mates1 <(seqtk seq -1 ./mate1.$ext)\n-                        --mates2 <(seqtk seq -2 ./mate1.$ext)\n-                    #end if\n+                #if $compressed == \'GZ\':\n+                    --mates1 <(zcat < ./mate1.$ext)\n+                    --mates2 <(zcat < ./mate2.$ext)\n+                #else if $compressed == \'BZ2\':\n+                    --mates1 <(bzcat < ./mate1.$ext)\n+                    --mates2 <(bzcat < ./mate2.$ext)\n                 #else:\n-                    #if $compressed == \'GZ\':\n-                        --mates1 <(zcat < ./mate1.$ext)\n-                        --mates2 <(zcat < ./mate2.$ext)\n-                    #else if $compressed == \'BZ2\':\n-                        --mates1 <(bzcat < ./mate1.$ext)\n-                        --mates2 <(bzcat < ./mate2.$ext)\n-                    #else:\n-                        --mates1 ./mate1.$ext\n-                        --mates2 ./mate2.$ext\n-                    #end if\n+                    --mates1 ./mate1.$ext\n+                    --mates2 ./mate2.$ext\n                 #end if\n             #end if\n-            --threads "\\${GALAXY_SLOTS:-4}"\n+            --threads "\\$SLOTS"\n             ${quant_type.discardOrphansQuasi}\n             ${quant_type.validmap.validateMappings}\n             #if $quant_type.validmap.validateMappings:\n@@ -497,12 +431,12 @@\n         #if $geneMap:\n             ln -s "$geneMap" ./geneMap.${geneMap.ext} &&\n         #end if\n-        salmon quant\n-        -t \'${quant_type.transcript}\'\n-        -l \'${quant_type.libtype.strandedness}\'\n-        -a \'${quant_type.afile}\'\n+        salmon --no-version-check quant\n+        --targets \'${quant_type.transcript}\'\n+        --libType \'${quant_type.libtype.strandedness}\'\n+        --alignments \'${quant_type.afile}\'\n         $quant_type.ont\n-        --threads "\\${GALAXY_SLOTS:-4}"\n+        --threads "\\$SLOTS"\n         ${quant_type.discardOrphans}\n         ${quant_type.noErrorModel}\n         #if $quant_type.numErrorBins:\n@@ -590,33 +524,7 @@\n         -o ./output\n         ]]>\n     </token>\n-    <token name="@qmerge@"><![CDATA[\n-        #import re\n \n-        #for $counter, $input_data in enumerate($quantfiles):\n-            rank_of_series=$counter\n-            mkdir ${counter}.quantmerge &&\n-            ln -s $input_data.quants ${counter}.quantmerge/quant.sf &&\n-        #end for\n-        salmon quantmerge\n-            --quants *.quantmerge\n-            --names\n-            #for $counter, $input_data in enumerate($quantfiles):\n-                #if $input_data.names and re.sub(\' \', \'\', \'$input_data.names\') != \'\':\n-                    \'${input_data.names}\'\n-                #else:\n-                    #set $identifier=re.sub(\'[^\\w\\-\\s]\', \'_\', str($input_data.quants.element_identifier))\n-                    "$identifier"\n-               #end if\n-            #end for\n-            --column \'${column}\'\n-            ${genes}\n-            #if $missing:\n-                --missing \'${missing}\'\n-            #end if\n-            -o qmergeout.tab\n-        ]]>\n-    </token>\n     <token name="@salmonhelp@"><![CDATA[\n         Salmon is a lightweight method for quantifying transcript abundance from RNA\xe2\x80\x93seq reads, combining a dual-phase parallel inference algorithm and feature-rich bias models with an ultra-fast read mapping procedure.\n \n'
b
diff -r b0fe3e482cb7 -r 4dbb23a9fccc test-data/full_data_structure.txt
--- a/test-data/full_data_structure.txt Mon Oct 28 17:50:35 2024 +0000
+++ b/test-data/full_data_structure.txt Wed Oct 29 10:47:09 2025 +0000
b
@@ -544,7 +544,7 @@
 8 198 199 200 201 202 203 204 205 1 1 32 1 TACGGGCTGC 1
 1 170 1 1 21 1 GAACATTTGT 1
 3 29 30 31 2 2 34 1 CGGCGTCCGG 1 1 1 AGCGGCTGGT 1
-11 5 6 7 8 9 10 11 12 13 14 16 1 1 93 1 TTGACACCAT 1
+1 16 1 1 93 1 TTGACACCAT 1
 1 146 1 1 46 1 AACACAGATA 1
 4 287 289 291 293 2 2 140 1 CCGTACGGGG 1 35 1 GGATTCAGTA 1
 3 273 274 275 1 1 86 1 CCGACTCGTT 1
b
diff -r b0fe3e482cb7 -r 4dbb23a9fccc umiout.sh
--- a/umiout.sh Mon Oct 28 17:50:35 2024 +0000
+++ b/umiout.sh Wed Oct 29 10:47:09 2025 +0000
b
@@ -1,11 +1,14 @@
 #!/usr/bin/bash
 
-mkdir fixed;
+set -e
+
+mkdir -p fixed;
 for file in ./umiout/*;
-do prefix="${file%.dot.gz}";
-prefix=${prefix/.\/umiout\//};
-gunzip $file;
-sed "s/umiout\/$prefix.dot.gz/$prefix/" umiout/$prefix.dot > fixed/$prefix.dot;
-dot -Tpdf fixed/$prefix.dot -o fixed/$prefix.pdf;
+do
+prefix="${file%.dot.gz}";
+prefix="${prefix/.\/umiout\//}";
+gunzip "$file";
+sed "s/umiout\/$prefix.dot.gz/$prefix/" "umiout/$prefix.dot" > "fixed/$prefix.dot";
+dot -Tpdf "fixed/$prefix.dot" -o "fixed/$prefix.pdf";
 done
 ls fixed