same results changing contrast function
1
0
Entering edit mode
@ireontiveros-22328
Last seen 23 months 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?

### Set thresholds
>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()


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 • 205 views
0
Entering edit mode

better this format

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

0
Entering edit mode
@mikelove
Last seen 5 hours 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.