comparison snp-sites.xml @ 1:5804f786060d draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/snp-sites commit e4222f6179041846870721bfcb4d8e587ead8d8f"
author iuc
date Sat, 02 Nov 2019 11:12:17 -0400
parents efe8f0e53d3e
children
comparison
equal deleted inserted replaced
0:efe8f0e53d3e 1:5804f786060d
1 <?xml version='1.0' encoding='UTF-8'?> 1 <?xml version='1.0' encoding='UTF-8'?>
2 <tool id='snp_sites' name='Finds SNP sites' version='0.1.0'> 2 <tool id='snp_sites' name='Finds SNP sites' version='@TOOL_VERSION@+galaxy0'>
3 <description>from a multi-FASTA alignment file</description> 3 <description>from a multi-FASTA alignment file</description>
4 <macros>
5 <token name="@TOOL_VERSION@">2.5.1</token>
6 </macros>
4 <requirements> 7 <requirements>
5 <requirement type='package' version='2.3.2'>snp-sites</requirement> 8 <requirement type='package' version='@TOOL_VERSION@'>snp-sites</requirement>
6 </requirements> 9 </requirements>
7 <version_command>snp-sites -V</version_command> 10 <version_command>snp-sites -V</version_command>
8 <command detect_errors='aggressive'><![CDATA[ 11 <command detect_errors='aggressive'><![CDATA[
12 #if str($out_type.ot_select) == "alignment"
13 #if str($out_type.formats) == 'None'
14 echo "Error, no output format specified" >&2 && exit 1 ;
15 #set outputs=""
16 #else
17 #set outputs=" ".join(str($out_type.formats).split(","))
18 #end if
19 #end if
20
9 snp-sites 21 snp-sites
10 -mvp 22 #if str($out_type.ot_select) == "alignment"
11 -o output 23 $outputs
12 '$input_fasta' 24 $out_type.b
25 $out_type.c
26 #else if str($out_type.ot_select) == "counts"
27 -C
28 #end if
29 -o output
30 '$input_fasta'
31
32 #if str($out_type.ot_select) == "counts"
33 && mv output $output_counts
34 #else if ',' in str($out_type.formats)
35 #if '-m' in str($out_type.formats)
36 && mv 'output.snp_sites.aln' '$output_fasta'
37 #end if
38 #if '-v' in str($out_type.formats)
39 && mv 'output.vcf' '$output_vcf'
40 #end if
41 #if '-p' in str($out_type.formats)
42 && mv 'output.phylip' '$output_phylip'
43 #end if
44 #else
45 #if str($out_type.formats) == '-m'
46 && mv 'output' '$output_fasta'
47 #else if str($out_type.formats) == '-v'
48 && mv 'output' '$output_vcf'
49 #else if str($out_type.formats) == '-p'
50 && mv 'output' '$output_phylip'
51 #end if
52 #end if
13 ]]></command> 53 ]]></command>
14 <inputs> 54 <inputs>
55
15 <param name='input_fasta' format='fasta' type='data' label='FASTA file' /> 56 <param name='input_fasta' format='fasta' type='data' label='FASTA file' />
57 <conditional name="out_type" label="Output type">
58 <param type="select" name="ot_select" label="Output">
59 <option value="alignment" selected="true">Sequence alignment / VCF</option>
60 <option value="counts">Constant site count (suitable for IQ-TREE -fconst)</option>
61 </param>
62 <when value="alignment">
63 <param type='select' multiple='true' name='formats' label='Output formats' help='Output format to use if not counting constant sites'>
64 <option value="-m" selected="true">Multi-FASTA alignment file</option>
65 <option value="-v">VCF</option>
66 <option value="-p">Phylip</option>
67 </param>
68 <param argument="-b" label="Output constant sites (suitable for use in BEAST)" truevalue="-b" falsevalue=""
69 type="boolean" help="Output monomorphic (constant) as opposed to polymorphic (variable) sites"/>
70 <param argument="-c" label="Only output columns containing exclusively ACTG" truevalue="-c" falsevalue=""
71 type="boolean" help="Ignore columns containing ambiguous characters and gaps"/>
72 </when>
73 <when value="counts">
74 </when>
75 </conditional>
16 </inputs> 76 </inputs>
17 <outputs> 77 <outputs>
18 <data name='output_fasta' format='fasta' label='${tool.name} on ${on_string}: FASTA' from_work_dir='output.snp_sites.aln'/> 78 <data name='output_fasta' format='fasta' label='${tool.name} on ${on_string}: FASTA'>
19 <data name='output_vcf' format='vcf' label='${tool.name} on ${on_string}: VCF' from_work_dir='output.vcf'/> 79 <!-- this becomes a catch-all for when no format is specified. if no format is specified the job ends with an error but shows 1 red dataset output -->
20 <data name='output_phylip' format='phylip' label='${tool.name} on ${on_string}: phylip' from_work_dir='output.phylip'/> 80 <filter>(out_type["ot_select"] == "alignment" and out_type["formats"] is not None and '-m' in out_type["formats"]) or (out_type["ot_select"] == "alignment" and out_type.formats is None)</filter>
81 </data>
82 <data name='output_vcf' format='vcf' label='${tool.name} on ${on_string}: VCF' from_work_dir='output.vcf'>
83 <filter>out_type["ot_select"] == "alignment" and out_type["formats"] is not None and '-v' in out_type["formats"]</filter>
84 </data>
85 <data name='output_phylip' format='phylip' label='${tool.name} on ${on_string}: phylip'>
86 <filter>out_type["ot_select"] == "alignment" and out_type["formats"] is not None and '-p' in out_type["formats"]</filter>
87 </data>
88 <data name='output_counts' format='tabular' label='${tool.name} on ${on_string}: constant site counts'>
89 <filter>out_type["ot_select"] == "counts"</filter>
90 </data>
21 </outputs> 91 </outputs>
22 <tests> 92 <tests>
23 <test> 93 <test expect_num_outputs="3">
24 <param name='input_fasta' value='input.fasta' ftype='fasta' /> 94 <param name='input_fasta' value='input.fasta' ftype='fasta' />
25 <output name='output_fasta' value='output.fasta' ftype='fasta' /> 95 <conditional name="out_type">
26 <output name='output_vcf' value='output.vcf' ftype='vcf' /> 96 <param name="ot_select" value="alignment" />
27 <output name='output_phylip' value='output.phylip' ftype='phylip' /> 97 <param name='formats' value='-m,-p,-v' />
98 </conditional>
99 <output name='output_fasta' value='output.fasta' ftype='fasta' />
100 <output name='output_vcf' value='output.vcf' ftype='vcf' />
101 <output name='output_phylip' value='output.phylip' ftype='phylip' />
102 </test>
103 <test expect_num_outputs="1">
104 <param name='input_fasta' value='input.fasta' ftype='fasta' />
105 <conditional name="out_type">
106 <param name="ot_select" value="alignment" />
107 <param name='formats' value='-m' />
108 <param name='b' value='True' />
109 </conditional>
110 <output name='output_fasta' value='output_monomorphic.fasta' ftype='fasta' />
111 </test>
112 <test expect_num_outputs="1">
113 <param name='input_fasta' value='input.fasta' ftype='fasta' />
114 <conditional name="out_type">
115 <param name="ot_select" value="alignment" />
116 <param name='formats' value='-m' />
117 <param name='c' value='True' />
118 </conditional>
119 <output name='output_fasta' value='output_actg.fasta' ftype='fasta' />
120 </test>
121 <test expect_num_outputs="1">
122 <param name='input_fasta' value='input.fasta' ftype='fasta' />
123 <conditional name="out_type">
124 <param name="ot_select" value="alignment" />
125 <param name='formats' value='-m' />
126 <param name='b' value='True' />
127 <param name="c" value="True" />
128 </conditional>
129 <output name='output_fasta' value='output_monomorphic_actg.fasta' ftype='fasta' />
130 </test>
131 <test expect_num_outputs="1">
132 <param name='input_fasta' value='input.fasta' ftype='fasta' />
133 <conditional name="out_type">
134 <param name="ot_select" value="counts" />
135 <param name='C' value='True' />
136 </conditional>
137 <output name='output_counts' value='output_counts.tabular' ftype='tabular' />
28 </test> 138 </test>
29 </tests> 139 </tests>
30 <help> 140 <help>
31 <![CDATA[ 141 <![CDATA[
32 142
33 **SNP-sites** 143 **SNP-sites**
34 144
35 This tool can rapidly extract SNPs from a multi-FASTA alignment using modest resources and can output results in multiple formats for downstream analysis. SNPs can be extracted from a 8.3 GB alignment file (1,842 taxa, 22,618 sites) in 267 seconds using 59 MB of RAM and 1 CPU core, making it feasible to run on modest computers. SNP-sites is implemented in C and is available under the open source license GNU GPL version 3. 145 This tool can rapidly extract SNPs from a multi-FASTA alignment using modest resources and can output results in multiple formats for downstream analysis. SNPs can be extracted from a 8.3 GB alignment file (1,842 taxa, 22,618 sites) in 267 seconds using 59 MB of RAM and 1 CPU core, making it feasible to run on modest computers.
146 SNP-sites is implemented in C and is available under the open source license GNU GPL version 3.
147
148 Alternatively it can report on the number of constant sites in an alignment in a format (A count, C count, G count, T count) suitable for passing
149 to IQ-TREE's `-fconst` option.
36 150
37 **Input FASTA format:** 151 **Input FASTA format:**
38 152
39 The first sequence will be taken as a reference. 153 The first sequence will be taken as a reference.
40 154
46 >sample1 160 >sample1
47 AGACAC----AC 161 AGACAC----AC
48 162
49 >sample1 163 >sample1
50 AAACGCATTCAN 164 AAACGCATTCAN
165
166 **Options**
167
168 In addition to the default output mode, this tool supports three other options:
169
170 1. Output only constant (monomorphic) (i.e. not polymorphic) sites (useful for input to BEAST)
171
172 2. Output only columns that have purely ACTGs in them (i.e. no gaps or ambiguous nucleotides). This can be used together with the previous option.
173
174 3. Output only a count of constant sites, in a format suitable for use with IQ-TREE `-fconst`. This option cannot be used together with the previously mentioned options.
51 175
52 **Output files:** 176 **Output files:**
53 177
54 The output of the tool are three different files in following format: 178 The output of the tool are three different files in following format:
55 179
56 - a multi fasta alignment, 180 - a multi fasta alignment,
57 - relaxed phylip format and, 181 - relaxed phylip format and,
58 - VCF. 182 - VCF.
183 - alternatively constant site counts (As, Cs, Gs and Ts).
59 184
60 The VCF file for the above specified input is 185 The VCF file for the above specified input is
61 186
62 The output of the tool are three different files in following format: 187 The output of the tool are three different files in following format:
63 188