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