Contrasts result interpretation
1
0
Entering edit mode
Guest User ★ 13k
@guest-user-4897
Last seen 9.6 years ago
Hi Mike, I have a quick question on contrasts. I am little bit confused with the result that I am getting from the contrasts I am making. The reason is I have 2 timepoints (6h and 12h), 3 different genotypes (PI, Sal, and R), and two different temperatures (20C and 30C). I am interested in seeing what genes are upregulated and downregulated for all the genotypes from timepoint 6h to 12h at 30C versus 20C. I am not sure if I am achieving that from my R analysis. Can you please take a look at my R command lines and see if the results I am getting from my analysis are genes that are differentially expressed at 30C versus 20C from 6h to 12h over all the genotypes? Many thanks, Yoong -- output of sessionInfo(): > DEAnatomy = read.table("C:/Users/yfy/Desktop/NewMicroscopyDE.txt", row.names =1 , header = T, sep = "\t") > colData=data.frame(row.names = colnames(DEAnatomy), + temp=c("20C","20C","20C","20C","20C","20C","30C","30C","30C","30C"," 30C","30C","20C","20C","20C","20C","20C","20C","30C","30C","30C","30C" ,"30C","30C","20C","20C","20C","20C","20C","20C","30C","30C","30C","30 C","30C","30C"), + genotype=c("PI","PI","PI","PI","PI","PI","PI","PI","PI","PI","PI","P I","SAL","SAL","SAL","SAL","SAL","SAL","SAL","SAL","SAL","SAL","SAL"," SAL","R","R","R","R","R","R","R","R","R","R","R","R"), + time=c("6","6","6","12","12","12","6","6","6","12","12","12","6","6" ,"6","12","12","12","6","6","6","12","12","12","6","6","6","12","12"," 12","6","6","6","12","12","12")) > library("DESeq2", lib.loc="C:/Users/yfy/Documents/R/win- library/3.0") > dds = DESeqDataSetFromMatrix(countData = DEAnatomy, colData = colData, design = ~genotype+time+temp) > colData(dds)$time = relevel(colData(dds)$ time, "6") > dds2 = DESeq(dds, betaPrior = FALSE) > resultsNames(dds2) [1] "Intercept" "genotype_RNAi_vs_PI" [3] "genotype_SAL_vs_PI" "time_12_vs_6" [5] "temp_30C_vs_20C" > resctrst2<-results(dds2, contrast=c("time","12","6")) > res<-resctrst2[order(resctrst2$padj),] > sig_results<-res[which(res$padj<.05),] > mcols(resctrst2) DataFrame with 6 rows and 2 columns type description <character> <character> 1 intermediate the base mean over all rows 2 results log2 fold change: time 12 vs 6 3 results standard error: time 12 vs 6 4 results Wald statistic: time 12 vs 6 5 results Wald test p-value: time 12 vs 6 6 results BH adjusted p-values -- Sent via the guest posting facility at bioconductor.org.
• 823 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 14 hours ago
United States
hi Yoong, On Wed, Mar 12, 2014 at 5:04 PM, Yoong [guest] <guest@bioconductor.org>wrote: > > Hi Mike, > > I have a quick question on contrasts. I am little bit confused with the > result that I am getting from the contrasts I am making. The reason is I > have 2 timepoints (6h and 12h), 3 different genotypes (PI, Sal, and R), and > two different temperatures (20C and 30C). I am interested in seeing what > genes are upregulated and downregulated for all the genotypes from > timepoint 6h to 12h at 30C versus 20C. ​Can you be more specific? Do you mean, genes with a log fold change of 30C versus 20C which is different in time 12h than in time 6h? I can't resist to comment, I *highly* recommend using a CSV or TSV file for the phenotypic data (colData). I have seen multiple times: a bioinformatic analysis with curious results, only to find a stray comma or space when entering phenotypic data as character vectors. This can happen when scrolling up and down through the R script and accidentally typing a key. I'm not implying that you have a mistake here, but that it's generally safer practice to read in CSVs. ​Mike​ > I am not sure if I am achieving that from my R analysis. Can you please > take a look at my R command lines and see if the results I am getting from > my analysis are genes that are differentially expressed at 30C versus 20C > from 6h to 12h over all the genotypes? > > Many thanks, > Yoong > > > > > -- output of sessionInfo(): > > > DEAnatomy = read.table("C:/Users/yfy/Desktop/NewMicroscopyDE.txt", > row.names =1 , header = T, sep = "\t") > > > colData=data.frame(row.names = colnames(DEAnatomy), > + > temp=c("20C","20C","20C","20C","20C","20C","30C","30C","30C","30C"," 30C","30C","20C","20C","20C","20C","20C","20C","30C","30C","30C","30C" ,"30C","30C","20C","20C","20C","20C","20C","20C","30C","30C","30C","30 C","30C","30C"), > + > genotype=c("PI","PI","PI","PI","PI","PI","PI","PI","PI","PI","PI","P I","SAL","SAL","SAL","SAL","SAL","SAL","SAL","SAL","SAL","SAL","SAL"," SAL","R","R","R","R","R","R","R","R","R","R","R","R"), > + > time=c("6","6","6","12","12","12","6","6","6","12","12","12","6","6" ,"6","12","12","12","6","6","6","12","12","12","6","6","6","12","12"," 12","6","6","6","12","12","12")) > > > library("DESeq2", lib.loc="C:/Users/yfy/Documents/R/win- library/3.0") > > > dds = DESeqDataSetFromMatrix(countData = DEAnatomy, colData = colData, > design = ~genotype+time+temp) > > > colData(dds)$time = relevel(colData(dds)$ time, "6") > > > dds2 = DESeq(dds, betaPrior = FALSE) > > > resultsNames(dds2) > [1] "Intercept" "genotype_RNAi_vs_PI" > [3] "genotype_SAL_vs_PI" "time_12_vs_6" > [5] "temp_30C_vs_20C" > > > resctrst2<-results(dds2, contrast=c("time","12","6")) > > > res<-resctrst2[order(resctrst2$padj),] > > > sig_results<-res[which(res$padj<.05),] > > > mcols(resctrst2) > DataFrame with 6 rows and 2 columns > type description > <character> <character> > 1 intermediate the base mean over all rows > 2 results log2 fold change: time 12 vs 6 > 3 results standard error: time 12 vs 6 > 4 results Wald statistic: time 12 vs 6 > 5 results Wald test p-value: time 12 vs 6 > 6 results BH adjusted p-values > > -- > Sent via the guest posting facility at bioconductor.org. > [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 756 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6