Description Usage Arguments Details Value
View source: R/vcf_functions.R
This function may be used to convert phased genotype data for diplod organisms into a sparse matrix.
1 | genos2sparseMatrix(genotypes)
|
genotypes |
A dataframe or matrix of genotypes. The columns of |
The columns of genotypes
are assumed to be individuals (i.e. a diploid human) and the rows are assumed to be mutations. Thus, the (i,j)th entry of genotypes
is the genotype of the jth person at the ith SNV site. Please note that genotypes
should not contain missing values. Additionally, genotypes may take one of the following three forms:
"0|0" if the individual is homozygous for the reference allele,
"0|1" or "0|1" if the individual is heterozygous for the alternate allele,
"1|1" if the individual is homozygous for the alternate allele.
A sparseMatrix. Note that the rows and columns of the returned matrix have been transposed so that individual haplotypes are rows, and each column represents an SNV.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.