I was wondering if it was possible to annotate my DESeq2 genes with my tx2gene file by having a third column with gene names/ids?
You can add metadata columns to the dds object with:
mcols(dds)$newColumn <- ...
DESeq2 doesn't have functionality for this.
However, tximeta (a metadata wrangling package we wrote) does have functionality for this if you've used Salmon for quantification.
Alternatively, you can just manually use mapIds from the GenomicFeatures package and the code chunk above.
So, if I read that correctly I should be able to merge my DDS object based on some unifying characters (in this case, the transcript or gene ID) with a R code(I know how to code for this but wasn't sure if was feasible conceptually in DESeq2)?
Yeah just using base R line up whatever identifiers you want and add to the metadata columns as I’ve shown above.
Login before adding your answer.
Use of this site constitutes acceptance of our User Agreement and Privacy