annotate taxonomy-to-krona.xml @ 8:db30eb96ea23 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 7599ef16dc8b83ee49236ed5bb229260c969b0ab
author iuc
date Mon, 17 Jun 2024 12:18:02 +0000
parents 7bfd66707e6f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
1 <tool id="mothur_taxonomy_to_krona" name="Taxonomy-to-Krona" version="1.0">
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
2 <description>convert a mothur taxonomy file to Krona input format</description>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
3 <macros>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
4 <import>macros.xml</import>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
5 </macros>
8
db30eb96ea23 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 7599ef16dc8b83ee49236ed5bb229260c969b0ab
iuc
parents: 0
diff changeset
6 <expand macro="biotools"/>
0
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
7 <command detect_errors="exit_code"><![CDATA[
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
8 cat $inputfile
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
9 | tail -n +2 ## remove header line
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
10 | cut -f2,3 ## remove first column
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
11 | sed 's/;/\t/g' ## split taxonomy field on semicolon
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
12 | sed 's/"//g' ## remove quotation marks
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
13 | sed 's/[ \t]*$//' ## remove trailing whitespace
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
14 #if $stripconfidences
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
15 | sed -r 's/[(][0-9]+[)]//g' ## remove confidence scores
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
16 #end if
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
17 > $outputfile
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
18 ]]></command>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
19 <inputs>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
20 <param name="inputfile" type="data" format="mothur.cons.taxonomy" label="Taxonomy file"
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
21 help="Mothur-formatted taxonomy file. Should have 3 columns; OTU-size-taxonomy"/>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
22 <param name="stripconfidences" type="boolean" checked="false" label="Strip confidence values?"
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
23 help="Strip the confidence values enclosed in parentheses behind the taxonomy levels if present. e.g. Bacteria(100);Bacteroidetes(87);.."/>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
24 </inputs>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
25 <outputs>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
26 <data name="outputfile" format="tabular" label="${tool.name} on ${on_string}: krona-formatted taxonomy file"/>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
27 </outputs>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
28 <tests>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
29 <test><!-- test defaults -->
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
30 <param name="inputfile" value="example.constaxonomy"/>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
31 <output name="outputfile">
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
32 <assert_contents>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
33 <has_line_matching expression="^\d+(\t[\w\d\-()]+)+$"/>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
34 <not_has_text text="Otu01"/>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
35 <not_has_text text=";"/>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
36 <has_text text="Bacteria"/>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
37 <has_text text="(100)"/>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
38 </assert_contents>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
39 </output>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
40 </test>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
41 <test><!-- test with stripping of confidence scores -->
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
42 <param name="inputfile" value="example.constaxonomy"/>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
43 <param name="stripconfidences" value="true"/>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
44 <output name="outputfile">
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
45 <assert_contents>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
46 <has_line_matching expression="^\d+(\t[\w\d\-]+)+$"/>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
47 <not_has_text text="Otu01"/>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
48 <not_has_text text=";"/>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
49 <has_text text="Bacteria"/>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
50 <not_has_text text="(100)"/>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
51 </assert_contents>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
52 </output>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
53 </test>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
54 </tests>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
55 <help><![CDATA[
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
56 Krona text input requires a tab-delimited file with first column being a count, and the rest representing the hierarchy, for example::
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
57
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
58 2 Fats Saturated fat
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
59 3 Fats Unsaturated fat Monounsaturated fat
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
60 3 Fats Unsaturated fat Polyunsaturated fat
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
61 13 Carbohydrates Sugars
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
62 4 Carbohydrates Dietary fiber
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
63 21 Carbohydrates
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
64 5 Protein
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
65 4
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
66
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
67 This can be input into the Krona tool as generic text format, and would yield this `Krona plot`_.
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
68
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
69 .. _Krona plot: https://marbl.github.io/Krona/examples/xml.krona.html
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
70
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
71 ]]></help>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
72 <expand macro="citations">
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
73 <citation type="doi">10.1186/1471-2105-12-385</citation>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
74 </expand>
7bfd66707e6f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
iuc
parents:
diff changeset
75 </tool>