comparison demultiplex.xml.v1 @ 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" version="0.20">perl-io-gzip</requirement>
22 </requirements>
23 <command interpreter="python2.7">
24 demultiplex.py
25 #if str( $fastq_input.fastq_input_selector ) == "paired":
26 --input-R1 "${fastq_input.fastq_input1}"
27 --input-R2 "${fastq_input.fastq_input2}"
28 #else:
29 --input-R1 "${fastq_input.fastq_input1}"
30 #end if
31 --input-barcode $barcode_file
32 --mismatches $mismatches
33 --end $end
34 --summary $summary
35 --output-demultiplexed $demultiplexed_archive
36 --output-excluded $undemultiplexed_archive
37 </command>
38 <inputs>
39 <!-- Input file -->
40 <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" />
41
42 <conditional name="fastq_input">
43 <param name="fastq_input_selector" type="select" label="Single or Paired-end reads" help="Select between paired and single-end data">
44 <option value="single">Single</option>
45 <option value="paired">Paired</option>
46 </param>
47 <when value="paired">
48 <param name="fastq_input1" type="data" format="fastq" label="Select first set of reads" help="Specify dataset of your forward reads"/>
49 <param name="fastq_input2" type="data" format="fastq" label="Select second set of reads" help="Specify dataset of your reverse reads"/>
50 </when>
51 <when value="single">
52 <param name="fastq_input1" type="data" format="fastq" label="Select fastq dataset" help="Specify dataset of your single end reads"/>
53 </when>
54 </conditional>
55
56 <!-- Option -->
57 <param name="mismatches" type="integer" label="Barcode mismatches" help="Number of mismatches allowed in barcode" value="0" optional="false" />
58 <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?">
59 <option value="bol" selected="true">Forward</option>
60 <option value="eol">Reverse</option>
61 <option value="both">Both ends</option>
62 </param>
63 </inputs>
64 <outputs>
65 <data format="tar.gz" name="demultiplexed_archive" label="${tool.name}: demultiplexed.tar.gz" from_work_dir="demultiplexed.tar.gz"/>
66 <data format="tar.gz" name="undemultiplexed_archive" label="${tool.name}: undemultiplexed.tar.gz" from_work_dir="undemultiplexed.tar.gz"/>
67 <data format="tabular" name="summary" label="${tool.name}: report" from_work_dir="report.tsv"/>
68 </outputs>
69 <tests>
70 <test>
71 <param name="fastq_input1" value="multiplex.fastq"/>
72 <param name="barcode_file" value="barcode.tabular"/>
73 <output name="demultiplexed_archive" file="FROGS_Demultiplex_reads__demultiplexed.tar.gz"/>
74 <output name="undemultiplexed_archive" file="FROGS_Demultiplex_reads__undemultiplexed.tar.gz"/>
75 <output name="summary" file="FROGS_Demultiplex_reads__report.tabular"/>
76 </test>
77 </tests>
78 <help>
79 .. class:: infomark page-header h2
80
81 What it does
82
83 This tool classifies single or paired-end reads in function of barcode forward or reverse in the first or both reads.
84
85 **Command line**::
86
87 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*
88
89 .. csv-table:: Inputs
90 :header: "Input name", "Meaning"
91 :widths: 20, 80
92 :class: table table-striped
93
94 "FQ_INPUT1", "Fastq input file for the first read (single-end or forward read of paired-end sequences)"
95 "FQ_INPUT2", "Fastq input file for the second read (only for paired-end sequences)"
96 "TXT_BARCODE", "Tabulated text file that describes barcode sequences used to multiplexe samples: SAMPLE_NAME BARCODE1 [BARCODE2]"
97
98 .. csv-table:: Options
99 :header: "Option name", "Meaning"
100 :widths: 20, 80
101 :class: table table-striped
102
103 "-m/--mismatches MISMATCH", "Number of allowed mismatch in each barcode"
104 "-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"
105
106 .. csv-table:: Outputs
107 :header: "Output name", "Meaning"
108 :widths: 20, 80
109 :class: table table-striped
110
111 "TXT_SUMMARY_OUTPUT", "A tabulated text file which summarises the number of sequences (single or paired) for each sample"
112 "TARGZ_DEMULT_ARCHIVE_OUTPUT", "A TAR.GZ archive that contains all fastq files for each sample"
113 "TARGZ_UNDEMULT_ARCHIVE_OUTPUT", "A TAR.GZ archive that contains all fastq files for undemultiplexed reads"
114
115 .. class:: h3
116
117 Format
118
119 BARCODE_FILE :
120 This file is expected to be tabulated
121
122 -first column corresponds to the sample name
123
124 -second column corresponds to the sequence barcode used
125
126 -third column (optional) corresponds to the reverse sequence barcode
127
128 .. class:: warningmark
129
130 Take care to indicate sequence barcode in the strand of the read, so you may need to reverse complement the reverse barcode sequence
131
132 .. class:: warningmark
133
134 All barcode sequences must have the same length
135
136 Example of barcode file: Here the sample is multiplexed by both fragment ends.
137
138 .. image:: ${static_path}/images/tools/frogs/demultiplex_barcode.png
139 :height: 18
140 :width: 286
141
142 FASTQ :
143 Text file describing biological sequences in a 4 line format:
144
145 -first line starts by "@" corresponds to the sequence identifier and optionally the sequence description
146
147 -second line is the sequence itself
148
149 -third line is a "+" following by the sequence identifier or not depending on the version
150
151 -fourth line is the quality sequence, one code per base. The code depends on its version and the sequencer
152
153 `Click here for more details on the fastq format &lt;https://en.wikipedia.org/wiki/FASTQ_format&gt;`_
154
155 Example of fastq read corresponding to the previous barcode file
156
157 .. image:: ${static_path}/images/tools/frogs/demultiplex_fastq_ex.png
158 :height: 57
159 :width: 420
160
161
162 .. class:: infomark page-header h2
163
164 How it works
165
166 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.
167
168 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.
169
170 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.
171
172
173 .. class:: infomark page-header h2
174
175 Advices
176
177 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.
178
179 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.
180
181 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.
182
183 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)
184
185
186 ----
187
188 **Contact**
189
190 Contacts: frogs@inra.fr
191
192 Repository: https://github.com/geraldinepascal/FROGS
193
194 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
195
196 Depending on the help provided you can cite us in acknowledgements, references or both.
197 </help>
198 </tool>