comparison make_families.xml @ 0:d2e46adc199e draft

planemo upload commit 35b743e6492923c0e2b1e5e434eaf4e56d268108
author nick
date Mon, 23 Nov 2015 22:06:21 -0500
parents
children b63d6673f883
comparison
equal deleted inserted replaced
-1:000000000000 0:d2e46adc199e
1 <?xml version="1.0"?>
2 <tool id="make_families" name="Make families" version="0.1">
3 <description>from duplex sequencing data</description>
4 <requirements>
5 <requirement type="package" version="0.1">duplex</requirement>
6 <requirement type="set_environment">DUPLEX_DIR</requirement>
7 </requirements>
8 <command>paste $fastq1 $fastq2
9 | paste - - - -
10 | awk -f \$DUPLEX_DIR/make-barcodes.awk -v TAG_LEN=$taglen -v INVARIANT=$invariant
11 | sort
12 &gt; $output
13 </command>
14 <inputs>
15 <param name="fastq1" type="data" format="fastq" label="Sequencing reads, mate 1"/>
16 <param name="fastq2" type="data" format="fastq" label="Sequencing reads, mate 2"/>
17 <param name="taglen" type="integer" value="12" min="0" label="Tag length" help="length of each random barcode on the ends of the fragments"/>
18 <param name="invariant" type="integer" value="5" min="0" label="Invariant sequence length" help="length of the sequence between the tag and actual sample sequence (the restriction site, normally)"/>
19 </inputs>
20 <outputs>
21 <data name="output" format="tabular"/>
22 </outputs>
23 <tests>
24 <test>
25 <param name="fastq1" value="smoke_1.fq"/>
26 <param name="fastq2" value="smoke_2.fq"/>
27 <param name="taglen" value="5"/>
28 <param name="invariant" value="1"/>
29 <output name="output" file="smoke.families.tsv"/>
30 </test>
31 <test>
32 <param name="fastq1" value="smoke_1.fq"/>
33 <param name="fastq2" value="smoke_2.fq"/>
34 <param name="taglen" value="5"/>
35 <param name="invariant" value="0"/>
36 <output name="output" file="smoke.families.i0.tsv"/>
37 </test>
38 </tests>
39 <help>
40
41 **What it does**
42
43 This tool is for processing raw duplex sequencing data, removing the barcodes and grouping by them into families of reads from the same fragment.
44
45 -----
46
47 **Output**
48
49 The output will be a tabular file where each line corresponds to a pair of input reads.
50
51 The columns are::
52
53 1: barcode (both tags joined and ordered)
54 2: tag order in barcode ("ab" or "ba")
55 3: read1 name
56 4: read1 sequence (minus the tag and invariant sequences)
57 5: read1 quality scores (minus the same tag and invariant)
58 6: read2 name
59 7: read2 sequence (minus the tag and invariant sequences)
60 8: read2 quality scores (minus the same tag and invariant)
61
62 -----
63
64 **Barcode creation**
65
66 For each pair, the tool will remove the tag at the beginning of each read and create a barcode by concatenating the two tags. The order of the tags is determined by a string comparison so that it will make an identical barcode from pairs of either order. The original tag order will be noted in the second column.
67
68 Since pairs from opposite strands will have the same tags, but in the reverse order, this produces the same barcode for reads from the same fragment, regardless of strand. Then a simple sort will group all reads from the same strand together, separated into strands by the different "order" values.
69
70 Examples::
71
72 +---------------+-----------------+
73 | input tags | output |
74 +-------+-------+-------+---------+
75 | read1 | read2 | order | barcode |
76 +-------+-------+-------+---------+
77 | ATG | CCT | ab | ATGCCT |
78 +-------+-------+-------+---------+
79 | CCT | ATG | ba | ATGCCT |
80 +-------+-------+-------+---------+
81
82 </help>
83 </tool>