• 0 views
•
link
removing decimal from ENSEMBL gene ID
I want to remove the decimal from the ensembl gene transcript ID. It contains the decimal point ans becomes difficult when I try to map the same to gene's transcript names in R.
Ensembl gives me "ENST00000265620.11", "ENST00000371081.5". But I want "ENST00000265620" and "ENST00000371081".
• 10,301 views
•
link
2 answers
To learn what those numbers mean, please see here: https://www.ensembl.org/Help/Faq?id=488
Different types of 'regexes' (regular expressions) will do the job for you:
ens <- c('ENST00000265620.11', 'ENST00000371081.5')
sub('\\.[0-9]*$', '', ens)
[1] "ENST00000265620" "ENST00000371081"
Kevin
• 0 views
•
link
gsub("\\..*","", transcript.list)
like in https://stackoverflow.com/questions/10617702/remove-part-of-string-after
• 0 views
•
link
Log in to answer this question.