Description Details Author(s) References Examples
Sexual dimoprhic and COPD differential (SDCD) analysis contrasts regression coefficients from two stratified analysis. Stratification can be done in two ways: by COPD status or by sex. For COPD-stratified analysis, SDCD analysis contrasts sexual dimorphism between cases and controls, while sex-stratified SDCD analsysis contrasts COPD differential expression pattern between males and females. The package is meant to be used in conjunction with the package limma.
Package: | COPDSexualDimorphism |
Type: | Package |
Version: | 1.0 |
Date: | 2013-09-02 |
License: | LGPL-2.1 |
Data and main methods to accompany "Integrative Genomics of Sexual Dimorphism in COPD."
The main functions are sdcd
, which contrasts regression coefficients from
sex-stratified and COPD-stratified analyses.
J Fah Sathirapongsasuti
Maintainer: J Fah Sathirapongsasuti <fah@cs.stanford.edu>
Sathirapongsasuti JF, Glass K, Huttenhower C, Quackenbush J, DeMeo DL. Integrative Genomics of Sexual Dimorphism in COPD. (In Prep).
www.lung-genomics.org
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | data(lgrc.expr.meta)
data(lgrc.expr)
data(lgrc.genes)
library(limma)
## Sex-stratified
design.mtx = cbind(ctrl=1,
copd=as.integer(grepl("COPD",colnames(expr))),
age=expr.meta$age,
pkyr=expr.meta$pkyrs)
good.idx = apply(design.mtx,1,function(x){!any(is.na(x))}) & (expr.meta$gender == "1-Male")
male.fit = lmFit(log(expr)[,good.idx], design.mtx[good.idx,])
male.fit = eBayes(male.fit)
good.idx = apply(design.mtx,1,function(x){!any(is.na(x))}) & (expr.meta$gender == "2-Female")
female.fit = lmFit(log(expr)[,good.idx], design.mtx[good.idx,])
female.fit = eBayes(female.fit)
male.female.copd.beta.diff.genes = sdcd(male.fit, female.fit, "copd", lgrc.genes, fdr.cutoff=0.25, file.prefix="male.female.copd", write.file=FALSE)
## COPD-stratified
design.mtx = cbind(ctrl=1,
gender=expr.meta$gender,
age=expr.meta$age,
pkyr=expr.meta$pkyrs)
good.idx = apply(design.mtx,1,function(x){!any(is.na(x))}) & grepl("COPD",colnames(expr))
copd.fit = lmFit(log(expr)[,good.idx], design.mtx[good.idx,])
copd.fit = eBayes(copd.fit)
good.idx = apply(design.mtx,1,function(x){!any(is.na(x))}) & grepl("CTRL",colnames(expr))
ctrl.fit = lmFit(log(expr)[,good.idx], design.mtx[good.idx,])
ctrl.fit = eBayes(ctrl.fit)
copd.ctrl.gender.beta.diff.genes = sdcd(copd.fit, ctrl.fit, "gender", lgrc.genes, fdr.cutoff=0.25, file.prefix="copd.ctrl.gender", class.names=c("copd","ctrl"), write.file=FALSE)
## Combine
sdcd.genes = merge(copd.ctrl.gender.beta.diff.genes, male.female.copd.beta.diff.genes, by=setdiff(intersect(names(copd.ctrl.gender.beta.diff.genes), names(male.female.copd.beta.diff.genes)),c("beta.diff","beta.diff.pooled.sd")))
sdcd.genes = unique(sdcd.genes)
print(paste("There are", nrow(sdcd.genes),"SDCD genes"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.