| read.bed.matrix | R Documentation |
bed.matrix Create a bed.matrix from a .bed file, and either
a .rds file or a .bim and a .fam file.
read.bed.matrix(basename, bed = paste(basename, ".bed", sep=""),
fam = paste(basename, ".fam", sep=""),
bim = paste(basename, ".bim", sep=""),
rds = paste(basename, ".rds", sep=""),
verbose = getOption("gaston.verbose",TRUE))
basename |
Basename of all files |
bed |
Name of the |
fam |
Name of the |
bim |
Name of the |
rds |
Name of the |
verbose |
If |
The .bed, .fam and .bim files follow the PLINK specifications
(http://zzz.bwh.harvard.edu/plink/binary.shtml).
If a .rds file exists (created by write.bed.matrix),
the .fam and .bim files will be ignored.
To ignore an existing .rds file, set rds = NULL.
If the .bed file does not exist, and basename ends by ".bed",
the function will try to generate a new basename by trimming the extension out. This
allows to write read.bed.matrix("file.bed") instead of read.bed.matrix("file").
If the option gaston.auto.set.stats is set to TRUE (the default),
the function set.stats will be called before returning the bed.matrix,
unless a .rds file is present: in this case, the bed.matrix obtained
is identical to the bed.matrix saved with write.bed.matrix.
A bed.matrix
Hervé Perdry and Claire Dandine-Roulland
write.bed.matrix, set.stats
# Read RDS and bed files
x <- read.bed.matrix( system.file("extdata", "LCT.bed", package="gaston") )
x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.