Mercurial > repos > iuc > mykrobe_predict
changeset 5:db95e63ac3fb draft default tip
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mykrobe commit e0d4688a59e6eeba33adcfe803ac43d0bc2863e7"
| author | iuc |
|---|---|
| date | Wed, 01 Sep 2021 07:46:02 +0000 |
| parents | 70a3a5377e6d |
| children | |
| files | mykrobe_genotype_LOCAL_216918.xml mykrobe_predict.xml mykrobe_predict.xml.orig |
| diffstat | 2 files changed, 157 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mykrobe_predict.xml Thu Aug 26 20:37:45 2021 +0000 +++ b/mykrobe_predict.xml Wed Sep 01 07:46:02 2021 +0000 @@ -1,5 +1,8 @@ <tool id="mykrobe_predict" name="mkyrobe predict" version="@TOOL_VERSION@.1+galaxy0" profile="@PROFILE@"> <description>Antibiotic resistance predictions</description> + <xrefs> + <xref type="bio.tools">Mykrobe</xref> + </xrefs> <macros> <import>macro.xml</import> </macros>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mykrobe_predict.xml.orig Wed Sep 01 07:46:02 2021 +0000 @@ -0,0 +1,154 @@ +<<<<<<< HEAD +<tool id="mykrobe_predict" name="mkyrobe predict" version="@TOOL_VERSION@.1+galaxy0" profile="@PROFILE@"> + <description>Antibiotic resistance predictions</description> +======= +<tool id="mykrobe_predict" name="mkyrobe predict" version="0.7.0"> + <description>Antibiotic resistance predictions</description> + <xrefs> + <xref type='bio.tools'>Mykrobe</xref> + </xrefs> +>>>>>>> 84b0f9990 (add bio.tools IDs until M) + <macros> + <import>macro.xml</import> + </macros> + <expand macro="requirements"/> +<<<<<<< HEAD + <command detect_errors="exit_code"><![CDATA[ +#import difflib +#import re +======= + <command detect_errors="exit_code"> +<![CDATA[ + @select_inputs@ +>>>>>>> 84b0f9990 (add bio.tools IDs until M) + +mykrobe predict +--species '${select_species.species}' +--panel '${select_species.panel}' + +#if $conf_percent_cutoff: + --conf_percent_cutoff '${conf_percent_cutoff}' +#end if + +#if $min_depth: + --min_depth ${min_depth} +#end if + +@shared_options@ + +-q +-t "\${GALAXY_SLOTS:-1}" + +#if $data_type.type in ["single", "paired"]: + #set read1 = $data_type.seq1 + #set read1_identifier = re.sub('[^\s\w\-]', '_', str($read1.element_identifier)) + #if $data_type.type == "single": + --sample '${read1_identifier}' + --seq '${read1}' + #else: + #set read2 = $data_type.seq2 + #set read2_identifier = re.sub('[^\s\w\-]', '_', str($read2.element_identifier)) + #set matches = difflib.SequenceMatcher(None, read1_identifier, read2_identifier).get_matching_blocks() + #set match = $matches[0] + #set identifier = re.sub('[^\s\w\-]', '_', str($read1_identifier[match.a:match.a + match.size])) + --sample '${identifier}' + --seq '${read1}' '${read2}' + #end if +#elif $data_type.type == "collection": + #set identifier = re.sub('[^\s\w\-]', '_', str($data_type.collection1.element_identifier)) + --sample '${identifier}' + --seq '${data_type.collection1.forward}' '${data_type.collection1.reverse}' +#end if + +--format '${format}' + +> '$output']]> + </command> + <inputs> + <expand macro="inputs"/> + <conditional name="select_species"> + <param name="species" type="select" label="Specify Species for AMR"> + <option value="tb">Mycobacterium tuberculosis (tb)</option> + <option value="staph">Staphylococcus aureus (staph)</option> + <option value="sonnei">Shigella sonnei (sonnei)</option> + </param> + <when value="staph"> + <param name="panel" type="select" label="Select panel for Staph only"> + <option value="20170217">20170217</option> + </param> + </when> + <when value="tb"> + <param name="panel" type="select" label="Select panel for TB only"> + <option value="202010">202010</option> + <option value="201901">201901</option> + <option value="bradley-2015">Bradely 2015</option> + </param> + </when> + <when value="sonnei"> + <param name="panel" type="select" label="Select panel for sonnei only"> + <option value="20210201">20210201</option> + <option value="20201012">20201012</option> + </param> + </when> + </conditional> + <param argument="--min_depth" optional="True" type="integer" min="0" label="Minimum depth" help=""/> + <param argument="--conf_percent_cutoff" optional="True" type="integer" label="Confidence percent cutoff" help="Number between 0 and 100. Determines --min_variant_conf, by simulating variants and choosing the cutoff that would keep x% of the variants. Default is 90 if --ont, otherwise --min_variant_conf is used as the cutoff"> + <validator type="in_range" min="0" max="100" message="Confidence percent cutoff should be between 0 and 100" /> + </param> + <expand macro="options"/> + <param argument="--format" type="select" label="Select the prefered output format"> + <option value="csv" >csv</option> + <option value="json">json</option> + </param> + </inputs> + <outputs> + <data name="output" format="csv" label="prediction"> + <change_format> + <when input="format" value="json" format="json"/> + </change_format> + </data> + </outputs> + <tests> + <test> + <param name="type" value="single"/> + <param name="seq1" ftype="fastq" value="reads.fastq"/> + <param name="species" value="tb"/> + <param name="panel" value="bradley-2015"/> + <param name="format" value="json"/> + <output name="output"> + <assert_contents> + <has_text_matching expression="susceptibility"/> + </assert_contents> + </output> + </test> + <test> + <param name="type" value="single"/> + <param name="seq1" ftype="fastq" value="reads.fastq"/> + <param name="species" value="sonnei"/> + <param name="panel" value="20201012"/> + <param name="format" value="json"/> + <output name="output"> + <assert_contents> + <has_text_matching expression="susceptibility"/> + </assert_contents> + </output> + </test> + <test> + <param name="type" value="single"/> + <param name="seq1" ftype="fastq.gz" value="reads.fastq.gz"/> + <param name="species" value="sonnei"/> + <param name="panel" value="20201012"/> + <param name="format" value="json"/> + <output name="output"> + <assert_contents> + <has_text_matching expression="susceptibility"/> + </assert_contents> + </output> + </test> + </tests> + <help> + @ATTRIBUTION@ + </help> + <expand macro="citation" /> +</tool> +
