changeset 0:8529c9fd63ad draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/blob/master/tools/tb-profiler commit ef7cfd0c271f1ec40d3df3be4c91bb71028e85e8
author iuc
date Tue, 02 Apr 2019 09:03:16 -0400
parents
children 5182e1a99313
files tb_profiler_profile.xml test-data/results_1.json test-data/results_2.json test-data/results_2.txt test-data/rif_resistant.fastq.gz
diffstat 5 files changed, 178 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tb_profiler_profile.xml	Tue Apr 02 09:03:16 2019 -0400
@@ -0,0 +1,104 @@
+<tool id="tb_profiler_profile" name="TB-Profiler Profile" version="2.1.0">
+    <description>Infer strain types and drug resistance markers from sequences</description>	
+    <requirements>
+        <requirement type="package" version="2.1.0">tb-profiler</requirement>
+    </requirements>
+    <command detect_errors="exit_code"><![CDATA[
+        tb-profiler profile
+            
+            --platform '${platform.value}'
+
+            #if $fastq_or_bam.input_select.value == "fastq":
+                --read1 '${read1}'
+
+                #if $read2:
+                    --read2 '${read2}'
+                #end if
+
+            #else if $fastq_or_bam.input_select.value == "bam":
+                --bam '${bam_input}'
+            #end if 
+
+            --call_method '${call_method}'
+            --min_depth '${min_depth}'
+            --threads "\${GALAXY_SLOTS:-1}"
+            --mapper '${mapper}'
+            --min_gene_frac '${min_gene_frac}'
+
+            #if $txt:
+                --txt
+            #end if
+
+    ]]></command>
+    <inputs>
+        <param name="platform" type="select" label="Platform">
+            <option value="Illumina" selected="true">Illumina</option>
+            <option value="minION">minION</option>
+        </param>
+        <conditional name="fastq_or_bam">
+            <param name="input_select" type="select" label="Input File Type">
+                <option value="fastq">fastq</option>
+                <option value="bam">bam</option>
+            </param>
+            <when value="fastq">
+                <param name="read1" type="data" format="fastq" label="Read1" help="First read file (default: None)"/>
+                <param name="read2" type="data" format="fastq" optional="true" label="Read2" help="Second read file (default: None)"/>
+                </when>
+            <when value="bam">
+                <param name="bam_input" type="data" format="bam" label="Bam" help="Warning!!!: The BAM files must have been created using the ensembl version of the genome."/>
+            </when>
+        </conditional>
+        <param name="call_method" type="select" label="Call Method" help="Level of quality stringency required. (default: low)">
+            <option value="low" selected="true">low</option>
+            <option value="high">high</option>
+            <option value="optimise">optimise</option>
+        </param>
+        <param name="min_depth" label="Min Depth" type="integer" value="10" help="Minimum depth required to call variant. Bases with depth below this cutoff will be marked as missing (default: 10)"/>
+        <param name="mapper" label="Mapper" type="select" help="Mapping tools to use (default: bwa)">
+            <option value="bwa" selected="true">bwa</option>
+            <option value="minimap2">minimap2</option>
+            <option value="bowtie2">bowtie2</option>
+        </param>
+        <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)"/>
+        <param name="txt" label="Generate text file ouput" type="boolean" value="false" help="Create reader-friendly text output in addition to standard JSON output (default: False)"/>
+    </inputs>
+    <outputs>
+        <data name="results_json" format="json" from_work_dir="results/tbprofiler.results.json" label="${tool.name} on ${on_string}: Results.json"/>
+        <data name="results_txt" format="txt" from_work_dir="results/tbprofiler.results.txt" label="${tool.name} on ${on_string}: Results.txt">
+            <filter>txt</filter>
+        </data>
+    </outputs>
+    <tests>
+        <test expect_num_outputs="1">
+            <param name="read1" value="rif_resistant.fastq.gz"/>
+            <output name="results_json" value="results_1.json"/>
+        </test>
+        <test expect_num_outputs="2">
+            <param name="read1" value="rif_resistant.fastq.gz"/>
+            <param name="txt" value="true"/>
+            <param name="call_method" value="high"/>
+            <param name="min_depth" value="11"/>
+            <output name="results_json" value="results_2.json"/>
+            <output name="results_txt" value="results_2.txt"/>
+        </test>
+    </tests>
+    <help><![CDATA[    
+Summary
+=======
+
+The pipeline aligns reads to the H37Rv reference using bowtie2, BWA or minimap2 and then calls variants using SAMtools. These variants are then compared to a drug-resistance database. We also predict the number of reads supporting drug resistance variants as an insight into hetero-resistance (not applicable for minION data).
+
+Produces a JSON output file by default.
+
+    ]]></help>
+    <citations>
+        <citation type="bibtex">
+@UNPUBLISHED{Phelan2016,
+    author = {Phelan, Jody},
+    title = {TBProfiler},
+    year = {2016},
+    url = {https://github.com/jodyphelan/TBProfiler},
+}
+        </citation>
+    </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/results_1.json	Tue Apr 02 09:03:16 2019 -0400
@@ -0,0 +1,1 @@
+{"missing_pos": [["Chromosome", 763404], ["Chromosome", 763405], ["Chromosome", 763406], ["Chromosome", 763407], ["Chromosome", 763408], ["Chromosome", 763409], ["Chromosome", 763410], ["Chromosome", 763411], ["Chromosome", 763412], ["Chromosome", 763413], ["Chromosome", 763414], ["Chromosome", 763415], ["Chromosome", 763416], ["Chromosome", 763417], ["Chromosome", 763418], ["Chromosome", 763419], ["Chromosome", 763420], ["Chromosome", 1834082], ["Chromosome", 1834083], ["Chromosome", 1834084], ["Chromosome", 1834085], ["Chromosome", 1834086], ["Chromosome", 1834087], ["Chromosome", 1834088], ["Chromosome", 1834089], ["Chromosome", 1834090], ["Chromosome", 1834091], ["Chromosome", 1834092], ["Chromosome", 1834093], ["Chromosome", 1834094], ["Chromosome", 1834095], ["Chromosome", 1834251], ["Chromosome", 1834252], ["Chromosome", 1834253], ["Chromosome", 1834254], ["Chromosome", 1834255], ["Chromosome", 1834256], ["Chromosome", 1834257], ["Chromosome", 1834258], ["Chromosome", 1834259], ["Chromosome", 1834260], ["Chromosome", 1834261], ["Chromosome", 1834262], ["Chromosome", 1834263], ["Chromosome", 1834264], ["Chromosome", 1834265], ["Chromosome", 1834266], ["Chromosome", 1834267], ["Chromosome", 1834268], ["Chromosome", 1834269], ["Chromosome", 1834270], ["Chromosome", 1834271], ["Chromosome", 1834272], ["Chromosome", 1834273], ["Chromosome", 4245997], ["Chromosome", 4245998], ["Chromosome", 4245999], ["Chromosome", 4246000], ["Chromosome", 4246001], ["Chromosome", 4246002], ["Chromosome", 4246003], ["Chromosome", 4246004], ["Chromosome", 4246005], ["Chromosome", 4246006], ["Chromosome", 4246007], ["Chromosome", 4246008], ["Chromosome", 4246009], ["Chromosome", 4246010], ["Chromosome", 4246011], ["Chromosome", 4246012], ["Chromosome", 4246155], ["Chromosome", 4246156], ["Chromosome", 4246157], ["Chromosome", 4246158], ["Chromosome", 4246159], ["Chromosome", 4246160], ["Chromosome", 4246161], ["Chromosome", 4246162], ["Chromosome", 4246163], ["Chromosome", 4246164], ["Chromosome", 4246165], ["Chromosome", 4246166], ["Chromosome", 4246167], ["Chromosome", 4246168], ["Chromosome", 4246169], ["Chromosome", 4246170], ["Chromosome", 4246171], ["Chromosome", 4246172], ["Chromosome", 4246173], ["Chromosome", 4246174], ["Chromosome", 4246175], ["Chromosome", 4246176], ["Chromosome", 4246177], ["Chromosome", 4246178], ["Chromosome", 4246179], ["Chromosome", 4246180], ["Chromosome", 4246181], ["Chromosome", 4246182], ["Chromosome", 4246183], ["Chromosome", 4246184], ["Chromosome", 4248018], ["Chromosome", 4248019], ["Chromosome", 4248020], ["Chromosome", 4248021], ["Chromosome", 4248022], ["Chromosome", 4248023], ["Chromosome", 4248024], ["Chromosome", 4248025], ["Chromosome", 4248026], ["Chromosome", 4248027], ["Chromosome", 4248028], ["Chromosome", 4248029], ["Chromosome", 4248030], ["Chromosome", 4248031], ["Chromosome", 4248032], ["Chromosome", 4248033], ["Chromosome", 4248034], ["Chromosome", 4248035], ["Chromosome", 4248036], ["Chromosome", 4248037], ["Chromosome", 4248038], ["Chromosome", 4248039], ["Chromosome", 4248040], ["Chromosome", 4248041], ["Chromosome", 4248042], ["Chromosome", 4248043], ["Chromosome", 4248044], ["Chromosome", 4248045], ["Chromosome", 4248046], ["Chromosome", 4248047], ["Chromosome", 4248184], ["Chromosome", 4248185], ["Chromosome", 4248186], ["Chromosome", 4248187], ["Chromosome", 4248188], ["Chromosome", 4248189], ["Chromosome", 4248190], ["Chromosome", 4248191], ["Chromosome", 4248192], ["Chromosome", 4248193], ["Chromosome", 4248194], ["Chromosome", 4248195], ["Chromosome", 4248196], ["Chromosome", 4248197], ["Chromosome", 4248198], ["Chromosome", 4248199], ["Chromosome", 4248200], ["Chromosome", 4248201], ["Chromosome", 4248202], ["Chromosome", 4248203], ["Chromosome", 4248204], ["Chromosome", 4248205], ["Chromosome", 4248206], ["Chromosome", 4248207], ["Chromosome", 4248208], ["Chromosome", 4248209], ["Chromosome", 4248210], ["Chromosome", 4248211], ["Chromosome", 4248212], ["Chromosome", 4248213], ["Chromosome", 4248214], ["Chromosome", 4248215]], "qc": {"pct_reads_mapped": 87.21, "num_reads_mapped": 5515}, "missing_regions": {"Rv0005": 1.0, "Rv0006": 1.0, "Rv0667": 0.0, "Rv0668": 0.9804707060590886, "Rv0678": 1.0, "Rv0682": 1.0, "Rv0701": 1.0, "Rv1267c": 1.0, "rrs": 1.0, "rrl": 1.0, "Rv1483": 1.0, "Rv1484": 1.0, "Rv1630": 0.9029247044181705, "Rv1694": 1.0, "Rv1908c": 1.0, "Rv2043c": 1.0, "Rv2245": 1.0, "Rv2416c": 1.0, "Rv2428": 1.0, "Rv2447c": 1.0, "Rv2671": 1.0, "Rv2754c": 1.0, "Rv2764c": 1.0, "Rv2780": 1.0, "Rv3261": 1.0, "Rv3423c": 1.0, "Rv3601c": 1.0, "Rv3793": 1.0, "Rv3794": 0.9575037147102526, "Rv3795": 0.9584344660194175, "Rv3854c": 1.0, "Rv3855": 1.0, "Rv3919c": 1.0}, "lineage": [{"lin": "lineage2", "family": "East-Asian", "spoligotype": "Beijing", "rd": "RD105", "frac": 1.0}, {"lin": "lineage2.2", "family": "East-Asian (Beijing)", "spoligotype": "Beijing-RD207", "rd": "RD105;RD207", "frac": 1.0}, {"lin": "lineage2.2.2", "family": "East-Asian (Beijing)", "spoligotype": "Beijing-RD105/RD207", "rd": "RD105;RD207", "frac": 1.0}], "main_lin": "lineage2", "sublin": "lineage2.2.2", "dr_variants": [{"sample": "tbprofiler", "chr": "Chromosome", "genome_pos": 761110, "type": "missense", "change": "p.Asp435Val", "freq": 1.0, "locus_tag": "Rv0667", "gene": "rpoB", "_internal_change": "435D>435V", "drug": "rifampicin"}], "other_variants": [{"sample": "tbprofiler", "chr": "Chromosome", "genome_pos": 763031, "type": "synonymous", "change": "c.3225T>C", "freq": 1.0, "locus_tag": "Rv0667", "gene": "rpoB", "_internal_change": "3225T>C"}, {"sample": "tbprofiler", "chr": "Chromosome", "genome_pos": 1834177, "type": "synonymous", "change": "c.636A>C", "freq": 1.0, "locus_tag": "Rv1630", "gene": "rpsA", "_internal_change": "636A>C"}], "XDR": "", "MDR": "", "drtype": "Drug-resistant", "id": "tbprofiler", "tbprofiler_version": "2.1.1", "pipeline": {"mapper": "bwa", "variant_caller": "BCFtools"}}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/results_2.json	Tue Apr 02 09:03:16 2019 -0400
@@ -0,0 +1,1 @@
+{"missing_pos": [["Chromosome", 763403], ["Chromosome", 763404], ["Chromosome", 763405], ["Chromosome", 763406], ["Chromosome", 763407], ["Chromosome", 763408], ["Chromosome", 763409], ["Chromosome", 763410], ["Chromosome", 763411], ["Chromosome", 763412], ["Chromosome", 763413], ["Chromosome", 763414], ["Chromosome", 763415], ["Chromosome", 763416], ["Chromosome", 763417], ["Chromosome", 763418], ["Chromosome", 763419], ["Chromosome", 763420], ["Chromosome", 1834082], ["Chromosome", 1834083], ["Chromosome", 1834084], ["Chromosome", 1834085], ["Chromosome", 1834086], ["Chromosome", 1834087], ["Chromosome", 1834088], ["Chromosome", 1834089], ["Chromosome", 1834090], ["Chromosome", 1834091], ["Chromosome", 1834092], ["Chromosome", 1834093], ["Chromosome", 1834094], ["Chromosome", 1834095], ["Chromosome", 1834096], ["Chromosome", 1834097], ["Chromosome", 1834098], ["Chromosome", 1834099], ["Chromosome", 1834247], ["Chromosome", 1834248], ["Chromosome", 1834249], ["Chromosome", 1834250], ["Chromosome", 1834251], ["Chromosome", 1834252], ["Chromosome", 1834253], ["Chromosome", 1834254], ["Chromosome", 1834255], ["Chromosome", 1834256], ["Chromosome", 1834257], ["Chromosome", 1834258], ["Chromosome", 1834259], ["Chromosome", 1834260], ["Chromosome", 1834261], ["Chromosome", 1834262], ["Chromosome", 1834263], ["Chromosome", 1834264], ["Chromosome", 1834265], ["Chromosome", 1834266], ["Chromosome", 1834267], ["Chromosome", 1834268], ["Chromosome", 1834269], ["Chromosome", 1834270], ["Chromosome", 1834271], ["Chromosome", 1834272], ["Chromosome", 1834273], ["Chromosome", 4245997], ["Chromosome", 4245998], ["Chromosome", 4245999], ["Chromosome", 4246000], ["Chromosome", 4246001], ["Chromosome", 4246002], ["Chromosome", 4246003], ["Chromosome", 4246004], ["Chromosome", 4246005], ["Chromosome", 4246006], ["Chromosome", 4246007], ["Chromosome", 4246008], ["Chromosome", 4246009], ["Chromosome", 4246010], ["Chromosome", 4246011], ["Chromosome", 4246012], ["Chromosome", 4246013], ["Chromosome", 4246014], ["Chromosome", 4246015], ["Chromosome", 4246016], ["Chromosome", 4246017], ["Chromosome", 4246018], ["Chromosome", 4246019], ["Chromosome", 4246153], ["Chromosome", 4246154], ["Chromosome", 4246155], ["Chromosome", 4246156], ["Chromosome", 4246157], ["Chromosome", 4246158], ["Chromosome", 4246159], ["Chromosome", 4246160], ["Chromosome", 4246161], ["Chromosome", 4246162], ["Chromosome", 4246163], ["Chromosome", 4246164], ["Chromosome", 4246165], ["Chromosome", 4246166], ["Chromosome", 4246167], ["Chromosome", 4246168], ["Chromosome", 4246169], ["Chromosome", 4246170], ["Chromosome", 4246171], ["Chromosome", 4246172], ["Chromosome", 4246173], ["Chromosome", 4246174], ["Chromosome", 4246175], ["Chromosome", 4246176], ["Chromosome", 4246177], ["Chromosome", 4246178], ["Chromosome", 4246179], ["Chromosome", 4246180], ["Chromosome", 4246181], ["Chromosome", 4246182], ["Chromosome", 4246183], ["Chromosome", 4246184], ["Chromosome", 4248018], ["Chromosome", 4248019], ["Chromosome", 4248020], ["Chromosome", 4248021], ["Chromosome", 4248022], ["Chromosome", 4248023], ["Chromosome", 4248024], ["Chromosome", 4248025], ["Chromosome", 4248026], ["Chromosome", 4248027], ["Chromosome", 4248028], ["Chromosome", 4248029], ["Chromosome", 4248030], ["Chromosome", 4248031], ["Chromosome", 4248032], ["Chromosome", 4248033], ["Chromosome", 4248034], ["Chromosome", 4248035], ["Chromosome", 4248036], ["Chromosome", 4248037], ["Chromosome", 4248038], ["Chromosome", 4248039], ["Chromosome", 4248040], ["Chromosome", 4248041], ["Chromosome", 4248042], ["Chromosome", 4248043], ["Chromosome", 4248044], ["Chromosome", 4248045], ["Chromosome", 4248046], ["Chromosome", 4248047], ["Chromosome", 4248048], ["Chromosome", 4248049], ["Chromosome", 4248050], ["Chromosome", 4248051], ["Chromosome", 4248052], ["Chromosome", 4248181], ["Chromosome", 4248182], ["Chromosome", 4248183], ["Chromosome", 4248184], ["Chromosome", 4248185], ["Chromosome", 4248186], ["Chromosome", 4248187], ["Chromosome", 4248188], ["Chromosome", 4248189], ["Chromosome", 4248190], ["Chromosome", 4248191], ["Chromosome", 4248192], ["Chromosome", 4248193], ["Chromosome", 4248194], ["Chromosome", 4248195], ["Chromosome", 4248196], ["Chromosome", 4248197], ["Chromosome", 4248198], ["Chromosome", 4248199], ["Chromosome", 4248200], ["Chromosome", 4248201], ["Chromosome", 4248202], ["Chromosome", 4248203], ["Chromosome", 4248204], ["Chromosome", 4248205], ["Chromosome", 4248206], ["Chromosome", 4248207], ["Chromosome", 4248208], ["Chromosome", 4248209], ["Chromosome", 4248210], ["Chromosome", 4248211], ["Chromosome", 4248212], ["Chromosome", 4248213], ["Chromosome", 4248214], ["Chromosome", 4248215]], "qc": {"pct_reads_mapped": 87.21, "num_reads_mapped": 5515}, "missing_regions": {"Rv0005": 1.0, "Rv0006": 1.0, "Rv0667": 0.0, "Rv0668": 0.9807210816224337, "Rv0678": 1.0, "Rv0682": 1.0, "Rv0701": 1.0, "Rv1267c": 1.0, "rrs": 1.0, "rrl": 1.0, "Rv1483": 1.0, "Rv1484": 1.0, "Rv1630": 0.9079029247044181, "Rv1694": 1.0, "Rv1908c": 1.0, "Rv2043c": 1.0, "Rv2245": 1.0, "Rv2416c": 1.0, "Rv2428": 1.0, "Rv2447c": 1.0, "Rv2671": 1.0, "Rv2754c": 1.0, "Rv2764c": 1.0, "Rv2780": 1.0, "Rv3261": 1.0, "Rv3423c": 1.0, "Rv3601c": 1.0, "Rv3793": 1.0, "Rv3794": 0.9601783060921248, "Rv3795": 0.9608616504854369, "Rv3854c": 1.0, "Rv3855": 1.0, "Rv3919c": 1.0}, "lineage": [{"lin": "lineage2", "family": "East-Asian", "spoligotype": "Beijing", "rd": "RD105", "frac": 1.0}, {"lin": "lineage2.2", "family": "East-Asian (Beijing)", "spoligotype": "Beijing-RD207", "rd": "RD105;RD207", "frac": 1.0}, {"lin": "lineage2.2.2", "family": "East-Asian (Beijing)", "spoligotype": "Beijing-RD105/RD207", "rd": "RD105;RD207", "frac": 1.0}], "main_lin": "lineage2", "sublin": "lineage2.2.2", "dr_variants": [{"sample": "tbprofiler", "chr": "Chromosome", "genome_pos": 761110, "type": "missense", "change": "p.Asp435Val", "freq": 1.0, "locus_tag": "Rv0667", "gene": "rpoB", "_internal_change": "435D>435V", "drug": "rifampicin"}], "other_variants": [{"sample": "tbprofiler", "chr": "Chromosome", "genome_pos": 763031, "type": "synonymous", "change": "c.3225T>C", "freq": 1.0, "locus_tag": "Rv0667", "gene": "rpoB", "_internal_change": "3225T>C"}, {"sample": "tbprofiler", "chr": "Chromosome", "genome_pos": 1834177, "type": "synonymous", "change": "c.636A>C", "freq": 1.0, "locus_tag": "Rv1630", "gene": "rpsA", "_internal_change": "636A>C"}], "XDR": "", "MDR": "", "drtype": "Drug-resistant", "id": "tbprofiler", "tbprofiler_version": "2.1.1", "pipeline": {"mapper": "bwa", "variant_caller": "BCFtools"}}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/results_2.txt	Tue Apr 02 09:03:16 2019 -0400
@@ -0,0 +1,72 @@
+
+TBProfiler report
+=================
+
+The following report has been generated by TBProfiler.
+
+Summary
+-------
+ID: tbprofiler
+Date: Mon Apr  1 10:38:29 2019
+Strain: lineage2.2.2
+Drug-resistance: Drug-resistant
+
+Lineage report
+--------------
+Lineage	Estimated Fraction	Family	Spoligotype	Rd
+lineage2	1.000	East-Asian	Beijing	RD105
+lineage2.2	1.000	East-Asian (Beijing)	Beijing-RD207	RD105;RD207
+lineage2.2.2	1.000	East-Asian (Beijing)	Beijing-RD105/RD207	RD105;RD207
+
+
+Resistance report
+-----------------
+Drug	Genotypic Resistance	Mutations
+ethionamide		
+levofloxacin		
+ofloxacin		
+pyrazinamide		
+amikacin		
+delamanid		
+cycloserine		
+rifampicin	R	rpoB p.Asp435Val (1.00)
+fluoroquinolones		
+para-aminosalicylic acid		
+capreomycin		
+moxifloxacin		
+ciprofloxacin		
+ethambutol		
+isoniazid		
+aminoglycosides		
+streptomycin		
+linezolid		
+kanamycin		
+bedaquiline		
+clofazimine		
+
+
+Other variants report
+---------------------
+Genome Position	Locus Tag	Change	Estimated Fraction
+763031	Rv0667	c.3225T>C	1.000
+1834177	Rv1630	c.636A>C	1.000
+
+
+Analysis pipeline specifications
+--------------------------------
+Version: 2.1.1
+Analysis	Program
+Mapping	bwa
+Variant Calling	BCFtools
+
+
+Disclaimer
+----------
+This tool is for Research Use Only and is offered free foruse. The London School
+of Hygiene and Tropical Medicine shall have no liability for any loss or damages
+of any kind, however sustained relating to the use of this tool.
+
+Citation
+--------
+Coll, F. et al. Rapid determination of anti-tuberculosis drug resistance from
+whole-genome sequences. Genome Medicine 7, 51. 2015
Binary file test-data/rif_resistant.fastq.gz has changed