How to perform paired t-test in R for obtaining p-value of each gene?
2
0
Entering edit mode
18 months ago

I'm interested in paired t-test for obtaining p-values for each gene. I used the t.test function in R, but it only gives one single p-value. How do I get p-value for all genes? I have 46 pairs of tumor and normal samples.

####Load necessary packages######

library(NOISeq)
library(edgeR)
library(DESeq2)
library(stats)
library(limma)
library(Rsamtools)

####Load the data #####

LIMS <- read.delim(file.choose(), row.names=1)

#####Perform paired t-test between tumor and normal samples####

Tumor <- unlist(LIMS[, 1:46])
Normal <- unlist(LIMS[, 47:92])
y <- t.test(Tumor, Normal, paired = TRUE)
p-value RNA-Seq z-score t-test • 1.2k views
ADD COMMENT
0
Entering edit mode

I think you would need to run a 2-way ANOVA to get p-values for all genes. However, it's my understanding that false discovery rate (FDR) is the gold standard for RNA-seq.

ADD REPLY
0
Entering edit mode

Following the DESeq2 pipeline, you directly get the adjusted p-values for all genes.

ADD REPLY
0
Entering edit mode

Actually all my samples are paired and hence I want to apply paired t-test. I guess DESeq2 only offers unpaired two-sample t-test and not paired t-test.

ADD REPLY
0
Entering edit mode

Want to make sure you saw ATpoint's post. You would include that information into the design by adding another column to your colData

ADD REPLY
1
Entering edit mode
18 months ago
ATpoint 82k

You have to include the pairing information into the design, then you get a proper paired test in DESeq2. It’s a FAQ, see http://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#can-i-use-deseq2-to-analyze-paired-samples

ADD COMMENT
0
Entering edit mode
18 months ago
Gordon Smyth ★ 7.0k

You already computed genewise paired t-tests using limma a few days ago: How to apply two tailed paired t-test in limma for DEGs selection?

ADD COMMENT

Login before adding your answer.

Traffic: 1944 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