5
|
1 <tool id="cpo_snippy" name="CPO_Snippy" version="3.2">
|
|
2 <description>Modified Snippy v3.2 to support contig inputs for the cpo_prediction workflow</description>
|
1
|
3 <requirements>
|
|
4 <requirement type="package" version="3.2">snippy</requirement>
|
|
5 </requirements>
|
|
6 <stdio>
|
|
7 <exit_code range="1:" />
|
|
8 </stdio>
|
|
9
|
|
10 <command>
|
|
11 <![CDATA[
|
|
12 snippy
|
|
13 --outdir out
|
|
14 --cpus "\${GALAXY_SLOTS:-1}"
|
|
15 --ref $ref
|
|
16 $cleanup
|
|
17 #if str( $advanced.is_advanced ) == "advanced"
|
|
18 --mapqual $advanced.mapqual
|
|
19 --mincov $advanced.mincov
|
|
20 --minfrac $advanced.minfrac
|
|
21 #if $advanced.rgid
|
|
22 --rgid $advanced.rgid
|
|
23 #end if
|
|
24 #if $advanced.bwaopt
|
|
25 --bwaopt $advanced.bwaopt
|
|
26 #end if
|
|
27 #end if
|
|
28 --ctgs $input
|
|
29
|
|
30 &&
|
|
31
|
|
32 gunzip out/snps.depth.gz
|
|
33
|
|
34 &&
|
|
35
|
5
|
36 #import re
|
|
37 #set $dir_name = re.sub('[^\w_]', '_', $input.element_identifier)
|
|
38 mkdir -p ${dir_name}/reference && cp out/snps.tab out/snps.aligned.fa ${dir_name}/ && cp out/reference/ref.fa ${dir_name}/reference/ &&
|
|
39
|
|
40 tar -czf out.tgz ${dir_name}
|
1
|
41
|
|
42
|
|
43 ]]>
|
|
44 </command>
|
|
45 <inputs>
|
|
46
|
|
47 <param name="ref" type="data" format="fasta" label="Reference Fasta" />
|
|
48 <param name="input" type="data" format="fasta" label="assembled contigs"/>
|
|
49 <param name="cleanup" type="boolean" checked="true" truevalue="--cleanup" falsevalue="" label="Cleanup the non-snp output files" help="Remove all non-SNP files: BAMs, indices etc" />
|
|
50 <conditional name="advanced">
|
|
51 <param name="is_advanced" type="select" label="Advanced parameters" help="unhide advanced parameter settings">
|
|
52 <option value="advanced">Show advanced settings</option>
|
|
53 <option value="simple" selected="true">Hide advanced settings</option>
|
|
54 </param>
|
|
55 <when value="advanced">
|
|
56 <param name="mapqual" type="float" value="60" label="Minimum mapping quality" help="Minimum mapping quality to allow" />
|
|
57 <param name="mincov" type="float" value="10" label="Minimum coverage" help="Minimum coverage to call a snp" />
|
|
58 <param name="minfrac" type="float" value="0.9" label="Minumum proportion for variant evidence" help="Minumum proportion for variant evidence" />
|
|
59 <param name="rgid" type="text" value="" label="Bam header @RG ID" help="Use this @RG ID: in the BAM header" />
|
|
60 <param name="bwaopt" type="text" value="" label="Extra BWA MEM options" help="Extra BWA MEM options, eg. -x pacbio" />
|
|
61 </when>
|
|
62 <when value="simple">
|
|
63
|
|
64 </when>
|
|
65 </conditional>
|
|
66 </inputs>
|
|
67 <outputs>
|
|
68 <data format="vcf" name="snpvcf" label="${tool.name} on ${on_string} snps vcf file" from_work_dir="out/snps.vcf"/>
|
|
69 <data format="gff3" name="snpgff" label="${tool.name} on ${on_string} snps gff file" from_work_dir="out/snps.gff"/>
|
|
70 <data format="tabular" name="snptab" label="${tool.name} on ${on_string} snps table" from_work_dir="out/snps.tab"/>
|
|
71 <data format="tabular" name="snpsum" label="${tool.name} on ${on_string} snps summary" from_work_dir="out/snps.txt"/>
|
|
72 <data format="txt" name="snplog" label="${tool.name} on ${on_string} log file" from_work_dir="out/snps.log"/>
|
|
73 <data format="fasta" name="snpalign" label="${tool.name} on ${on_string} aligned fasta" from_work_dir="out/snps.aligned.fa"/>
|
|
74 <data format="fasta" name="snpconsensus" label="${tool.name} on ${on_string} consensus fasta" from_work_dir="out/snps.consensus.fa"/>
|
|
75 <data format="tabular" name="snpsdepth" label="${tool.name} on ${on_string} mapping depth" from_work_dir="out/snps.depth"/>
|
|
76 <data format="bam" name="snpsbam" label="${tool.name} on ${on_string} mapped reads (bam)" from_work_dir="out/snps.bam">
|
|
77 <filter>cleanup is False</filter>
|
|
78 </data>
|
|
79 <data format="zip" name="outdir" label="${tool.name} on ${on_string} out dir" from_work_dir="out.tgz" />
|
|
80 </outputs>
|
|
81
|
|
82 <tests>
|
|
83 <test>
|
|
84 <param name="ref_type_selector" value="fasta" />
|
|
85 <param name="ref" value="Ecoli.fna" ftype="fasta" />
|
|
86 <param name="fastq_input_selector" value="paired" />
|
|
87 <param name="fastq_input1" ftype="fastq" value="reads_1.fq" />
|
|
88 <param name="fastq_input2" ftype="fastq" value="reads_2.fq" />
|
|
89 <output name="snpsum" ftype="tabular" file="test/snps.txt" lines-diff="5" />
|
|
90 </test>
|
|
91 </tests>
|
|
92
|
|
93
|
|
94 <help>
|
|
95 <![CDATA[
|
|
96 Synopsis:
|
|
97 snippy 3.0 - fast bacterial variant calling from NGS reads
|
|
98
|
|
99 Author:
|
|
100 Torsten Seemann <torsten.seemann@gmail.com>
|
|
101
|
|
102 Usage:
|
|
103 snippy [options] --outdir <dir> --ref <ref> --pe1 <R1.fq.gz> --pe2 <R2.fq.gz>
|
|
104
|
|
105 snippy [options] --outdir <dir> --ref <ref> --se <454.fastq>
|
|
106
|
|
107 snippy [options] --outdir <dir> --ref <ref> --peil <velvet.fa.gz>
|
|
108
|
|
109 Options:
|
|
110 --help This help
|
|
111
|
|
112 --version Print version and exit
|
|
113
|
|
114 --citation Print citation for referencing snippy
|
|
115
|
|
116 --quiet No screen output (default OFF)
|
|
117
|
|
118 --cpus [N] Maximum number of CPU cores to use (default '8')
|
|
119
|
|
120 --reference [X] Reference genome. Supports FASTA, GenBank, EMBL (not GFF) (default '')
|
|
121
|
|
122 --outdir [X] Output folder (default '')
|
|
123
|
|
124 --prefix [X] Prefix for output files (default 'snps')
|
|
125
|
|
126 --force Force overwrite of existing output folder (default OFF)
|
|
127
|
|
128 --pe1|R1|left [X] Reads, paired-end R1 (left) (default '')
|
|
129
|
|
130 --pe2|R2|right [X] Reads, paired-end R2 (right) (default '')
|
|
131
|
|
132 --se|single [X] Single-end reads (default '')
|
|
133
|
|
134 --peil [X] Reads, paired-end R1/R2 interleaved (default '')
|
|
135
|
|
136 --mapqual [n.n] Minimum mapping quality to allow (default '60')
|
|
137
|
|
138 --mincov [N] Minimum coverage of variant site (default '10')
|
|
139
|
|
140 --minfrac [n.n] Minumum proportion for variant evidence (default '0.9')
|
|
141
|
|
142 --report Produce long report with visual alignment (slow) (default OFF)
|
|
143
|
|
144 --cleanup Remove all non-SNP files: BAMs, indices etc (default OFF)
|
|
145
|
|
146 --rgid [X] Use this @RG ID: in the BAM header (default '')
|
|
147
|
|
148 --bwaopt [X] Extra BWA MEM options, eg. -x pacbio (default '')
|
|
149
|
|
150 ]]>
|
|
151 </help>
|
|
152 <citations>
|
|
153 <citation type="bibtex">
|
|
154 @UNPUBLISHED{Seemann2013,
|
|
155 author = "Seemann T",
|
|
156 title = "snippy: fast bacterial variant calling from NGS reads",
|
|
157 year = "2015",
|
|
158 note = "https://github.com/tseemann/snippy"}
|
|
159 </citation>
|
|
160 </citations>
|
|
161
|
|
162
|
|
163 </tool> |