This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to obtain the locations of a exon and its corresponding peptide from a specific transcript in bioMart

I tried to connect a transcript (ENSTxxx)'s exons to their corresponding peptides (residues) using bioMart in R.

library("biomaRt")
ensembl<- useMart("ensembl")
ensembl<- useDataset( "ensembl", dataset="hsapiens_gene_ensembl")
getBM(c('peptide_location','exon_chrom_start','exon_chrom_end'), filters = c('ensembl_transcript_id','pdb'), values=list('ENST00000606293','2ZA5'), mart=ensembl)
Error in getBM(c("peptide_location", "exon_chrom_start", "exon_chrom_end"),  :
  Query ERROR: caught BioMart::Exception::Usage: Attributes from multiple attribute pages are not allowed

I wish to get some help for this problem.

peptide biomart exon

1 answer

This has to do with the way the Biomart webserver/database is set up. Essentially, you can't do gene-based queries and transcript-based queries at one time. But you can do them sequentially and merge at the end.

transcript_data<-getBM(c('ensembl_transcript_id','exon_chrom_start','exon_chrom_end'), filters = c('ensembl_transcript_id','pdb'), values=list('ENST00000606293','2ZA5'), mart=ensembl)
pept_data<-getBM(c('ensembl_transcript_id','peptide_location'), filters = c('ensembl_transcript_id','pdb'), values=list('ENST00000606293','2ZA5'), mart=ensembl)
final_data<-merge(transcript_data, pept_data, by='ensembl_transcript_id')

Thank you so much! It worked. And, it answers for my rest of work. Thanks again!

BTW, this was my first use of Biostart. This is pretty nice

You're very welcome :D

feel free to up-vote my "answer" and mark this question as solved.

Hi Lando,

I thought your code was what I wanted, but actually, it is not.

In your merge function at the end, it was supposed to be exon range or exon id, other than transcript id. Could you correct this?

Thanks,

Log in to answer this question.