Adding columns to DEXSeqResults object
1
0
Entering edit mode
Clyde • 0
@b19b1e82
Last seen 6 months 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("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.

DEXSeq • 366 views
ADD COMMENT
0
Entering edit mode
Alejandro Reyes ★ 1.9k
@alejandro-reyes-5124
Last seen 4 months 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

ADD COMMENT

Login before adding your answer.

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