Question: How get genename by tximport
gravatar for lkianmehr
11 months ago by
lkianmehr0 wrote:


I am trying to get gene name as well as geneid and tx id, but I do not know how. tx2gene.gencode.M19 GRCm38.p6.csv is list of GENEID and TXID. the list of gene and transcript name is in another file like tx2gene.csv

could you please guide how can I do it?

tx2gene <- read_csv(file.path(dir, "tx2gene.gencode.M19 GRCm38.p6.csv"))

txi <- tximport(files, type = "salmon", tx2gene = tx2gene)

with theses commands I jut get geneid and TXid, I'd like to have genesymbol or genename. should I kept genename columns is quant.sf file to do that?




tximport genename • 344 views
ADD COMMENTlink modified 11 months ago by Michael Love25k • written 11 months ago by lkianmehr0
Answer: How get genename by tximport
gravatar for Michael Love
11 months ago by
Michael Love25k
United States
Michael Love25k wrote:

tximport doesn't provide functionality for adding gene symbols by itself.

I do not recommend to have gene symbols or gene names as the row names of the dataset, but instead add these on as metadata columns. The Ensembl IDs are much better as row names of the dataset.

One way to get the gene names is using the annotation packages. And here is some more information on how to use the annotation packages:

> library(
> db <-
> columns(db)
 [7] "ENZYME"       "EVIDENCE"     "EVIDENCEALL"  "GENENAME"     "GO"           "GOALL"
[13] "IPI"          "MGI"          "ONTOLOGY"     "ONTOLOGYALL"  "PATH"         "PFAM"
[19] "PMID"         "PROSITE"      "REFSEQ"       "SYMBOL"       "UNIGENE"      "UNIPROT"

> mapIds(db, keys="ENSMUSG00000030359", column="SYMBOL", keytype="ENSEMBL")
'select()' returned 1:1 mapping between keys and columns
ADD COMMENTlink written 11 months ago by Michael Love25k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 126 users visited in the last hour