The deprecated way to create a
VCF object from a variant/tally
GRanges. This can then be output to a file using
writeVcf. The flavor of VCF is
specific for calling variants, not genotypes; see below.
Unique ID for the sample in the VCF.
Description of the project/experiment; will be included in the VCF header.
GRanges has an element for every unique combination
of position and alternate base. A
VCF object, like the file
format, has a row for every position, with multiple alternate alleles
collapsed within the row. This is the fundamental difference between
the two data structures. We feel that the
GRanges is easier to
manipulate for filtering tasks, while
VCF is obviously
necessary for communication with external databases and tools.
Normally, despite its name, VCF is used for communicating genotype calls. We are calling variants, not genotypes, so we have extended the format accordingly.
Here is the mapping in detail:
rowRanges is formed by dropping the metadata columns
colData consists of a single column,
“Samples”, with a single row, set to 1 and named
exptData has an element “header” with element
“reference” set to the
seqlevels(x) and element
“samples” set to
sample.id. This will also include the
necessary metadata for describing our extensions to the format.
fixed table has the “REF” and “ALT”
alleles, with “QUAL” and “FILTER” set to
geno list has six matrix elements, all with a
single column. The first is the mandatory “GT” element, the
genotype, which we set to
NA. Then there is “AD”
(list matrix with the read count for each REF and ALT),
“DP” (integer matrix with the total read count), and
“AP” (list matrix of 0/1 flags for whether whether REF
and/or ALT was present in the data).
This function is DEPRECATED. The
now returns a
VRanges object that can
be coerced to a
VCF object via
Michael Lawrence, Jeremiah Degenhardt
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.