-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathyac.xml
171 lines (161 loc) · 7.85 KB
/
yac.xml
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<tool id="yac" name="Clip adapter" version="2.5.1">
<description />
<requirements>
<requirement type="package" version="3.7.6">python</requirement>
</requirements>
<command detect_errors="exit_code"><![CDATA[
python $__tool_directory__/yac.py
--input $input
--output 'clip.tmp'
--output_format
#if $out_format == 'fasta' or $out_format == 'fastagz':
'fasta'
#else
'fastq'
#end if
--adapter_to_clip $clip_source.clip_sequence
--min $min
--max $max
--Nmode $Nmode &&
#if ($out_format == 'fastagz') or ($out_format == 'fastqgz'):
gzip -c 'clip.tmp' > $output
#else
mv clip.tmp $output
#end if
]]></command>
<inputs>
<param format="fasta,fastq" label="Source file" name="input" type="data" />
<param label="min size" name="min" size="4" type="integer" value="15" />
<param label="max size" name="max" size="4" type="integer" value="36" />
<param label="Select output format" name="out_format" type="select"
help="be careful not to select a fastq format for your output if your input has a fasta format">
<option value="fasta">Fasta</option>
<option value="fastq" selected="true" >Fastq (Sanger)</option>
<option value="fastagz">gzipped Fasta</option>
<option value="fastqgz">gzipped Fastq (Sanger)</option>
</param>
<param label="Accept reads containing N?" name="Nmode" type="select">
<option selected="True" value="accept">accept</option>
<option value="reject">reject</option>
</param>
<conditional name="clip_source">
<param help="Built-in adapters or User-provided" label="Source" name="clip_source_list" type="select">
<option selected="True" value="prebuilt">Use a built-in adapter (select from the list below)</option>
<option value="user">Use custom sequence</option>
</param>
<when value="prebuilt">
<param help="if your adapter is not listed, input your own sequence" label="Select Adapter to clip" name="clip_sequence" type="select">
<option value="TCGTATGCCGTCTTCTGCTTG">Solexa TCGTATGCCGTCTTCTGCTTG</option>
<option value="ATCTCGTATGCCGTCTTCTGCTT">Illumina ATCTCGTATGCCGTCTTCTGCTT</option>
<option selected="True" value="TGGAATTCTCGGGTGCCAAG">Illumina TruSeq TGGAATTCTCGGGTGCCAAG</option>
<option value="CTGTAGGCACCATCAATCGT">IdT CTGTAGGCACCATCAATCGT</option>
</param>
</when>
<when value="user">
<param label="Enter your Sequence" name="clip_sequence" size="35" type="text" value="GAATCC" />
</when>
</conditional>
</inputs>
<outputs>
<data format_source="input" metadata_source="input" name="output" label="Clipped ${input.name}-then-${out_format}">
<change_format>
<when input="out_format" value="fasta" format="fasta" />
<when input="out_format" value="fastq" format="fastqsanger" />
<when input="out_format" value="fastagz" format="fasta.gz" />
<when input="out_format" value="fastqgz" format="fastqsanger.gz" />
</change_format>
</data>
</outputs>
<tests>
<test>
<param ftype="fastqsanger" name="input" value="yac.fastq" />
<param name="min" value="18" />
<param name="max" value="29" />
<param name="clip_source_list" value="prebuilt" />
<param name="clip_sequence" value="ATCTCGTATGCCGTCTTCTGCTT" />
<param name="Nmode" value="accept" />
<param name="out_format" value="fastq" />
<output file="out.fastqsanger" name="output" />
</test>
<test>
<param ftype="fastqsanger" name="input" value="yac.fastq" />
<param name="min" value="18" />
<param name="max" value="29" />
<param name="clip_source_list" value="prebuilt" />
<param name="clip_sequence" value="ATCTCGTATGCCGTCTTCTGCTT" />
<param name="Nmode" value="accept" />
<param name="out_format" value="fasta" />
<output file="out.fasta" name="output" />
</test>
<test>
<param ftype="fastqsanger.gz" name="input" value="yac.fastqsanger.gz" />
<param name="min" value="18" />
<param name="max" value="29" />
<param name="clip_source_list" value="prebuilt" />
<param name="clip_sequence" value="ATCTCGTATGCCGTCTTCTGCTT" />
<param name="Nmode" value="accept" />
<param name="out_format" value="fastqgz" />
<output file="out.fastqsanger.gz" name="output" decompress="True" />
</test>
<test>
<param ftype="fastqsanger.gz" name="input" value="yac.fastqsanger.gz" />
<param name="min" value="18" />
<param name="max" value="29" />
<param name="clip_source_list" value="prebuilt" />
<param name="clip_sequence" value="ATCTCGTATGCCGTCTTCTGCTT" />
<param name="Nmode" value="accept" />
<param name="out_format" value="fastagz" />
<output file="out.fasta.gz" name="output" decompress="True" />
</test>
<test>
<param ftype="fasta.gz" name="input" value="yac.fasta.gz" />
<param name="min" value="18" />
<param name="max" value="29" />
<param name="clip_source_list" value="prebuilt" />
<param name="clip_sequence" value="ATCTCGTATGCCGTCTTCTGCTT" />
<param name="out_format" value="fasta" />
<param name="Nmode" value="accept" />
<output file="out.fasta" name="output" />
</test>
<test>
<param ftype="fasta.gz" name="input" value="yac.fasta.gz" />
<param name="min" value="18" />
<param name="max" value="29" />
<param name="clip_source_list" value="prebuilt" />
<param name="clip_sequence" value="ATCTCGTATGCCGTCTTCTGCTT" />
<param name="Nmode" value="accept" />
<param name="out_format" value="fastagz" />
<output file="out.fasta.gz" name="output" decompress="True" />
</test>
<test>
<param ftype="fastqsanger.gz" name="input" value="yac_with_empty_reads.fastqsanger.gz" />
<param name="min" value="18" />
<param name="max" value="30" />
<param name="clip_source_list" value="prebuilt" />
<param name="clip_sequence" value="TGGAATTCTCGGGTGCCAAG" />
<param name="Nmode" value="accept" />
<param name="out_format" value="fastagz" />
<output file="out_with_empty_reads.fasta.gz" name="output" decompress="True" />
</test>
</tests>
<help>
**What it does**
+ Clips adapter sequences
+ Renumbers sequence headers
+ Filters sequences on their size
+ Filters sequences containing unknown nucleotides (optional)
-------
yac_clipper clips 7nt long motives in 5' of adapter sequences. *It is accepting 1 mismatch in the searched 7nt motif.*
**Inputs**
1. A fastq or fasta file of reads to be clipped
2. Select the size of the reads to be kept
3. Select an output format. When input is a fastq file, this may be fastq or fasta, whereas
when input is a fasta file, this only may be a fasta.
4. Select whether you wish or do not wish to keep clipped sequences with unknown nucleotides (N)
5. Select a pre-built adapter sequence or enter your own sequence (at least 7 nucleotides long)
-------
**Output**
A fastq or fasta file containing clipped sequences satisfying the selected criteria.
</help>
<citations />
</tool>