Question: BiomaRT, retrieve exon positions but filter to chrosomal region
0
gravatar for tonja.r
4.1 years ago by
tonja.r450
UK
tonja.r450 wrote:

I am using biomart to retrieve gene/trascripts/exon information and I need exon start and end positions BUT before I need to filter according to the chromosome and the region.

ensembl=useMart("ensembl")
ensembl = useDataset("hsapiens_gene_ensembl",mart=ensembl)
filterlist <- list("7:128554168:128776507")
attributes = c("chromosome_name", "exon_chrom_start", "exon_chrom_end","transcript_length","strand", "ensembl_gene_id", "ensembl_transcript_id","ensembl_exon_id","hgnc_symbol")
results=getBM(attributes =attributes, filters = c("chromosomal_region"), values = filterlist, mart = ensembl)

it throws an error: Query ERROR: caught BioMart::Exception::Usage: Attributes from multiple attribute pages are not allowed


Is it possible somehow to retrieve the exon positions in the defined chromosome and region?

 

 


 

 

R • 1.4k views
ADD COMMENTlink modified 4.1 years ago by Neilfws48k • written 4.1 years ago by tonja.r450
2
gravatar for komal.rathi
4.1 years ago by
komal.rathi3.4k
Children's Hospital of Philadelphia, Philadelphia, PA
komal.rathi3.4k wrote:

As Neilfws explains Biomart Annotation, you are trying to query attributes from tables that are not linked. You will have to create two separate queries like this:

# attribute list without hgnc_symbol
attributes.1 = c("chromosome_name", "exon_chrom_start", "exon_chrom_end", "transcript_length","strand", "ensembl_gene_id",  "ensembl_transcript_id","ensembl_exon_id")
# attribute list with hgnc_symbol & ensembl_gene_id
attributes.2 = c("hgnc_symbol","ensembl_gene_id")

# get results for each query
results.1 = getBM(attributes = attributes.1, filters = c("chromosomal_region"), values = filterlist, mart = ensembl)
results.2 = getBM(attributes = attributes.2, filters = c("chromosomal_region"), values = filterlist, mart = ensembl)

# merge the results for both queries
results = merge(results.1,results.2,by='ensembl_gene_id',all.x=T)
ADD COMMENTlink written 4.1 years ago by komal.rathi3.4k

The solution is great however, it takes amazingly much time to retrieve the data.

ADD REPLYlink written 4.1 years ago by tonja.r450
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1980 users visited in the last hour