Mark Robinson <mrobinson at="" ...=""> writes:
Hi Mark,
>
> Hi Anton.
>
> I've had a quick look at both batches of your plots. The replicates
are quite
variable, but something is
> indeed unusual. Can you post your full set of commands used?
>
> Cheers,
> Mark
>
Typically for this data just following the manual examples, data files
are tab
files with one column tag sequence and one counts plus header for each
column.
library(edgeR)
targets <- read.delim(file = "Targets.txt", stringsAsFactors = FALSE)
targets
d <- readDGE(targets, header=TRUE)
d
d <- d[rowSums(d$counts) > 5, ]
d
#pdf(file="MDSLND10.pdf")
plotMDS.dge(d, main="MDS Plot for LND10 Data", xlim=c(-5,5))
#dev.off()
d <- estimateCommonDisp(d)
names(d)
d$samples$lib.size
d$common.lib.size
colSums(d$pseudo.alt)
d$common.dispersion
sqrt(d$common.dispersion)
de.common <- exactTest(d)
topTags(de.common)
detags.com <- rownames(topTags(de.common)$table)
d$counts[detags.com, ]
topTags(de.common, sort.by = "logFC")
sum(de.common$table$p.value < 0.01) #p-value <0.01
sum(de.common$table$p.value < 0.05) #p-value <0.05
top45 <- topTags(de.common, n = 45)
sum(top45$table$logFC > 0)
sum(top45$table$logFC < 0)
top751 <- topTags(de.common, n = 751)
sum(top751$table$logFC > 0)
sum(top751$table$logFC < 0)
sum(p.adjust(de.common$table$p.value, method = "BH") < 0.05)
sum(p.adjust(de.common$table$p.value, method = "BH") < 0.1)
detags500.com <- rownames(topTags(de.common, n = 500)$table)
plotSmear(d, de.tags = detags500.com, main = "FC plot using common
dispersion")
abline(h = c(-2, 2), col = "dodgerblue", lwd = 2)
#Moderated tagwise dispersion
d <- estimateTagwiseDisp(d, prior.n = 10)
names(d)
d$prior.n
head(d$tagwise.dispersion)
summary(d$tagwise.dispersion)
d$common.dispersion
#Estimating smoothing using an approximate eBayes rule
prior.n <- estimateSmoothing(d)
prior.n
#exactTest
de.tagwise <- exactTest(d, common.disp = FALSE)
topTags(de.tagwise)
topTags(de.tagwise, n = 10, sort.by = "logFC")
sum(de.tagwise$table$p.value < 0.01) #p-value <0.01
sum(de.tagwise$table$p.value < 0.05) #p-value <0.05
top12 <- topTags(de.tagwise, n = 12)
sum(top12$table$logFC > 0)
sum(top12$table$logFC < 0)
top537 <- topTags(de.tagwise, n = 537)
sum(top537$table$logFC > 0)
sum(top537$table$logFC < 0)
detags.tgw <- rownames(topTags(de.tagwise)$table)
detags.com <- rownames(topTags(de.common)$table)
d$counts[detags.tgw, ]
d$counts[detags.com, ]
sum(rownames(topTags(de.tagwise)$table) %in%
rownames(topTags(de.common)$table))
sum(rownames(topTags(de.tagwise, n = 100)$table) %in%
rownames(topTags(de.common, n = 100)$table))
sum(rownames(topTags(de.tagwise, n = 1000)$table) %in%
rownames(topTags(de.common,n = 1000)$table))/1000 * 100
sum(p.adjust(de.common$table$p.value, method = "BH") < 0.05)
sum(p.adjust(de.common$table$p.value, method = "BH") < 0.1)
sum(p.adjust(de.tagwise$table$p.value, method = "BH") < 0.05)
sum(p.adjust(de.tagwise$table$p.value, method = "BH") < 0.1)
detags500.com <- rownames(topTags(de.common, n = 500)$table)
detags500.tgw <- rownames(topTags(de.tagwise, n = 500)$table)
par(mfcol = c(2, 1))
plotSmear(d, de.tags = detags500.com, main = "Using common
dispersion")
abline(h = c(-2, 2), col = "dodgerblue", lwd = 2)
plotSmear(d, de.tags = detags500.tgw, main = "Using tagwise
dispersions")
abline(h = c(-2, 2), col = "dodgerblue", lwd = 2)