Description Usage Arguments Value Author(s) See Also Examples
For any given ploidy and number of alleles, the
VCF specification indicates the
order in which genotypes should be listed in the GP
, GL
, and
PL
fields. This functions generates strings representing genotypes in
that order, formatted for the GT
field of a VCF.
1 | genotypeStrings(ploidy, n_alleles, sep = "/")
|
ploidy |
An integer indicating the ploidy. |
n_alleles |
An integer indicating the number of alleles, including the reference allele. |
sep |
A character for separating alleles within genotype strings. |
Using the default sep
value, a character vector containing unphased
genotypes formatted for the GT
field in a VCF file, in the order
indicated in the VCF specification for the GL
field.
Lindsay V. Clark
1 2 3 4 5 | # diploid with one reference and one alternative allele
genotypeStrings(2, 2)
# tetraploid with one reference and two alternative alleles
genotypeStrings(4, 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.