Hi Everyone,
I'm looking for some help to make sure my data frame is set up correctly. My experiment has 30 samples from 10 subjects, 3 time points each, and I want to tell the software to look for differential gene expression between 3 time points (or essentially baseline (t1) vs t2, and baseline vs t3 while grouping the samples that come from the same subject (see the attachment). The code I'm using is below. I get as far attempting to estimate the dispersion but run into greater than 50 "glm.fit: algorithm did not converge" warnings.
I'm not sure this is the right way to group samples by subject...
I'm still very much in the process of learning how to use this package and would appreciate anyone's help on this immensely! Thanks in advance!
I'm looking for some help to make sure my data frame is set up correctly. My experiment has 30 samples from 10 subjects, 3 time points each, and I want to tell the software to look for differential gene expression between 3 time points (or essentially baseline (t1) vs t2, and baseline vs t3 while grouping the samples that come from the same subject (see the attachment). The code I'm using is below. I get as far attempting to estimate the dispersion but run into greater than 50 "glm.fit: algorithm did not converge" warnings.
Code:
count_table <- read.csv("C:\\filepath...file.csv", header=TRUE, row.names=1) head(count_table) expt_design1 <- data.frame(row.names = colnames(count_table), subject = c(rep("subj01",3),rep("subj02",3),rep("subj03",3),rep("subj04",3),rep("subj05",3),rep("subj06",3),rep("subj07",3),rep("subj08",3),rep("subj09",3),rep("subj10",3)),time = c("t1","t2","t3","t1","t2","t3","t1","t2","t3","t1","t2","t3","t1","t2","t3","t1","t2","t3","t1","t2","t3","t1","t2","t3","t1","t2","t3","t1","t2","t3")) cds <- newCountDataSet(count_table, expt_design) head(counts(cds)) cds = estimateSizeFactors(cds) sizeFactors(cds) head(counts(cds,normalized=TRUE)) cds = estimateDispersions(cds, method = c("pooled-CR"), sharingMode = c("gene-est-only"),modelFormula = (count ~ time + subject))
I'm still very much in the process of learning how to use this package and would appreciate anyone's help on this immensely! Thanks in advance!
Comment