Adding columns to DEXSeqResults object
Entering edit mode
Clyde • 0
Last seen 11 weeks ago
United States

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 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 <-

# 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.

DEXSeq • 231 views
Entering edit mode
Alejandro Reyes ★ 1.9k
Last seen 4 days ago
Novartis Institutes for BioMedical Reseā€¦

I'd have a look into the match function, that could give you a mapping between the ids in the dxr1 object and your data frame of gene symbols, which you could use to replace the gene ids in the dxr1 object


Login before adding your answer.

Traffic: 599 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6