| dense2sparse | R Documentation |
Reads a numeric genotype file and converts it to a sparse matrix format.
dense2sparse(
file.name,
num.genotypes = NULL,
separator = NULL,
fixed = TRUE,
recode = TRUE,
na.strings = c("NA", ".", "-9", "NN"),
progress = TRUE
)
file.name |
Path to the numeric genotype file. Could be (and should be) gzipped. |
num.genotypes |
Maximum number of genotypes to read. An upper bound is OK. |
separator |
"\t" or "," etc. that separates the entries in a line. |
fixed |
Is 'separator' a fixed string (TRUE) or a regex (FALSE)? |
recode |
recode each SNP so its major allele is 0 (per-SNP) |
na.strings |
tokens treated as missing |
progress |
Whether to show a progress bar (default TRUE). |
A sparse matrix of class dgCMatix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.