Gene-level TPM from salmon
I tried this to convert transcript ids from salmon to gene ids
library(EnsDb.Hsapiens.v86)
library(dplyr)
salmon_output = read.delim("quant.sf")
tx2gene = transcripts(EnsDb.Hsapiens.v86, columns=c("tx_id", "gene_name", "gene_id"), return.type="DataFrame")
gene_tpms <- salmon_output %>%
inner_join(tx2gene, by=c("Name"="tx_id")) %>%
group_by(gene_id, gene_name) %>%
summerise(TPM=sum(TPM))
This always generates the error
Error in UseMethod("tbl_vars") : no applicable method for 'tbl_vars' applied to an object of class "c('DataFrame', DataTable', 'SimpleList', 'DataTable_OR_NULL', 'List', 'Vector', 'list_OR_List', 'Annotated')"
I understand that it has got something to do with the structure of the data but unable to fix it
• 227 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Hi,
Which are the classes of
salmon_outputandtx2genetables?António