forked from bgruening/galaxytools
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmacros.xml
More file actions
148 lines (144 loc) · 6.75 KB
/
macros.xml
File metadata and controls
148 lines (144 loc) · 6.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<macros>
<token name="@TOOL_VERSION@">0.6.1</token>
<token name="@VERSION_SUFFIX@">0</token>
<token name="@LICENSE@">MIT</token>
<token name="@DB_SELECTOR@"><![CDATA[
#if $database_select.select == 'cached':
ln -s '$database_select.sylph_database.fields.path/database.syldb' 'database.syldb' &&
#else:
ln -s '$database_select.sylph_database' 'database.syldb' &&
#end if
]]></token>
<token name="@SINGLE_INPUT@"><![CDATA[
#if $sketch.input.ext == 'fastqsanger'
#set $ext = 'fastq'
#else if $sketch.input.ext == 'fastqsanger.gz':
#set $ext = 'fastq.gz'
#else:
#set $ext = str($sketch.input.ext)
#end if
#if $sketch.input.element_identifier.endswith('.fastq') or $sketch.input.element_identifier.endswith('.fastq.gz'):
#set $input = re.sub(r'\s+', '_', $sketch.input.element_identifier)
#else:
#set $input = re.sub(r'\s+', '_', $sketch.input.element_identifier + '.' + str($ext))
#end if
ln -s '$sketch.input' '$input' &&
]]></token>
<token name="@SINGLE_GROUP@"><![CDATA[
#set input = ''
#for $number, $current_file in enumerate($sketch.input):
#if $current_file.ext == 'fastqsanger'
#set $ext = 'fastq'
#else if $current_file.ext == 'fastqsanger.gz':
#set $ext = 'fastq.gz'
#else:
#set $ext = str($current_file.ext)
#end if
#if $current_file.element_identifier.endswith('.fastq') or $current_file.element_identifier.endswith('.fastq.gz'):
#set $current_input = re.sub(r'\s+', '_', $current_file.element_identifier)
#else:
#set $current_input = re.sub(r'\s+', '_', $current_file.element_identifier + '.' + str($ext))
#end if
ln -s '${current_file}' '$current_input' &&
#set input = str($input) + ' ' + str($current_input)
#end for
]]></token>
<token name="@PAIRED@"><![CDATA[
#if $sketch.input_1.ext == 'fastqsanger'
#set $ext_1 = 'fastq'
#else if $sketch.input_1.ext == 'fastqsanger.gz':
#set $ext_1 = 'fastq.gz'
#else:
#set $ext_1 = str($sketch.input_1.ext)
#end if
#if $sketch.input_2.ext == 'fastqsanger'
#set $ext_2 = 'fastq'
#else if $sketch.input_2.ext == 'fastqsanger.gz':
#set $ext_2 = 'fastq.gz'
#else:
#set $ext_2 = str($sketch.input_2.ext)
#end if
#if $sketch.input_1.element_identifier.endswith('.fastq') or $sketch.input_1.element_identifier.endswith('.fastq.gz'):
#set $read1 = re.sub(r'\s+', '_', $sketch.input_1.element_identifier)
#else:
#set $read1 = re.sub(r'\s+', '_', str($sketch.input_1.element_identifier) + '.' + str($ext_1))
#end if
#if $sketch.input_2.element_identifier.endswith('.fastq') or $sketch.input_2.element_identifier.endswith('.fastq.gz'):
#set $read2 = re.sub(r'\s+', '_', $sketch.input_2.element_identifier)
#else:
#set $read2 = re.sub(r'\s+', '_', str($sketch.input_2.element_identifier) + '.' + str($ext_2))
#end if
ln -s '$sketch.input_1' '$read1' &&
ln -s '$sketch.input_2' '$read2' &&
]]></token>
<token name="@PAIRED_GROUP@"><![CDATA[
#if $sketch.input.forward.ext == 'fastqsanger'
#set $ext_1 = 'fastq'
#else if $sketch.input.forward.ext == 'fastqsanger.gz':
#set $ext_1 = 'fastq.gz'
#else:
#set $ext_1 = str($sketch.input.forward.ext)
#end if
#if $sketch.input.reverse.ext == 'fastqsanger'
#set $ext_2 = 'fastq'
#else if $sketch.input.reverse.ext == 'fastqsanger.gz':
#set $ext_2 = 'fastq.gz'
#else:
#set $ext_2 = str($sketch.input.reverse.ext)
#end if
#set $read1 = re.sub(r'\s+', '_', str($sketch.input.element_identifier) + '.' + str($ext_1))
#set $read2 = re.sub(r'\s+', '_', str($sketch.input.element_identifier) + '_r2.' + str($ext_2))
ln -s '$sketch.input.forward' '$read1' &&
ln -s '$sketch.input.reverse' '$read2' &&
]]></token>
<xml name="requirements">
<requirements>
<requirement type="package" version="@TOOL_VERSION@">sylph</requirement>
<requirement type="package" version="3.11.9">python</requirement>
<requirement type="package" version="2.2.3">pandas</requirement>
</requirements>
</xml>
<xml name="description">
<description>fast and precise species-level metagenomic profiling with ANIs</description>
</xml>
<xml name="citation">
<citations>
<citation type="doi">10.1038/s41587-024-02412-y</citation>
</citations>
</xml>
<xml name="creator">
<creator>
<organization name="University of Toronto" url="https://github.com/bluenote-1577/sylph"/>
</creator>
</xml>
<xml name="xrefs">
<xrefs>
<xref type="bio.tools">sylph</xref>
</xrefs>
</xml>
<xml name="input_database">
<conditional name="database_select">
<param name="select" type="select" label="Choose the source for databases and metadata">
<option value="cached">Cached data</option>
<option value="history">History</option>
</param>
<when value="cached">
<param label="Select a sylph database" name="sylph_database" type="select">
<options from_data_table="sylph_databases">
<validator message="No Sylph databases are available" type="no_options" />
</options>
</param>
</when>
<when value="history">
<param label="Select a history dataset" name="sylph_database" type="data" format="binary" />
<param label="Metadata file for metaphlan and krona outputs" name="metadata" type="data" format="tabular.gz" optional="true" help="The metata file MUST be directly associated with the input database. For more information, view the help text of the tool."/>
</when>
</conditional>
</xml>
<xml name="output_format">
<param label="Additional output formats" name="outputs" type="select" display="checkboxes" multiple="true" help="In addition to Sylph's tabular output, you may ouput a file converted to these formats">
<option value="metaphlan">Sylph's MetaPhlAn-like output</option>
<option value="krona">Krona compatible</option>
</param>
</xml>
</macros>