| readGenes {GeneticsBase} | R Documentation |
Import genetic data from standard file formats.
readGenes(gfile, gformat=genotypeFileFormats, goptions=list(),
pfile, pformat=phenotypeFileFormats, poptions=list(),
mfile, mformat=markerFileFormats, moptions=list() )
gfile |
File containing genotype data |
gformat |
Function, function name, or a character file format
specification from the list genotypeFileFormats. |
goptions |
Optional arguments for loading genotype data. |
pfile |
File containing phenotype data |
pformat |
Function, function name, or a character file format
specification from the list phenotypeFileFormats. |
poptions |
Optional arguments for loading phenotype data. |
mfile |
File containing marker data |
mformat |
Function, function name, or a character file format
specification from the list markerFileFormats. |
moptions |
Optional arguments for loading marker data. |
Load genotype and (optionally) phenotype and marker information from the specified files and generate a geneSet object containing the results.
A variety of file formats are available. See the variables
genotypeFileFormats, phenotypeFileFormats,
phenotypeFileFormats for formats.
An object of class geneSet.
Adding a new genotype (phenotype) file format requires creation of a
function named readGenes.newformat (read.newformat) and
adding the string "newformat" to the vector genotypeFileFormats
(phenotypeFileFormats).
Please submit new format functions to the authors for inclusion in the package.
Gregory R. Warnes warnes@bst.rochester.edu
read.table, etc
# Perlegen data set (if we have access to it)
# (189K SNPS x 1008 patients)
path <- "~/clingen/Perlegen_Metabolic_Disorder/Data"
fname <- file.path(path,"PFZ_03/genotype.txt.gz")
if(file.exists(fname))
{
genef <- gzfile(fname) # open the gzip compressed SNP file
#phenof <-
markerf <-file.path(path,"PFZ_03/snp_info.txt")
pgdata <- readGenes(gfile=genef, gformat="perlegen",
mfile=markerf, mformat="table",
moptions=list(sep="\t",header=TRUE))
close(genef)
}