Learn R Programming

kangar00 (version 1.4.2)

GWASdata: S4 class for an object representing a Genome-wide Assocaition Study.

Description

S4 class for an object representing a Genome-wide Assocaition Study.

'GWASdata' is a GWASdata object constructor.

show displays basic information on GWASdata object

summary summarizes the content of a GWASdata object and gives an overview about the information included in a GWASdata object. Summary statistics for phenotype and genotype data are calculated.

GeneSNPsize creates a data.frame of pathway names with numbers of snps and genes in each pathway.

Usage

GWASdata(object, ...)

# S4 method for ANY GWASdata(geno, anno, pheno = NULL, desc = "")

# S4 method for GWASdata show(object)

# S4 method for GWASdata summary(object)

# S4 method for GWASdata GeneSNPsize(object)

Arguments

object

A GWASdata object.

...

Further arguments can be added to the function.

geno

An object of any type, including the genotype information.

anno

A data.frame containing the annotation file for the GWASdata object.

pheno

A data.frame specifying individual IDs, phenotypes and covariates to be included in the regression model.

desc

A character giving the GWAS description, e.g. name of study.

Methods (by generic)

  • GeneSNPsize(GWASdata): creates a data.frame of pathway names with numbers of snps and genes in each pathway.

Slots

geno

An object of any type, including genotype information. The format needs to be one line per individual and on colum per SNP in minor-allele coding (0,1,2). Other values between 0 and 2, as from impute dosages, are allowed. Missing values must be imputed prior to creation of a GWASdata object.

anno

A data.frame mapping SNPs to genes and genes to pathways. Needs to include the columns 'pathway' (pathway ID, e.g. hsa number from KEGG database), 'gene' (gene name (hgnc_symbol)), 'chr' (chromosome), 'snp' (rsnumber) and 'position' (base pair position of SNP).

pheno

A data.frame specifying individual IDs, phenotypes and covariates to be included in the regression model e.g. ID, pheno, sex, pack.years. Note: IDs have to be in the first column!

desc

A character giving the GWAS description, e.g. name of study.

Author

Juliane Manitz, Stefanie Friedrichs

Examples

Run this code
# create gwas data object
data(pheno)
data(geno)
data(anno)
gwas <- new('GWASdata', pheno=pheno, geno=geno, anno=anno, desc="some study") 
# show and summary methods
gwas
summary(gwas)
# SNPs and genes in pathway
GeneSNPsize(gwas)

Run the code above in your browser using DataLab