<p>A Gene Expression Experiment – Practical</p><p>November 2008</p><p>Richard Mott</p><p>1. Repeat the analysis of the liver data set in the lecture (the commands are repeated here but you should refer to the lecture notes as well)</p><p>(i) Load the data (NOTE these are binary files)</p><p>> load("liver.exp.RData") </p><p>> load("liver.cov.RData")</p><p>(ii) threshold the data</p><p>>liver.median <- apply(liver.exp, 2, median )</p><p>> hist(liver.median, breaks=50) </p><p>>liver.subset <- liver.exp[,liver.median>6]</p><p>(If your computer has enough RAM, try using a bigger data set by decreasing the threshold 6 to eg 5)</p><p>(iv) Look for sex effects</p><p>> tfunc <- function( X, GENDER ) { tt <- t.test( X ~ GENDER ); return(tt$p.value) }</p><p>> sex.pvalue <- apply(liver.subset, 2,tfunc, liver.cov$GENDER )</p><p>> hist( sex.pvalue, breaks=50)</p><p>> sum(sex.pvalue<1.0e-5)</p><p>(v) Heritability</p><p>> anova.pvalue <- function( X, factor ) { a <- anova(lm( X ~ factor)); return(a[1,5])}</p><p>>family.pvalue <- apply( liver.subset, 2, anova.pvalue, liver.cov$Family )</p><p>Extra exercise – report the % variance explained instead of the p-value</p><p>(vi) Weight</p><p>> weight.pvalue <- apply( liver.subset, 2, anova.pvalue, liver.cov$EndNormalBW ) > hist(weight.pvalue,breaks=50)</p><p>(vii) GO analysis</p><p>>go1 <- read.delim("GO.Ensembl.01.txt")</p><p>>go1$transcript <- paste(“LIVER.express.”, make.names(go1$Transcript),sep=””)</p><p>>go2name <- read.delim(“GO2name.txt”, sep=”\t”)</p><p>>intersect <- colnames(liver.subset)[match(go1$transcript, colnames(liver.subset), nomatch = 0)]</p><p>> intersect <- unique(sort(intersect)) </p><p>> liver.subset.intersect <- liver.subset[, match(intersect, colnames(liver.subset))]</p><p>> go.intersect <- go1[match(intersect,go1$transcript),]</p><p>> sex.ids <- colnames(liver.subset)[sex.pvalue<0.01]</p><p>> sex.intersect <- sex.ids[match(sex.ids,intersect,nomatch=0)]</p><p>> sex.idx <- go.intersect$transcript %in% sex.ids</p><p>> fisher.func <- function( X, sex.idx) { X <- as.factor(X) ; if ( nlevels(X) == 2 ) {f <- fisher.test(X, sex.idx); return (f$p.value)} else return(1) }</p><p>> fish <- apply( go.intersect[,4:ncol(go.intersect)], 2, fisher.func, sex.idx ) </p><p>> fish[fish < 0.01]</p><p>> data.frame( pvalue=fish[fish<0.01], desc=as.character(go2name$desc[go2name$go %in% names(fish[fish<0.01])]))</p><p>2. Now repeat the analysis on the lung data set</p><p>3. Investigate these data sets using your own initiative. For example, are there differences between expression for different chromosomes? (you will need the file mouse.transcripts.genes.txt, use read.delim())</p>
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages2 Page
-
File Size-