annotate allele-counts.xml @ 5:31361191d2d2

Uploaded tarball. Version 1.1: Stranded output, slightly different handling of minor allele ties and 0 coverage sites, revised help text, added test datasets.
author nick
date Thu, 12 Sep 2013 11:34:23 -0400
parents 898eb3daab43
children df3b28364cd2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
1 <tool id="allele_counts_1" version="1.1" name="Variant Annotator">
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
2 <description> process variant counts</description>
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
3 <command interpreter="python">allele-counts.py -i $input -o $output -f $freq -c $covg $header $stranded $nofilt</command>
0
28c40f4b7d2b Uploaded xml description
nick
parents:
diff changeset
4 <inputs>
28c40f4b7d2b Uploaded xml description
nick
parents:
diff changeset
5 <param name="input" type="data" format="vcf" label="Input variants from Naive Variants Detector"/>
3
933a9435939c Current xml
nick
parents: 0
diff changeset
6 <param name="freq" type="float" value="1.0" min="0" max="100" label="Minor allele frequency threshold (in percent)"/>
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
7 <param name="covg" type="integer" value="10" min="0" label="Coverage threshold (in reads per strand)"/>
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
8 <param name="nofilt" type="boolean" truevalue="-n" falsevalue="" checked="False" label="Do not filter sites or alleles" />
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
9 <param name="stranded" type="boolean" truevalue="-s" falsevalue="" checked="False" label="Output stranded base counts" />
3
933a9435939c Current xml
nick
parents: 0
diff changeset
10 <param name="header" type="boolean" truevalue="-H" falsevalue="" checked="True" label="Write header line" />
0
28c40f4b7d2b Uploaded xml description
nick
parents:
diff changeset
11 </inputs>
28c40f4b7d2b Uploaded xml description
nick
parents:
diff changeset
12 <outputs>
28c40f4b7d2b Uploaded xml description
nick
parents:
diff changeset
13 <data name="output" format="tabular"/>
28c40f4b7d2b Uploaded xml description
nick
parents:
diff changeset
14 </outputs>
28c40f4b7d2b Uploaded xml description
nick
parents:
diff changeset
15 <stdio>
28c40f4b7d2b Uploaded xml description
nick
parents:
diff changeset
16 <exit_code range="1:" err_level="fatal"/>
28c40f4b7d2b Uploaded xml description
nick
parents:
diff changeset
17 <exit_code range=":-1" err_level="fatal"/>
28c40f4b7d2b Uploaded xml description
nick
parents:
diff changeset
18 </stdio>
28c40f4b7d2b Uploaded xml description
nick
parents:
diff changeset
19
28c40f4b7d2b Uploaded xml description
nick
parents:
diff changeset
20 <help>
3
933a9435939c Current xml
nick
parents: 0
diff changeset
21
4
898eb3daab43 Complete documentation
nick
parents: 3
diff changeset
22 .. class:: infomark
898eb3daab43 Complete documentation
nick
parents: 3
diff changeset
23
898eb3daab43 Complete documentation
nick
parents: 3
diff changeset
24 **What it does**
898eb3daab43 Complete documentation
nick
parents: 3
diff changeset
25
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
26 This tool parses variant counts from a special VCF file. It counts simple variants, calculates numbers of alleles, and calculates minor allele frequency. It can apply filters based on coverage, strand bias, and minor allele frequency cutoffs.
4
898eb3daab43 Complete documentation
nick
parents: 3
diff changeset
27
898eb3daab43 Complete documentation
nick
parents: 3
diff changeset
28 -----
898eb3daab43 Complete documentation
nick
parents: 3
diff changeset
29
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
30 .. class:: infomark
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
31
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
32 **Input Format**
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
33
3
933a9435939c Current xml
nick
parents: 0
diff changeset
34 .. class:: warningmark
933a9435939c Current xml
nick
parents: 0
diff changeset
35
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
36 **Note:** variants that are not A/C/G/T SNVs will be ignored!
3
933a9435939c Current xml
nick
parents: 0
diff changeset
37
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
38 The input VCF should be like the output of the **Naive Variant Detector** tool (using the stranded option). The sample column(s) must give the read count for each variant **on each strand**. Below is an example of a valid sample column entry (the important part is after the last colon)::
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
39
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
40 0/0:1:0.02:+T=27,+G=1,-T=22,
3
933a9435939c Current xml
nick
parents: 0
diff changeset
41
933a9435939c Current xml
nick
parents: 0
diff changeset
42 -----
933a9435939c Current xml
nick
parents: 0
diff changeset
43
933a9435939c Current xml
nick
parents: 0
diff changeset
44 .. class:: infomark
933a9435939c Current xml
nick
parents: 0
diff changeset
45
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
46 **Output**
3
933a9435939c Current xml
nick
parents: 0
diff changeset
47
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
48 Each row represents one site in one sample. For unstranded output, 12 fields give information about that site::
0
28c40f4b7d2b Uploaded xml description
nick
parents:
diff changeset
49
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
50 1. SAMPLE - Sample name (from VCF sample column labels)
3
933a9435939c Current xml
nick
parents: 0
diff changeset
51 2. CHR - Chromosome of the site
933a9435939c Current xml
nick
parents: 0
diff changeset
52 3. POS - Chromosomal coordinate of the site
933a9435939c Current xml
nick
parents: 0
diff changeset
53 4. A - Number of reads supporting an 'A'
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
54 5. C - 'C' reads
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
55 6. G - 'G' reads
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
56 7. T - 'T' reads
3
933a9435939c Current xml
nick
parents: 0
diff changeset
57 8. CVRG - Total (number of reads supporting one of the four bases above)
933a9435939c Current xml
nick
parents: 0
diff changeset
58 9. ALLELES - Number of qualifying alleles
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
59 10. MAJOR - Major allele
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
60 11. MINOR - Minor allele (2nd most prevalent variant)
3
933a9435939c Current xml
nick
parents: 0
diff changeset
61 12. MINOR.FREQ.PERC. - Frequency of minor allele
933a9435939c Current xml
nick
parents: 0
diff changeset
62
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
63 For stranded output, instead of using 4 columns to report read counts per base, 8 are used to report the stranded counts per base::
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
64
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
65 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
66 SAMPLE CHR POS +A +C +G +T -A -C -G -T CVRG ALLELES MAJOR MINOR MINOR.FREQ.PERC.
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
67
4
898eb3daab43 Complete documentation
nick
parents: 3
diff changeset
68 **Example**
898eb3daab43 Complete documentation
nick
parents: 3
diff changeset
69
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
70 Below is a header line, followed by some example data lines. Since the input contained three samples, the data for each site is reported on three consecutive lines. However, if a sample fell below the coverage threshold at that site, the line will be omitted::
4
898eb3daab43 Complete documentation
nick
parents: 3
diff changeset
71
898eb3daab43 Complete documentation
nick
parents: 3
diff changeset
72 #SAMPLE CHR POS A C G T CVRG ALLELES MAJOR MINOR MINOR.FREQ.PERC.
898eb3daab43 Complete documentation
nick
parents: 3
diff changeset
73 BLOOD_1 chr20 99 0 101 1 2 104 1 C T 0.01923
898eb3daab43 Complete documentation
nick
parents: 3
diff changeset
74 BLOOD_2 chr20 99 82 44 0 1 127 2 A C 0.34646
898eb3daab43 Complete documentation
nick
parents: 3
diff changeset
75 BLOOD_3 chr20 99 0 110 1 0 111 1 C G 0.009
898eb3daab43 Complete documentation
nick
parents: 3
diff changeset
76 BLOOD_1 chr20 100 3 5 100 0 108 1 G C 0.0463
898eb3daab43 Complete documentation
nick
parents: 3
diff changeset
77 BLOOD_3 chr20 100 1 118 11 0 130 0 C G 0.08462
3
933a9435939c Current xml
nick
parents: 0
diff changeset
78
933a9435939c Current xml
nick
parents: 0
diff changeset
79 -----
933a9435939c Current xml
nick
parents: 0
diff changeset
80
933a9435939c Current xml
nick
parents: 0
diff changeset
81 .. class:: warningmark
933a9435939c Current xml
nick
parents: 0
diff changeset
82
933a9435939c Current xml
nick
parents: 0
diff changeset
83 **Site printing and allele tallying requirements**
933a9435939c Current xml
nick
parents: 0
diff changeset
84
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
85 Coverage threshold:
3
933a9435939c Current xml
nick
parents: 0
diff changeset
86
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
87 If a coverage threshold is used, the number of reads **on each strand** must be at or above the threshold. If either strand is below the threshold, the line will be omitted. **N.B.** this means the total coverage for each printed site will be at least twice the number you give in the "coverage threshold" option. Also, since only simple variants are counted, a site with 100 reads, all supporting a deletion variant, would not be printed.
3
933a9435939c Current xml
nick
parents: 0
diff changeset
88
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
89 Frequency threshold:
3
933a9435939c Current xml
nick
parents: 0
diff changeset
90
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
91 If a frequency threshold is used, alleles are only counted (in the ALLELES column) if they meet or exceed this minor allele frequency threshold.
3
933a9435939c Current xml
nick
parents: 0
diff changeset
92
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
93 Strand bias:
3
933a9435939c Current xml
nick
parents: 0
diff changeset
94
5
31361191d2d2 Uploaded tarball.
nick
parents: 4
diff changeset
95 The alleles passing the threshold on each strand must match (though not in order), or the allele count will be 0. So a site with A, C, G on the plus strand and A, G on the minus strand will get an allele count of zero, though the (strand-independent) major allele, minor allele, and minor allele frequency will still be reported. If there is a tie for the minor allele, one will be randomly chosen.
3
933a9435939c Current xml
nick
parents: 0
diff changeset
96
0
28c40f4b7d2b Uploaded xml description
nick
parents:
diff changeset
97 </help>
28c40f4b7d2b Uploaded xml description
nick
parents:
diff changeset
98
28c40f4b7d2b Uploaded xml description
nick
parents:
diff changeset
99 </tool>