same results changing contrast function
1
0
Entering edit mode
@ireontiveros-22328
Last seen 5.0 years ago

Hi ,

I am trying to analyze a dataset with a design of one variable "sample":

gene.name;sample AB3561;dpi14bemisia AB3562;dpi14bemisia AB3563;dpi14bemisia AB3579;dpi14tocv AB3580;dpi14tocv AB3581;dpi14tocv

I have run de analysis and used contrasts in the results() to extract a results table:

>resultsNames(dds)
>contrast<- c("sample", "dpi14tocv", "dpi14bemisia")
>results<-results(dds,contrast = contrast)

The name provided in the second element ("dpi14bemisia") is the level that is used as baseline, right?

The I added thresholds:

### Set thresholds
>padj.cutoff_0.05 <- 0.05
>lfc.cutoff_0.5 <- 0.5

Subset the results table to only include those that are significant using the filter() function:

>results.table <- results%>%
  data.frame() 
#up genes padj<0.05 + fc>0.5
>up_padj_ <- results.table %>%
  filter(padj < padj.cutoff_0.05 & abs(log2FoldChange) > lfc.cutoff_0.5)
>up_padj_

But I have exactly same results if I change the order and use "dpi14tocv" as baseline

Can someone help me to understand why??

Thanks

deseq2 contrast DEG • 855 views
ADD COMMENT
0
Entering edit mode

better this format

gene.name;sample AB3561;dpi14bemisia AB3562;dpi14bemisia AB3563;dpi14bemisia AB3579;dpi14tocv AB3580;dpi14tocv AB3581;dpi14tocv

ADD REPLY
0
Entering edit mode
@mikelove
Last seen 3 days ago
United States

You can use triple backticks (`) to make code blocks, I've edited your post.

If you change the order of the two levels in the contrast, the only thing that will change is the LFC and t-statistic. Check over your code very carefully if you think otherwise. Just do:

results(dds, contrast=c("condition","foo","bar"))
results(dds, contrast=c("condition","bar","foo"))

And you will see this is the case.

ADD COMMENT

Login before adding your answer.

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