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

Changeset 1:5182e1a99313 (2019-04-04)
Previous changeset 0:8529c9fd63ad (2019-04-02) Next changeset 2:49b819f88c2b (2019-07-16)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/blob/master/tools/tb-profiler commit 761cc6083b4db7e69ddf03033bc8659b08e16f74
modified:
tb_profiler_profile.xml
added:
test-data/rif_resistant.bam
b
diff -r 8529c9fd63ad -r 5182e1a99313 tb_profiler_profile.xml
--- a/tb_profiler_profile.xml Tue Apr 02 09:03:16 2019 -0400
+++ b/tb_profiler_profile.xml Thu Apr 04 13:52:45 2019 -0400
[
b'@@ -4,82 +4,164 @@\n         <requirement type="package" version="2.1.0">tb-profiler</requirement>\n     </requirements>\n     <command detect_errors="exit_code"><![CDATA[\n+        #if str($fastq_or_bam.input_select.value) in ("paired_fastq", "paired_collection_fastq", "single_fastq")\n+            #if str($fastq_or_bam.input_select.value) == "paired_fastq"\n+                #set r1_ext = $fastq_or_bam.read1.extension\n+                #set r2_ext = $fastq_or_bam.read2.extension\n+                ln -s \'$fastq_or_bam.read1\' fastq_r1.\'$r1_ext\' &&\n+                ln -s \'$fastq_or_bam.read2\' fastq_r2.\'$r2_ext\' &&\n+            #else if str($fastq_or_bam.input_select.value) == "single_fastq"\n+                #set r1_ext = $fastq_or_bam.fastq.extension\n+                ln -s \'$fastq_or_bam.fastq\' fastq_r1.\'$r1_ext\' &&\n+            #else if str($fastq_or_bam.input_select.value) == "paired_collection_fastq"\n+                #set r1_ext = $fastq_or_bam.fastq_collection.forward.extension\n+                #set r2_ext = $fastq_or_bam.fastq_collection.reverse.extension\n+                ln -s \'$fastq_or_bam.fastq_collection.forward\' fastq_r1.\'$r1_ext\' &&\n+                ln -s \'$fastq_or_bam.fastq_collection.reverse\' fastq_r2.\'$r2_ext\' &&\n+            #end if\n+        #else if str($fastq_or_bam.input_select.value) == "bam"\n+            ln -s \'$fastq_or_bam.bam_input\' input.bam &&\n+        #end if\n+\n         tb-profiler profile\n             \n             --platform \'${platform.value}\'\n \n-            #if $fastq_or_bam.input_select.value == "fastq":\n-                --read1 \'${read1}\'\n-\n-                #if $read2:\n-                    --read2 \'${read2}\'\n-                #end if\n+        #if str($fastq_or_bam.input_select.value) in ("paired_fastq", "paired_collection_fastq", "single_fastq")\n+            -1 fastq_r1.\'$r1_ext\'\n+        #end if\n+        #if str($fastq_or_bam.input_select.value) in ("paired_fastq", "paired_collection_fastq")\n+            -2 fastq_r2.\'$r1_ext\'\n+        #else if str($fastq_or_bam.input_select.value) == "bam"\n+            --bam input.bam\n+        #end if\n \n-            #else if $fastq_or_bam.input_select.value == "bam":\n-                --bam \'${bam_input}\'\n-            #end if \n+            --threads "\\${GALAXY_SLOTS:-1}"\n+        #if $advanced.options == \'yes\'\n+            --call_method \'${advanced.call_method}\'\n+            --min_gene_frac \'${advanced.min_gene_frac}\'\n+            --mapper \'${advanced.mapper}\'\n+            --min_depth \'${advanced.min_depth}\'\n+        #end if\n \n-            --call_method \'${call_method}\'\n-            --min_depth \'${min_depth}\'\n-            --threads "\\${GALAXY_SLOTS:-1}"\n-            --mapper \'${mapper}\'\n-            --min_gene_frac \'${min_gene_frac}\'\n-\n-            #if $txt:\n-                --txt\n-            #end if\n+        #if $output_format == "pdf"\n+            --pdf\n+        #else if $output_format == "txt"\n+            --txt\n+        #end if\n+        && mv results/tbprofiler.results.json $results_json\n+        #if str($fastq_or_bam.input_select) != "bam"\n+            && mv bam/tbprofiler.bam \'${output_bam}\'\n+        #end if\n+        && bcftools view -Ov -o\'${output_vcf}\' vcf/tbprofiler.targets.csq.bcf\n+        #if $output_format == "pdf"\n+            && mv results/tbprofiler.results.pdf \'${output_pdf}\'\n+        #else if $output_format == "txt"\n+            && mv results/tbprofiler.results.txt \'${output_txt}\'\n+        #end if \n \n     ]]></command>\n     <inputs>\n         <param name="platform" type="select" label="Platform">\n             <option value="Illumina" selected="true">Illumina</option>\n-            <option value="minION">minION</option>\n+            <option value="minION">MinION</option>\n         </param>\n         <conditional name="fastq_or_bam">\n             <param name="input_select" type="select" label="Input File Type">\n-                <option value="fastq">fastq</option>\n-                <option value="bam">bam</option>\n+                <option value="paired_fastq'..b'toff will be marked as missing (default: 10)"/>\n+                <param name="mapper" label="Mapper" type="select" help="Mapping tools to use (default: bwa)">\n+                    <option value="bwa" selected="true">bwa</option>\n+                    <option value="minimap2">minimap2</option>\n+                    <option value="bowtie2">bowtie2</option>\n+                </param>\n+                <param name="min_gene_frac" label="Minimum Gene Fraction" type="float" value="0.9" help="Used to infer a deletion if the fraction of a gene covered falls below this value. Also used to see if sample is high quality to continue by checking the fraction for rpoB (where deletion should not occur). (default: 0.9)" />\n+            </when>\n+        </conditional>\n     </inputs>\n     <outputs>\n         <data name="results_json" format="json" from_work_dir="results/tbprofiler.results.json" label="${tool.name} on ${on_string}: Results.json"/>\n-        <data name="results_txt" format="txt" from_work_dir="results/tbprofiler.results.txt" label="${tool.name} on ${on_string}: Results.txt">\n-            <filter>txt</filter>\n+        <data format="vcf" name="output_vcf" label="${tool.name} VCF on ${on_string}" />\n+        <data format="bam" name="output_bam" label="${tool.name} BAM on ${on_string}">\n+            <filter>fastq_or_bam[\'input_select\'] != \'bam\'</filter>\n         </data>\n+        <data format="pdf" name="output_pdf" label="${tool.name} PDF report on ${on_string}">\n+            <filter>output_format == \'pdf\'</filter>\n+        </data>\n+        <data format="txt" name="output_txt" label="${tool.name} report on ${on_string}">\n+            <filter>output_format == \'txt\'</filter>\n+        </data>\n+\n     </outputs>\n     <tests>\n-        <test expect_num_outputs="1">\n-            <param name="read1" value="rif_resistant.fastq.gz"/>\n-            <output name="results_json" value="results_1.json"/>\n+        <test>\n+            <param name="input_select" value="single_fastq"/>\n+            <param name="fastq" ftype="fastq.gz" value="rif_resistant.fastq.gz" />\n+            <param name="output_format" value="txt" />\n+            <param name="platform" value="Illumina" />\n+            <param name="options" value="no" />\n+            <output name="output_txt">\n+                <assert_contents>\n+                    <has_line line="Drug-resistance: Drug-resistant" />\n+\t\t    <has_line line="lineage2.2.2&#009;1.000&#009;East-Asian (Beijing)&#009;Beijing-RD105/RD207&#009;RD105;RD207" />\n+                    <has_line line="rifampicin&#009;R&#009;rpoB p.Asp435Val (1.00)" />\n+                    <has_line line="763031&#009;Rv0667&#009;c.3225T>C&#009;1.000" />\n+                </assert_contents>\n+            </output>\n         </test>\n-        <test expect_num_outputs="2">\n-            <param name="read1" value="rif_resistant.fastq.gz"/>\n-            <param name="txt" value="true"/>\n-            <param name="call_method" value="high"/>\n-            <param name="min_depth" value="11"/>\n-            <output name="results_json" value="results_2.json"/>\n-            <output name="results_txt" value="results_2.txt"/>\n+        <test>\n+            <param name="input_select" value="bam"/>\n+            <param name="bam_input" ftype="bam" value="rif_resistant.bam" />\n+            <param name="output_format" value="txt" />\n+            <param name="platform" value="Illumina" />\n+            <param name="options" value="no" />\n+            <output name="output_txt">\n+                <assert_contents>\n+                    <has_line line="Drug-resistance: Drug-resistant" />\n+\t\t    <has_line line="lineage2.2.2&#009;1.000&#009;East-Asian (Beijing)&#009;Beijing-RD105/RD207&#009;RD105;RD207" />\n+                    <has_line line="rifampicin&#009;R&#009;rpoB p.Asp435Val (1.00)" />\n+                    <has_line line="763031&#009;Rv0667&#009;c.3225T>C&#009;1.000" />\n+                </assert_contents>\n+            </output>\n         </test>\n     </tests>\n     <help><![CDATA[    \n'
b
diff -r 8529c9fd63ad -r 5182e1a99313 test-data/rif_resistant.bam
b
Binary file test-data/rif_resistant.bam has changed