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
1 answer
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"
Log in to answer this question.