Mercurial > repos > iuc > mykrobe_predict
comparison mykrobe_predict.xml.orig @ 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 | |
| children |
comparison
equal
deleted
inserted
replaced
| 4:70a3a5377e6d | 5:db95e63ac3fb |
|---|---|
| 1 <<<<<<< HEAD | |
| 2 <tool id="mykrobe_predict" name="mkyrobe predict" version="@TOOL_VERSION@.1+galaxy0" profile="@PROFILE@"> | |
| 3 <description>Antibiotic resistance predictions</description> | |
| 4 ======= | |
| 5 <tool id="mykrobe_predict" name="mkyrobe predict" version="0.7.0"> | |
| 6 <description>Antibiotic resistance predictions</description> | |
| 7 <xrefs> | |
| 8 <xref type='bio.tools'>Mykrobe</xref> | |
| 9 </xrefs> | |
| 10 >>>>>>> 84b0f9990 (add bio.tools IDs until M) | |
| 11 <macros> | |
| 12 <import>macro.xml</import> | |
| 13 </macros> | |
| 14 <expand macro="requirements"/> | |
| 15 <<<<<<< HEAD | |
| 16 <command detect_errors="exit_code"><![CDATA[ | |
| 17 #import difflib | |
| 18 #import re | |
| 19 ======= | |
| 20 <command detect_errors="exit_code"> | |
| 21 <![CDATA[ | |
| 22 @select_inputs@ | |
| 23 >>>>>>> 84b0f9990 (add bio.tools IDs until M) | |
| 24 | |
| 25 mykrobe predict | |
| 26 --species '${select_species.species}' | |
| 27 --panel '${select_species.panel}' | |
| 28 | |
| 29 #if $conf_percent_cutoff: | |
| 30 --conf_percent_cutoff '${conf_percent_cutoff}' | |
| 31 #end if | |
| 32 | |
| 33 #if $min_depth: | |
| 34 --min_depth ${min_depth} | |
| 35 #end if | |
| 36 | |
| 37 @shared_options@ | |
| 38 | |
| 39 -q | |
| 40 -t "\${GALAXY_SLOTS:-1}" | |
| 41 | |
| 42 #if $data_type.type in ["single", "paired"]: | |
| 43 #set read1 = $data_type.seq1 | |
| 44 #set read1_identifier = re.sub('[^\s\w\-]', '_', str($read1.element_identifier)) | |
| 45 #if $data_type.type == "single": | |
| 46 --sample '${read1_identifier}' | |
| 47 --seq '${read1}' | |
| 48 #else: | |
| 49 #set read2 = $data_type.seq2 | |
| 50 #set read2_identifier = re.sub('[^\s\w\-]', '_', str($read2.element_identifier)) | |
| 51 #set matches = difflib.SequenceMatcher(None, read1_identifier, read2_identifier).get_matching_blocks() | |
| 52 #set match = $matches[0] | |
| 53 #set identifier = re.sub('[^\s\w\-]', '_', str($read1_identifier[match.a:match.a + match.size])) | |
| 54 --sample '${identifier}' | |
| 55 --seq '${read1}' '${read2}' | |
| 56 #end if | |
| 57 #elif $data_type.type == "collection": | |
| 58 #set identifier = re.sub('[^\s\w\-]', '_', str($data_type.collection1.element_identifier)) | |
| 59 --sample '${identifier}' | |
| 60 --seq '${data_type.collection1.forward}' '${data_type.collection1.reverse}' | |
| 61 #end if | |
| 62 | |
| 63 --format '${format}' | |
| 64 | |
| 65 > '$output']]> | |
| 66 </command> | |
| 67 <inputs> | |
| 68 <expand macro="inputs"/> | |
| 69 <conditional name="select_species"> | |
| 70 <param name="species" type="select" label="Specify Species for AMR"> | |
| 71 <option value="tb">Mycobacterium tuberculosis (tb)</option> | |
| 72 <option value="staph">Staphylococcus aureus (staph)</option> | |
| 73 <option value="sonnei">Shigella sonnei (sonnei)</option> | |
| 74 </param> | |
| 75 <when value="staph"> | |
| 76 <param name="panel" type="select" label="Select panel for Staph only"> | |
| 77 <option value="20170217">20170217</option> | |
| 78 </param> | |
| 79 </when> | |
| 80 <when value="tb"> | |
| 81 <param name="panel" type="select" label="Select panel for TB only"> | |
| 82 <option value="202010">202010</option> | |
| 83 <option value="201901">201901</option> | |
| 84 <option value="bradley-2015">Bradely 2015</option> | |
| 85 </param> | |
| 86 </when> | |
| 87 <when value="sonnei"> | |
| 88 <param name="panel" type="select" label="Select panel for sonnei only"> | |
| 89 <option value="20210201">20210201</option> | |
| 90 <option value="20201012">20201012</option> | |
| 91 </param> | |
| 92 </when> | |
| 93 </conditional> | |
| 94 <param argument="--min_depth" optional="True" type="integer" min="0" label="Minimum depth" help=""/> | |
| 95 <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"> | |
| 96 <validator type="in_range" min="0" max="100" message="Confidence percent cutoff should be between 0 and 100" /> | |
| 97 </param> | |
| 98 <expand macro="options"/> | |
| 99 <param argument="--format" type="select" label="Select the prefered output format"> | |
| 100 <option value="csv" >csv</option> | |
| 101 <option value="json">json</option> | |
| 102 </param> | |
| 103 </inputs> | |
| 104 <outputs> | |
| 105 <data name="output" format="csv" label="prediction"> | |
| 106 <change_format> | |
| 107 <when input="format" value="json" format="json"/> | |
| 108 </change_format> | |
| 109 </data> | |
| 110 </outputs> | |
| 111 <tests> | |
| 112 <test> | |
| 113 <param name="type" value="single"/> | |
| 114 <param name="seq1" ftype="fastq" value="reads.fastq"/> | |
| 115 <param name="species" value="tb"/> | |
| 116 <param name="panel" value="bradley-2015"/> | |
| 117 <param name="format" value="json"/> | |
| 118 <output name="output"> | |
| 119 <assert_contents> | |
| 120 <has_text_matching expression="susceptibility"/> | |
| 121 </assert_contents> | |
| 122 </output> | |
| 123 </test> | |
| 124 <test> | |
| 125 <param name="type" value="single"/> | |
| 126 <param name="seq1" ftype="fastq" value="reads.fastq"/> | |
| 127 <param name="species" value="sonnei"/> | |
| 128 <param name="panel" value="20201012"/> | |
| 129 <param name="format" value="json"/> | |
| 130 <output name="output"> | |
| 131 <assert_contents> | |
| 132 <has_text_matching expression="susceptibility"/> | |
| 133 </assert_contents> | |
| 134 </output> | |
| 135 </test> | |
| 136 <test> | |
| 137 <param name="type" value="single"/> | |
| 138 <param name="seq1" ftype="fastq.gz" value="reads.fastq.gz"/> | |
| 139 <param name="species" value="sonnei"/> | |
| 140 <param name="panel" value="20201012"/> | |
| 141 <param name="format" value="json"/> | |
| 142 <output name="output"> | |
| 143 <assert_contents> | |
| 144 <has_text_matching expression="susceptibility"/> | |
| 145 </assert_contents> | |
| 146 </output> | |
| 147 </test> | |
| 148 </tests> | |
| 149 <help> | |
| 150 @ATTRIBUTION@ | |
| 151 </help> | |
| 152 <expand macro="citation" /> | |
| 153 </tool> | |
| 154 |
