calcFreqMissSnpGenosPerSnp | R Documentation |
Calculate the frequency of missing genotypes for each marker.
calcFreqMissSnpGenosPerSnp(X = NULL, vcf.file = NULL, yieldSize = 10000)
X |
matrix of marker genotypes, with genotypes in rows and markers in columns; missing values should be encoded as NA; if not NULL, will be used in priority even if |
vcf.file |
path to the VCF file (if the bgzip index doesn't exist in the same directory, it will be created); used only if |
yieldSize |
number of records to yield each time the VCF file is read from (see ?TabixFile) |
vector
Timothee Flutre
## Not run: ## simulate fake SNP genotypes
set.seed(1859)
X <- simulGenosDose(nb.genos=200, nb.snps=10^3)
## randomly create missing SNP genotypes
idx <- sample.int(n=length(X), size=10^3)
X[idx] <- NA
miss.snp <- calcFreqMissSnpGenosPerSnp(X=X)
hist(miss.snp, xlab="proportion of missing data at a given SNP,\nmeasured across all individuals", ylab="number of SNPs")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.