Description Usage Arguments Details Value See Also Examples
Require the complete set of 3 files in the binary PLINK format. It includes BED file, BIM file and BAM file. For more information about the binary PLINK format, please check in the manual of PLINK.
1 |
bed |
A path of BED file |
bim |
A path of BIM file |
fam |
A path of FAM file |
only.snp |
If TRUE, the function to read only SNP matrix, otherwise all files are loaded. The default value is FALSE. |
For more details about the binary PLINK format, please check http://zzz.bwh.harvard.edu/plink/binary.shtml
The list containing the matrices of $snp
, $snp.info
,
and $ind.info
.
$snp
is a SNP matrix from BED file.
$snp.info
is a data.frame of SNP information from BIM file.
$ind.info
is a data.frame of individual information from FAM file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #Use the example files embedded in the package.
bed <- system.file("extdata", "example_SNP.bed", package="KRIS")
bim <- system.file("extdata", "example_SNP.bim", package="KRIS")
fam <- system.file("extdata", "example_SNP.fam", package="KRIS")
snp <- read.bed(bed, bim, fam )
#Check the objects inside 'snp'
ls(snp)
#Preview $snp
print(snp$snp[1:10, 1:10])
#Preview $snp.info
head(snp$snp.info)
#Preview $ind.info
head(snp$ind.info)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.