Entering edit mode
2.3 years ago
Recep
•
0
Hello everyone,
i want to get transcript lengths of my ensembl ids, however this function gives me more than one values for each gene. I want to get the longest length for each gene.
For example for gene ENSG00000006210 i got 3285, 3313, 563 and 5796. How can take just the biggest value?
require(biomaRt)
ensembl=useEnsembl(biomart="genes",dataset="hsapiens_gene_ensembl") # dataset and database chosen.
datExpr=read.csv("../clustering genes/filtered_reduced_rc.csv",row.names=1) # datExpr file loaded
genes=rownames(datExpr)
x= getBM(attributes = c('transcript_length'), filters = 'ensembl_gene_id', values = genes, mart = ensembl)
Cross-posted: https://support.bioconductor.org/p/9146327/