Description Usage Arguments Details Value Author(s) Examples
Read genotype data.
1 2 3 |
fname |
a string specifying the file to read genotype information from |
verbose |
when set show the commands that are to be called through |
run |
when set (default) execute the |
cleanup |
when set (default) remove intermediate files before returning. |
ftype |
genotype file format, it accepts three options:
For "plink", |
plink.path |
path of plink executable. Only needed when the |
... |
not used. |
If it is plink file format (.bed, .bim, .fam), make sure that plink has already been installed in the system
a dataframe of genotype data: columns are the SNPs; rows are indviduals.
Beibei Jiang beibei_jiang@psych.mpg.de and Benno Pütz puetz@psych.mpg.de
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## "snp.head" genotype file: rows are individuals and columns are SNPs
# get full path of example file
fgeno.path <- system.file("extdata", "10SNP.txt", package="SimPhe")
geno <- read.geno(fgeno.path, ftype = "snp.head")
head(geno)
## "plink" genotype file: 1).map and .ped; 2).bed, .fam and .bim
# get directory of plink example file
fpath <- strsplit(fgeno.path, "10SNP.txt")
#### Note: before run this example, specify your installation path of plink ####
# geno <- read.geno(paste0(fpath, "bdemo"), ftype = "plink", plink.path = "user's plink path")
|
SNP01 SNP02 SNP03 SNP04 SNP05 SNP06 SNP07 SNP08 SNP09 SNP10
ind1 0 0 1 2 1 2 1 1 2 1
ind2 0 2 0 1 0 0 0 1 0 0
ind3 0 1 0 1 0 1 1 1 2 0
ind4 0 0 1 2 2 0 1 0 0 1
ind5 0 0 0 0 2 0 0 1 0 0
ind6 0 1 1 1 0 1 1 0 0 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.