How to extract the results table for specific samples names after normalization by DESeq in R?
1
0
Entering edit mode
2.2 years ago
Amr ▴ 180

How to extract the results table for specific samples names after normalization by DESeq in R?

After I did normalization in R with DESeq2 I got the results table with results function, now I need to get the results but not for all samples, I just need for 2 samples, how to extract it?

res <- results(dds)
res

log2 fold change (MLE): condition Normal Cell vs Cancer Cell

Thanks in advance

DESeq2 normalization R • 1.2k views
ADD COMMENT
1
Entering edit mode
2.2 years ago
Amr ▴ 180

I guess the best solution for this question is:

countdata3<- subset(countdata, select=c("sample_name1_rep1", "sample_name1_rep2", sample_name2_rep1","sample_name2_rep2"))

coldata3<- data.frame("condition"=as.factor(c(rep("Normal",2),rep("Mutated",2))),row.names=colnames(countdata3))

dds3 <- DESeqDataSetFromMatrix(countData = countdata3, colData =coldata3,design = ~condition )

dds3 <- DESeq(dds3)

results(dds3)

Then the results will be calculated depending on the samples inside the dataframe not all samples.

ADD COMMENT
1
Entering edit mode

How to extract the results table for specific samples

You are not "extracting" the result table. You are doing a completely new the deseq2 analysis with a smaller set of samples from the original dataframe (countdata)

ADD REPLY
0
Entering edit mode

Yes you are right, but is there another way to extract them after making normalization for all samples?

ADD REPLY

Login before adding your answer.

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