comparison demultiplex.xml @ 0:da4101033e10 draft default tip

planemo upload
author oinizan
date Wed, 18 Oct 2017 05:30:40 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:da4101033e10
1 <?xml version="1.0"?>
2 <!--
3 # Copyright (C) 2015 INRA
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 -->
18 <tool id="FROGS_demultiplex" name="FROGS Demultiplex reads" version="2.0.0">
19 <description>Attribute reads to samples in function of inner barcode.</description>
20 <requirements>
21 <requirement type="package">perl-io-zlib</requirement>
22 <requirement type="package" version="0.20">perl-io-gzip</requirement>
23 </requirements>
24 <command>
25 <![CDATA[
26 export TOOL_DIRECTORY=$__tool_directory__ &&
27 python "$__tool_directory__"/demultiplex.py
28 #if str( $fastq_input.fastq_input_selector ) == "paired":
29 --input-R1 "${fastq_input.fastq_input1}"
30 --input-R2 "${fastq_input.fastq_input2}"
31 #else:
32 --input-R1 "${fastq_input.fastq_input1}"
33 #end if
34 --input-barcode $barcode_file
35 --mismatches $mismatches
36 --end $end
37 --summary $summary
38 --output-demultiplexed $demultiplexed_archive
39 --output-excluded $undemultiplexed_archive
40 ]]>
41 </command>
42 <inputs>
43 <!-- Input file -->
44 <param format="tabular" name="barcode_file" type="data" label="Barcode file" help="This file describes barcodes and samples (one line by sample tabulated separated from barcode sequence(s)). See Help section" optional="false" />
45
46 <conditional name="fastq_input">
47 <param name="fastq_input_selector" type="select" label="Single or Paired-end reads" help="Select between paired and single-end data">
48 <option value="single">Single</option>
49 <option value="paired">Paired</option>
50 </param>
51 <when value="paired">
52 <param name="fastq_input1" type="data" format="fastq" label="Select first set of reads" help="Specify dataset of your forward reads"/>
53 <param name="fastq_input2" type="data" format="fastq" label="Select second set of reads" help="Specify dataset of your reverse reads"/>
54 </when>
55 <when value="single">
56 <param name="fastq_input1" type="data" format="fastq" label="Select fastq dataset" help="Specify dataset of your single end reads"/>
57 </when>
58 </conditional>
59
60 <!-- Option -->
61 <param name="mismatches" type="integer" label="Barcode mismatches" help="Number of mismatches allowed in barcode" value="0" optional="false" />
62 <param name="end" type="select" label="Barcode on which end ?" help="The barcode is placed either at the beginning of the forward end or of the reverse end or both?">
63 <option value="bol" selected="true">Forward</option>
64 <option value="eol">Reverse</option>
65 <option value="both">Both ends</option>
66 </param>
67 </inputs>
68 <outputs>
69 <data format="tar" name="demultiplexed_archive" label="${tool.name}: demultiplexed.tar.gz" from_work_dir="demultiplexed.tar.gz"/>
70 <data format="tar" name="undemultiplexed_archive" label="${tool.name}: undemultiplexed.tar.gz" from_work_dir="undemultiplexed.tar.gz"/>
71 <data format="tabular" name="summary" label="${tool.name}: report" from_work_dir="report.tsv"/>
72 </outputs>
73 <tests>
74 <test>
75 <param name="fastq_input1" value="multiplex.fastq"/>
76 <param name="barcode_file" value="barcode.tabular"/>
77 <param name="end" value="both"/>
78 <!--<output name="demultiplexed_archive" file="FROGS_Demultiplex_reads__demultiplexed.tar.gz"/>
79 <output name="undemultiplexed_archive" file="FROGS_Demultiplex_reads__undemultiplexed.tar.gz"/>-->
80 <output name="summary" file="FROGS_Demultiplex_reads__report.tabular"/>
81 </test>
82 </tests>
83 <help>
84 .. class:: infomark page-header h2
85
86 What it does
87
88 This tool classifies single or paired-end reads in function of barcode forward or reverse in the first or both reads.
89
90 **Command line**::
91
92 demultiplex.py --input-R1 *FQ_INPUT1* [--input-R2 *FQ_INPUT2*] --input-barcode *TXT_BARCODE* --mismatches *MISMATCH* --end *END* --summary *TXT_SUMMARY_OUTPUT* --output-demultiplexed *TARGZ_DEMULT_ARCHIVE_OUTPUT* --output-excluded *TARGZ_UNDEMULT_ARCHIVE_OUTPUT*
93
94 .. csv-table:: Inputs
95 :header: "Input name", "Meaning"
96 :widths: 20, 80
97 :class: table table-striped
98
99 "FQ_INPUT1", "Fastq input file for the first read (single-end or forward read of paired-end sequences)"
100 "FQ_INPUT2", "Fastq input file for the second read (only for paired-end sequences)"
101 "TXT_BARCODE", "Tabulated text file that describes barcode sequences used to multiplexe samples: SAMPLE_NAME BARCODE1 [BARCODE2]"
102
103 .. csv-table:: Options
104 :header: "Option name", "Meaning"
105 :widths: 20, 80
106 :class: table table-striped
107
108 "-m/--mismatches MISMATCH", "Number of allowed mismatch in each barcode"
109 "-e/--end END", "To which end must the barcode be found : forward (begin of the (first) read), reverse (end of the (second) read) or both"
110
111 .. csv-table:: Outputs
112 :header: "Output name", "Meaning"
113 :widths: 20, 80
114 :class: table table-striped
115
116 "TXT_SUMMARY_OUTPUT", "A tabulated text file which summarises the number of sequences (single or paired) for each sample"
117 "TARGZ_DEMULT_ARCHIVE_OUTPUT", "A TAR.GZ archive that contains all fastq files for each sample"
118 "TARGZ_UNDEMULT_ARCHIVE_OUTPUT", "A TAR.GZ archive that contains all fastq files for undemultiplexed reads"
119
120 .. class:: h3
121
122 Format
123
124 BARCODE_FILE :
125 This file is expected to be tabulated
126
127 -first column corresponds to the sample name
128
129 -second column corresponds to the sequence barcode used
130
131 -third column (optional) corresponds to the reverse sequence barcode
132
133 .. class:: warningmark
134
135 Take care to indicate sequence barcode in the strand of the read, so you may need to reverse complement the reverse barcode sequence
136
137 .. class:: warningmark
138
139 All barcode sequences must have the same length
140
141 Example of barcode file: Here the sample is multiplexed by both fragment ends.
142
143 .. image:: ${static_path}/images/tools/frogs/demultiplex_barcode.png
144 :height: 18
145 :width: 286
146
147 FASTQ :
148 Text file describing biological sequences in a 4 line format:
149
150 -first line starts by "@" corresponds to the sequence identifier and optionally the sequence description
151
152 -second line is the sequence itself
153
154 -third line is a "+" following by the sequence identifier or not depending on the version
155
156 -fourth line is the quality sequence, one code per base. The code depends on its version and the sequencer
157
158 `Click here for more details on the fastq format &lt;https://en.wikipedia.org/wiki/FASTQ_format&gt;`_
159
160 Example of fastq read corresponding to the previous barcode file
161
162 .. image:: ${static_path}/images/tools/frogs/demultiplex_fastq_ex.png
163 :height: 57
164 :width: 420
165
166
167 .. class:: infomark page-header h2
168
169 How it works
170
171 For each sequence or sequence pair, the sequence fragment at the beginning (forward multiplexing) of the (first) read or at the end (reverse multiplexing) of the (second) read will be compared to all barcodes of the barecode file.
172
173 If this fragment is found once and only once (regarding the mismatch threshold), the fragment is trimmed and the sequence will be attributed to the corresponding sample.
174
175 Finally fastq files (or pair of fastq files) for each sample are included in an archive and a report, describing how many sequences are attributed for each sample, is created.
176
177
178 .. class:: infomark page-header h2
179
180 Advices
181
182 Do not forget to indicate barcode sequence as they really are in the fastq sequence file, especially if you have multiplexed data via the reverse strand.
183
184 For the mismatch threshold, we advised to let the threshold to 0. Then if you are not satisfied by the result try with 1. The number of mismatches depends on the length of the barcode, but frequently this sequences are very short so 1 mismatch is already more than the sequencing error rate.
185
186 If you have different barcode lengths, you must demultiplex your data in several steps, beginning by the longest barcode set. Then to trim the barcodes with smaller lengths, you use the "unmatched" or "ambiguous" sequence file with smaller barcodes and so on.
187
188 If you have Roche 454 sequences in sff format, you must convert them with some programs like `sff2fastq &lt;https://github.com/indraniel/sff2fastq&gt;`_ or sff_to_fastq (installable in Galaxy)
189
190
191 ----
192
193 **Contact**
194
195 Contacts: frogs@inra.fr
196
197 Repository: https://github.com/geraldinepascal/FROGS
198
199 Please cite the FROGS Publication: *Escudie F., Auer L., Bernard M., Cauquil L., Vidal K., Maman S., Mariadassou M., Combes S., Hernandez-Raquet G., Pascal G., 2016. FROGS: Find Rapidly OTU with Galaxy Solution. In: ISME-2016 Montreal, CANADA ,* http://bioinfo.genotoul.fr/wp-content/uploads/FROGS_ISME2016_poster.pdf
200
201 Depending on the help provided you can cite us in acknowledgements, references or both.
202 </help>
203 </tool>