annotate varextract.xml @ 0:6231ae8f87b8

Uploaded
author wolma
date Wed, 11 Feb 2015 08:29:02 -0500
parents
children a548b3c6ed00
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
1 <tool id="extract_variants" name="Extract Variant Sites">
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
2 <description>from a BCF file</description>
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
3 <version_command>mimodd version -q</version_command>
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
4 <command>
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
5 mimodd varextract "$ifile"
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
6 #if $len($sitesinfo)
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
7 -p
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
8 #for $source in $sitesinfo
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
9 "${source.pre_vcf}"
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
10 #end for
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
11 #end if
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
12 --ofile "$output_vcf"
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
13 $keep_alts
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
14 --verbose
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
15 </command>
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
16
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
17 <inputs>
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
18 <param name="ifile" type="data" format="bcf" label="BCF input file" help="Use the Variant Calling tool to generate the input for this tool."/>
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
19 <repeat name="sitesinfo" title="include information from pre-calculated vcf file" default="0">
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
20 <param name="pre_vcf" type="data" format="vcf" label="independently generated vcf file" />
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
21 </repeat>
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
22 <param name="keep_alts" type="boolean" label="keep all sites with alternate bases" truevalue="-a" falsevalue="" checked="false" help="If selected, the VCF output will include ALL sites for which non-reference bases have been observed, i.e., even those not considered allelic sites by the variant caller." />
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
23 </inputs>
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
24 <outputs>
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
25 <data name="output_vcf" format="vcf" label="Variants extracted with MiModd from ${on_string}"/>
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
26 </outputs>
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
27
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
28 <help>
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
29 .. class:: infomark
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
30
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
31 **What it does**
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
32
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
33 The tool takes as input a BCF file like the ones produced by the *Variant Calling* tool, extracts just the variant sites from it and reports them in VCF format.
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
34
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
35 If the BCF input file specifies multiple samples, sites are included if they qualify as variant sites in at least one sample.
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
36
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
37 In a typical analysis workflow, you will use the tool's VCF output as input for the *VCF Filter* tool to cut down the often still impressive list of sites to a subset with relevance to your project.
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
38
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
39 **Options:**
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
40
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
41 1) By default, a variant site is considered to be a position in the genome for which a non-reference allele appears in the inferred genotype of any sample.
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
42
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
43 You can select the *keep all sites with alternate bases* option, if instead you want to extract all sites, for which at least one non-reference base has been observed (whether resulting in a non-reference allele call or not). Using this option should rarely be necessary, but could be occassionally helpful for closer inspection of candidate genomic regions.
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
44
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
45 2) During the process of variant extraction the tool can take into account genome positions specified in one or more independently generated VCF files. If such additional VCF input is provided, the tool output will contain the samples found in these files as additional samples and sites from the main BCF file will be included if they either qualify as variant sites in at least one sample specified in the BCF or if they are listed in any of the additional VCF files.
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
46
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
47 Optional VCF input can be particularly useful in one of the following situations:
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
48
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
49 *scenario i* - you have prior information that leads you to think that certain genome positions are of special relevance for your project and, thus, you are interested in the statistics produced by the variant caller for these positions even if they are not considered variant sites. In this case you can use a minimal VCF file to guide the variant extraction process to include these positions. This minimal VCF file needs a minimal header:
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
50
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
51 ``##fileformat=VCFv4.2``
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
52
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
53 followed by positional information like in this example::
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
54
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
55 #CHROM POS ID REF ALT QUAL FILTER INFO
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
56 chrI 1222 . . . . . .
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
57 chrI 2651 . . . . . .
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
58 chrI 3659 . . . . . .
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
59 chrI 3731 . . . . . .
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
60
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
61 , where columns are tab-separated and . serves as a placeholder for missing information.
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
62
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
63 *scenario ii* - you have actual variant calls from an additional sample, but you do not have access to the original sequenced reads data (if you had, the recommended approach would be to align this data along with your other sequencing data or, at least, to perform the *Variant Calling* step together).
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
64
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
65 This situation is often encountered with published datasets. Assume you have obtained a list of known single nucleotide variants (SNVs) found in one particular strain of your favorite model organism and you would like to know which of these SNVs are present in the related strains you have sequenced. You have aligned the sequenced reads from your samples and have used the *Variant Calling* tool, which has generated a BCF file ready for variant extraction. If the SNV list for the previously sequenced strain is in VCF format already, you can now just plug it into the analysis process by specifying it in the tool interface as an *independently generated vcf file*. The resulting vcf output file will contain all SNV sites along with the variant sites found in the BCF alone. You can then proceed to the *VCF Filter* tool to look at the original SNV sites only or to investigate any other interesting subset of sites. If the SNV list is in some other format, you will have o convert it to VCF first. At a minimum, the file must have a ``##fileformat`` header line like the previous example and have the ``REF`` and ``ALT`` column filled in like so::
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
66
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
67 #CHROM POS ID REF ALT QUAL FILTER INFO
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
68 chrI 1897409 . A G . . .
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
69 chrI 1897492 . C T . . .
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
70 chrI 1897616 . C A . . .
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
71 chrI 1897987 . A T . . .
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
72 chrI 1898185 . C T . . .
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
73 chrI 1898715 . G A . . .
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
74 chrI 1898729 . T C . . .
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
75 chrI 1900288 . T A . . .
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
76
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
77 , in which case the tool will assume that the corresponding sample is homozygous for each of the SNVs. If you need to distinguish between homozygous and heterozygous SNVs you will have to extend the format to include a format and a sample column with genotype (GT) information like in this example::
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
78
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
79 #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT sampleX
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
80 chrI 1897409 . A G . . . GT 1/1
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
81 chrI 1897492 . C T . . . GT 0/1
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
82 chrI 1897616 . C A . . . GT 0/1
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
83 chrI 1897987 . A T . . . GT 0/1
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
84 chrI 1898185 . C T . . . GT 0/1
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
85 chrI 1898715 . G A . . . GT 0/1
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
86 chrI 1898729 . T C . . . GT 0/1
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
87 chrI 1900288 . T A . . . GT 0/1
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
88
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
89 , in which sampleX would be heterozygous for all SNVs except the first.
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
90
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
91 .. class:: warningmark
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
92
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
93 If the optional VCF input contains INDEL calls, these will be ignored by the tool.
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
94
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
95
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
96 </help>
6231ae8f87b8 Uploaded
wolma
parents:
diff changeset
97 </tool>