-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathblastn.xml
More file actions
executable file
·153 lines (142 loc) · 6.62 KB
/
Copy pathblastn.xml
File metadata and controls
executable file
·153 lines (142 loc) · 6.62 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
149
150
151
152
153
<tool id="blastn" name="Identify reads with blastn and find taxonomy" version="1.5">
<!-- description>blastn wrapper and taxonomy finder</description-->
<requirements>
<requirement type="package" version="3.12.0">python</requirement>
<requirement type="package" version="1.85">biopython</requirement>
<requirement type="package" version="2.17.0">blast</requirement>
</requirements>
<command>
<![CDATA[
bash '$__tool_directory__/blastn.sh'
$input_type.type
$input_type.input
#if $database_type.type == "local"
$database_type.database.fields.path
#elif $database_type.type == "user"
$database_type.database
#end if
$task
$max_target_seqs
$output_format.output_format_type
$log_output
#if $input_type.type == "fasta"
$blast_output_fasta
#elif $input_type.type == "zip"
$blast_output_zip
#end if
#if $output_format.output_format_type == "custom_taxonomy"
$output_format.taxonomy_method
$output_format.coverage
#else
"none"
"none"
#end if
$identity
$blast_output_original
$database_type.type
]]>
</command>
<macros>
<macro name="zip_file_input_macro">
<param format="zip" name="input" type="data" label="zip file containing fasta"/>
</macro>
<macro name="fasta_file_input_macro">
<param format="fasta" name="input" type="data" label="fasta file"/>
</macro>
<macro name="taxonomy_macro">
<param name="taxonomy_method" type="select" multiple="false" label="Taxonomy source">
<option value="none">None</option>
<option value="default" selected="true">Taxonomy of the database from the hit</option>
<option value="GBIF" selected="true">GBIF or Catalogue of Life (GBIF highest priority)</option>
</param>
<param name="coverage" type="float" label="Query Coverage percentage cutoff" value="80" min="0.0" max="100"/>
</macro>
<macro name="local_databases">
<param name="database" type="select" multiple="true" label="Database">
<options from_data_table="naturalis_blast_databases">
<validator message="No BLAST database is available" type="no_options" />
</options>
</param>
</macro>
<macro name="user_input_fasta">
<param format="fasta" name="database" type="data" label="fasta file"/>
</macro>
</macros>
<inputs>
<conditional name="input_type">
<param name="type" type="select" multiple="false" label="Input type">
<option value="zip">zip</option>
<option value="fasta" selected="true">fasta</option>
</param>
<when value="zip">
<expand macro="zip_file_input_macro"/>
</when>
<when value="fasta">
<expand macro="fasta_file_input_macro"/>
</when>
</conditional>
<conditional name="database_type">
<param name="type" type="select" multiple="false" label="Subject database/sequences">
<option value="local" selected="true">Locally installed BLAST database</option>
<option value="user">FASTA file from your history</option>
</param>
<when value="local">
<expand macro="local_databases"/>
</when>
<when value="user">
<expand macro="user_input_fasta"/>
</when>
</conditional>
<!--<param name="taxidlist" type="select" multiple="false" label="NCBI taxonomy filter" dynamic_options="taxon_filter(database)"/>-->
<param name="task" type="select" multiple="false" label="Task">
<option value="blastn">blastn</option>
<option value="megablast" selected="true">megablast</option>
</param>
<conditional name="output_format">
<param name="output_format_type" type="select" multiple="false" label="Output format">
<option value="custom_taxonomy" selected="true">With taxonomy (Default)</option>
<option value="0">Pairwise (can be used with MEGAN)</option>
<option value="6">Tabular</option>
<option value="8">Text ASN.1</option>
<option value="11">BLAST archive format (ASN.1)</option>
</param>
<when value="custom_taxonomy">
<expand macro="taxonomy_macro"/>
</when>
</conditional>
<param name="identity" type="float" label="Identity percentage cutoff" value="97" min="0.0" max="100"/>
<param name="max_target_seqs" type="integer" label="Maximum number of BLAST hits per sequence" value="1" min="1"/>
</inputs>
<!--<code file="/home/ubuntu/testmapMarten/test/Marten/github_scripts/galaxy-tool-BLAST/test_tool_form_utils.py"/>-->
<outputs>
<data format="txt" name="log_output" label="$input_type.input.display_name log"/>
<!--<data format="tabular" name="blast_output" label="$input_type.input.display_name BLAST" />-->
<data format="zip" name="blast_output_zip" label="$input_type.input.display_name BLAST">
<filter>input_type['type'] != "fasta"</filter>
</data>
<!-- Output with original taxonomy -->
<data format="tabular" name="blast_output_original" label="$input_type.input.display_name BLAST gbif taxonomy">
<filter>input_type['type'] == "fasta"</filter>
<filter>output_format['taxonomy_method'] == "GBIF"</filter>
</data>
<data format="tabular" name="blast_output_fasta" label="$input_type.input.display_name BLAST original taxonomy">
<filter>input_type['type'] == "fasta"</filter>
<change_format>
<when input="output_format.output_format_type" value="custom_taxonomy" format="tabular"/>
<when input="output_format.output_format_type" value="6" format="tabular"/>
<when input="output_format.output_format_type" value="8" format="txt"/>
<when input="output_format.output_format_type" value="0" format="txt"/>
<when input="output_format.output_format_type" value="11" format="txt"/>
</change_format>
</data>
<!-- tests upload changes -->
</outputs>
<!-- <tests>
<test>
<param name="test_input" value="test_input.txt"/>
<output name="test_outout" file="test_output.txt"/>
</test>
</tests> -->
<help>
</help>
</tool>