Problems to find the pvalues via rowttests
1
0
Entering edit mode
@953c4872
Last seen 4 months ago
Mexico

Hi. I am doing exercises of Bioconductor to get started with it. I am looking forward to finding the proportion of genes, whose pvalue from biological replicates are above 0.05. I have tried to use the following code:

BiocManager::install("genomicsclass/maPooling")

##Here, I just obtain the data
library(Biobase)
library(maPooling)
data(maPooling)
pd=pData(maPooling)
##now, I will create the base to create pool and indiv in the following lines. Pool will contain pooled samples(technical replicates) and indiv the individual samples (biological replicates)
pooled=which(rowSums(pd)==12)
individuals=which(rowSums(pd)==1)
##I am removing replicates
individuals=individuals[-grep("tr",names(individuals))]
pool = exprs(maPooling)[,pooled]
indiv = exprs(maPooling)[,individuals]
strain = ifelse(grepl("a",rownames(pData(maPooling))),0,1)

g_pool = strain[pooled]
g_indiv = strain[individuals]


After that, I computed ttests for the pool variable and then I obtained qvalues, with the code

library(genefilter)
library(qvalue)
pvals = rowttests(pool,factor(g_pool))$p.value qvals = qvalue(pvals)$qvalue
sum(qvals < 0.05)
2169


So far, all of this is good. No errors. Now, I just need pvalues for indiv, but for the genes that I found out to be <0.05(only the 2169 genes that match the condition). I don't know how to filter these genes whose qvalues were in the desired condition, and then obtain pvalues via rowttests only for those genes. I hope I made myself clear. If not, let me know, but some advice would be welcome.

rowttests • 135 views
1
Entering edit mode
@gordon-smyth
Last seen 10 minutes ago
WEHI, Melbourne, Australia

Ordinary t-tests aren't recommended for genomic analyses because they have poor power and higher false discovery rates. Using the limma package instead, as you did in another post, would give better results and would also help you select the top genes with FDR < 0.05.