I have a beginner question. How can I add a column to a DEXSeqResults object?
I ran DEXSeq on a transcriptome assembled with Trinity, so it has trinity_ids as gene symbols. However, these are not ideal to show on plots, so I ran blast and got some gene symbols. Now I want to add the column of gene symbols to the DEXSeqResults object before running plotDEXSeq but I am not sure how best to do so.
I have tried converting the object to a data frame, then adding the desired column, but I am not sure how to merge the data frame back to the DEXSeqResults object
# Load RData file
load("hali_transcriptome.dexseq.RData")
# Load blast results with gene symbols
col_names <- c("trinity_id", "gene_symbol")
blast_results <- read.delim("blastout_filtered.temp", header = FALSE, sep = "\t", row.names = NULL, col.names = col_names)
# Convert dxr1.sorted to a data frame
dxr1.sorted.df <- as.data.frame(dxr1.sorted)
# Merge dxr1.sorted with blast_results based on groupID
dxr1.sorted_with_genes <- merge(dxr1.sorted.df, blast_results, by.x = "groupID", by.y = "trinity_id", all.x = TRUE)
I would appreciate any help I can get with this issue.