How to join DESeq2 object "res" to the gene annotation with dplyr?
1
0
Entering edit mode
5.2 years ago
jomagrax ▴ 40

Hi everyone, Im trying to create a diferential expresion table from DESeq2, I have obteined the "res" object from the DESEq2 analysis, and I have imported the gene annotation, the problem is that I don't know how to join these two file so I can obtain a final data frame that has the same information than de "res" object plus the transcripts id that are contained in the gene annotation file.

I have figured out that dplyr's function left_join can be usefull, but I keep getting the error:

left_join(res_data,gen_anotation, by ="gen")

   Error: `by` can't contain join column `gen` which is missing from LHS
Call `rlang::last_error()` to see a backtrace

Thank you all in advance

R RNA-Seq • 3.1k views
ADD COMMENT
2
Entering edit mode
5.2 years ago

Convert res to a data.frame

res_data <- as.data.frame(res)

Then, you can join your data with the dplyr::left_join function or any other similar

To do so, you must have a column in the res file and in the annotation file with the exactly the same gene names. These two columns must have the same colname, such as "gene"

ADD COMMENT

Login before adding your answer.

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