changeset 7:ff78e9c7b0d8 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/salmon commit dee6a6f4aa8cbee9f81692fc6f3a2e4ad1f3abf6"
author bgruening
date Sat, 03 Oct 2020 18:21:49 +0000
parents 53d74155bb52
children 04b494623f8e
files alevin.xml test-data/alevin_mat.mtx test-data/alevin_mat.mtx.gz vpolo_convert.py
diffstat 4 files changed, 152 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/alevin.xml	Mon Jul 13 17:14:54 2020 -0400
+++ b/alevin.xml	Sat Oct 03 18:21:49 2020 +0000
@@ -1,4 +1,4 @@
-<tool id="alevin" name="Alevin" version="@VERSION@+galaxy1">
+<tool id="alevin" name="Alevin" version="@VERSION@+galaxy2">
     <description>Quantification and analysis of 3’ tagged-end single-cell sequencing data</description>
     <macros>
         <import>macros.xml</import>
@@ -97,11 +97,23 @@
 
         #if $optional.dumpMtx != "--dumpMtx":
             && python '$__tool_directory__/vpolo_convert.py' -m
+        #else:
+            && gunzip output/alevin/quants_mat.mtx.gz
         #end if
         #if $optional.dumpUmiGraph:
             && python '$__tool_directory__/vpolo_convert.py' -u
             && sh '$__tool_directory__/umiout.sh'
         #end if
+
+        && gunzip output/alevin/quants_tier_mat.gz
+        #if $optional.numCellBootstraps:
+            && gunzip output/alevin/quants_mean_mat.gz
+            && gunzip output/alevin/quants_var_mat.gz
+        #end if
+
+        && gunzip output/aux_info/fld.gz
+        && gunzip output/aux_info/observed_bias.gz
+        && gunzip output/aux_info/observed_bias_3p.gz
         ]]>
     </command>
     <inputs>
@@ -144,7 +156,8 @@
             <param name="forceCells" type="integer" optional="true" help="Explicitly specify the number of cells."/>
             <param name="expectCells" type="integer" optional="true" help="define a close upper bound on expected number of cells."/>
             <param name="numCellBootstraps" type="integer" optional="true" help="Performs certain number of bootstrap and generate the mean and variance of the count matrix"/>
-            <param name="minScoreFraction" type="float" optional="true" help="This value controls the minimum allowed score for a mapping to be considered valid. It matters only when --validateMappings has been passed to Salmon. The maximum possible score for a fragment is ms = read_len * ma (or ms = (left_read_len + right_read_len) * ma for paired-end reads). The argument to --minScoreFraction determines what fraction of the maximum score s a mapping must achieve to be potentially retained. For a minimum score fraction of f, only mappings with a score less than (f * s) will be kept. Mappings with lower scores will be considered as low-quality, and will be discarded."/>
+            <param name="minScoreFraction" type="float" optional="true" help="This value controls the minimum allowed score for a mapping to be considered valid. It matters only when --validateMappings has been passed to Salmon. The maximum possible score for a fragment is ms = read_len * ma (or ms = (left_read_len + right_read_len) * ma for paired-end reads).
+                The argument to --minScoreFraction determines what fraction of the maximum score s a mapping must achieve to be potentially retained. For a minimum score fraction of f, only mappings with a score less than (f * s) will be kept. Mappings with lower scores will be considered as low-quality, and will be discarded."/>
             <param name="keepCBFraction" type="float" optional="true" help="Fraction of cellular barcodes to keep (Between 0 and 1)."/>
             <param name="lowRegionMinNumBarcodes" type="integer" optional="true" help="Minimum number of cell barcodes to use fo learning low confidence region (defaults to 200)"/>
             <param name="maxNumBarcodes" type="integer" optional="true" help="Maximum allowable limit to process the cell barcodes. Defaults to 100000"/>
@@ -155,7 +168,7 @@
         <data name="quants_mat.tsv" label="quants_mat.tsv" format="txt" from_work_dir="quants_mat.tsv">
             <filter>optional["dumpMtx"] is not True</filter>
         </data>
-        <data name="quants_mat.mtx.gz" label="quants_mat.mtx.gz" format="mtx" from_work_dir="output/alevin/quants_mat.mtx.gz">
+        <data name="quants_mat.mtx" label="quants_mat.mtx" format="mtx" from_work_dir="output/alevin/quants_mat.mtx">
             <filter>optional["dumpMtx"]</filter>
         </data>
         <data name="raw_cb_frequency.txt" label="raw_cb_frequency.txt" format="txt" from_work_dir="output/alevin/raw_cb_frequency.txt">
@@ -163,7 +176,7 @@
         </data>
         <data name="quants_mat_cols.txt" label="quants_mat_cols.txt" format="txt" from_work_dir="output/alevin/quants_mat_cols.txt"/>
         <data name="quants_mat_rows.txt" label="quants_mat_rows.txt" format="txt" from_work_dir="output/alevin/quants_mat_rows.txt"/>
-        <data name="quants_tier_mat.gz" label="quants_tier_mat.gz" format="mtx" from_work_dir="output/alevin/quants_tier_mat.gz"/>
+        <data name="quants_tier_mat" label="quants_tier_mat" format="mtx" from_work_dir="output/alevin/quants_tier_mat"/>
         <data name="alevin.log" label="alevin.log" format="txt" from_work_dir="output/alevin/alevin.log">
             <filter>allout</filter>
         </data>
@@ -172,10 +185,10 @@
         <data name="bfh.txt" label="bfh.txt" format="txt" from_work_dir="output/alevin/bfh.txt">
             <filter>optional["dumpBfh"]</filter>
         </data>
-        <data name="quants_mean_mat.gz" label="quants_mean_mat.gz" format="mtx" from_work_dir="output/alevin/quants_mean_mat.gz">
+        <data name="quants_mean_mat" label="quants_mean_mat" format="mtx" from_work_dir="output/alevin/quants_mean_mat">
             <filter>optional["numCellBootstraps"]</filter>
         </data>
-        <data name="quants_var_mat.gz" label="quants_var_mat.gz" format="mtx" from_work_dir="output/alevin/quants_var_mat.gz">
+        <data name="quants_var_mat" label="quants_var_mat" format="mtx" from_work_dir="output/alevin/quants_var_mat">
             <filter>optional["numCellBootstraps"]</filter>
         </data>
         <data name="quants_boot_rows.txt" label="quants_boot_rows.txt" format="txt" from_work_dir="output/alevin/quants_boot_rows.txt">
@@ -190,9 +203,9 @@
         <data name="meta_info.json" format="json" label="meta_info.json" from_work_dir="output/aux_info/meta_info.json">
             <filter>allout</filter>
         </data>
-        <data name="expected_bias.gz" format="txt" label="expected_bias.gz" from_work_dir="output/aux_info/fld.gz"/>
-        <data name="observed_bias.gz" format="txt" label="observed_bias.gz" from_work_dir="output/aux_info/observed_bias.gz"/>
-        <data name="observed_bias_3p.gz" format="txt" label="observed_bias_3p.gz" from_work_dir="output/aux_info/observed_bias_3p.gz"/>
+        <data name="expected_bias" format="txt" label="expected_bias" from_work_dir="output/aux_info/fld"/>
+        <data name="observed_bias" format="txt" label="observed_bias" from_work_dir="output/aux_info/observed_bias"/>
+        <data name="observed_bias_3p" format="txt" label="observed_bias_3p" from_work_dir="output/aux_info/observed_bias_3p"/>
         <data name="flenDist.txt" format="txt" label="flenDist.txt" from_work_dir="output/libParams/flenDist.txt"/>
         <data name="salmon_quant.log" format="txt" label="salmon_quant.log" from_work_dir="output/logs/salmon_quant.log">
             <filter>allout</filter>
@@ -223,7 +236,32 @@
             <param name="freqThreshold" value="5"/>
             <param name="dumpFeatures" value="Yes"/>
             <param name="keepCBFraction" value="1"/>
-            <output name="quants_mat.mtx.gz" file="alevin_mat.mtx.gz" ftype="mtx" compare="sim_size"/>
+            <output name="quants_mat.mtx" file="alevin_mat.mtx" ftype="mtx"/>
+        </test>
+        <test expect_num_outputs="14">
+            <conditional name="refTranscriptSource">
+                <param name="TranscriptSource" value="history"/>
+                <section name="s_index">
+                    <param name="fasta" value="minitranscript.fa"/>
+                </section>
+            </conditional>
+            <conditional name="pairstraight">
+                <param name="readselect" value="paired"/>
+                <param name="file1" value="fastqs/moreminifastq1.fastq.gz"/>
+                <param name="file2" value="fastqs/moreminifastq2.fastq.gz"/>
+                <param name="orientation" value="I"/>
+                <param name="strandedness" value="SR"/>
+            </conditional>
+            <param name="protocol" value="--chromium"/>
+            <param name="tgmap" value="minitxp.tsv"/>
+            <param name="dumpMtx" value="Yes"/>
+            <param name="freqThreshold" value="5"/>
+            <param name="dumpFeatures" value="Yes"/>
+            <param name="keepCBFraction" value="1"/>
+            <section name="optional">
+                <param name="numCellBootstraps" value="2"/>
+            </section>
+            <output name="quants_mat.mtx" file="alevin_mat.mtx" ftype="mtx"/>
         </test>
     </tests>
     <help><![CDATA[
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/alevin_mat.mtx	Sat Oct 03 18:21:49 2020 +0000
@@ -0,0 +1,101 @@
+%%MatrixMarket	matrix	coordinate	real	general
+95	61	99
+1	9	1.000000
+2	28	1.000000
+3	38	1.000000
+4	28	1.000000
+5	42	1.000000
+6	9	1.000000
+7	56	1.000000
+8	28	1.000000
+9	28	1.000000
+10	30	1.000000
+11	53	1.000000
+12	4	1.000000
+13	28	1.000000
+14	56	1.000000
+15	9	1.000000
+16	43	0.500000
+16	45	0.500000
+17	42	0.500000
+17	44	0.500000
+18	28	1.000000
+19	46	1.000000
+20	38	1.000000
+21	40	1.000000
+22	19	1.000000
+23	9	1.000000
+24	56	1.000000
+25	8	1.000000
+26	28	1.000000
+27	53	1.000000
+28	56	1.000000
+29	28	1.000000
+30	30	1.000000
+31	38	1.000000
+32	28	1.000000
+33	30	1.000000
+34	34	1.000000
+35	30	1.000000
+36	28	1.000000
+37	34	1.000000
+38	16	1.000000
+39	19	1.000000
+40	47	1.000000
+41	38	1.000000
+42	28	1.000000
+43	56	1.000000
+44	28	1.000000
+45	9	1.000000
+46	19	1.000000
+47	23	1.000000
+48	43	0.500000
+48	45	0.500000
+49	38	1.000000
+50	57	1.000000
+51	40	1.000000
+52	38	1.000000
+53	19	1.000000
+54	16	1.000000
+55	15	1.000000
+56	56	1.000000
+57	53	1.000000
+58	30	1.000000
+59	9	1.000000
+60	34	1.000000
+61	30	1.000000
+62	24	1.000000
+63	30	1.000000
+64	56	1.000000
+65	9	1.000000
+66	23	1.000000
+67	61	1.000000
+68	38	1.000000
+69	21	1.000000
+70	38	1.000000
+71	38	1.000000
+72	16	1.000000
+73	30	1.000000
+74	16	1.000000
+75	30	1.000000
+76	40	1.000000
+77	52	1.000000
+78	53	1.000000
+79	42	0.500000
+79	44	0.500000
+80	34	1.000000
+81	9	1.000000
+82	15	1.000000
+83	45	1.000000
+84	47	1.000000
+85	40	1.000000
+86	56	1.000000
+87	56	1.000000
+88	34	1.000000
+89	56	1.000000
+90	38	1.000000
+91	53	1.000000
+92	56	1.000000
+93	53	1.000000
+94	38	1.000000
+95	53	1.000000
Binary file test-data/alevin_mat.mtx.gz has changed
--- a/vpolo_convert.py	Mon Jul 13 17:14:54 2020 -0400
+++ b/vpolo_convert.py	Sat Oct 03 18:21:49 2020 +0000
@@ -1,8 +1,9 @@
 #!/usr/bin/env python
+import argparse
+import os
 
 from vpolo.alevin import parser as par
-import argparse
-import os
+
 
 parser = argparse.ArgumentParser()
 parser.add_argument("--mtx", "-m", action="store_true", help="--dumpMtx flag set")