Hi,
I got a question regarding biomaRt. When I execute:
library(biomaRt)
mart38<-useMart(biomart="ENSEMBL_MART_ENSEMBL", dataset="hsapiens_gene_ensembl")
getBM(attributes=c("hgnc_symbol","rank","ensembl_gene_id","cdna","ensembl_transcript_id","peptide","ensembl_exon_id"),
filters="ensembl_transcript_id",
values="ENST00000634301",
mart=mart38)
The output is:
rank ensembl_transcript_id cdna peptide hgnc_symbol ensembl_gene_id ensembl_exon_id
1 ENSG00000110395 ENSE00003791646;ENSE00003787952;ENSE00003787287 Sequence unavailable CBL 3;1;2 ENST00000634301 HGNC:1541
So, the column names don't seem to be assigned in the correct order?! Furthermore, there is "Sequence unavailable" and HGNC:1541" instead of cDNA and peptide sequence. That seems odd, because if we go for
getBM(attributes=c("ensembl_transcript_id","peptide"),
filters="ensembl_transcript_id",
values="ENST00000634301",
mart=mart38)
or
getBM(attributes=c("ensembl_transcript_id","cdna"),
filters="ensembl_transcript_id",
values="ENST00000634301",
mart=mart38)
information for peptide and cdna is reported.
I mean, sure, we can get the required information by using several commands, but why is it not working when just using one command? Thanks a lot in advance for your help!
Best, Sarah
James' answer looks spot on to me. This is because the Ensembl BioMart isn't designed to give you two different sequence types. The web interface doesn't let you, but we can force it using biomaRt and it doesn't know how to cope.
I this isn't handled elegantly because biomaRt was designed as a generic tool at a time when there were lots of distinct BioMart servers, and adding specific edge cases like this wasn't practical. There's also the
getSequence()
function which is Ensembl specific, and (I think) doesn't allow you to try and get more than one type of sequence.Short answer is that BioMart doesn't let you do this query in one, so it can't be enabled in biomaRt, but I'll take a look at how easy it is to detect and let a user know, rather than give you back scrambled results without any kind of warning.
Thank you VERY much for you quick replys and your help!!