This function reads in SNP zygosity levels from a text file. The data is
expected to be in tabular format. First column is expected to be the locus
identity (e.g. SNP identifier), and remaining columns are the samples. The
genotypes are expected to be encoded as "hom"
or "het"
, for homozygous
and heterozygous, respectively.
Arguments
- file
A path to file.
- sep
The separator between columns.
- header
Does the first data line contain column names?
- ...
Extra arguments to be passed on to
data.table::fread()
.