overlapping genes with biomart
1
0
Entering edit mode
@elizabeth-purdom-2486
Last seen 3.0 years ago
USA/ Berkeley/UC Berkeley
Hello, My understanding of the filters in biomaRt "start" and "end" is that they correspond to "start>=..." and "end<=..." so if I call ens <- getBM(c("ensembl_gene_id","start_position","end_position","chromosome_ name"),filters = c("chromosome_name", "start", "end"), values = list(chromosome, x1, x2), mart = biomart) then I would get a return of all genes that completely lie between x1 and x2. What I would like is all genes that overlap that region. Ideally I could do this by a filter that does "start<=x2" and "end>=x1" but that inverted filter doesn't seem to be predefined. Is there a simple way to invert the filter? Or am I missing something else obvious? Thanks, Elizabeth
biomaRt biomaRt • 1.0k views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 3 months ago
United States
On Wed, Oct 15, 2008 at 7:03 PM, Elizabeth Purdom <epurdom at="" stat.berkeley.edu=""> wrote: > Hello, > > My understanding of the filters in biomaRt "start" and "end" is that they > correspond to "start>=..." and "end<=..." so if I call > > ens <- > getBM(c("ensembl_gene_id","start_position","end_position","chromosom e_name"),filters > = c("chromosome_name", "start", "end"), values = list(chromosome, x1, x2), > mart = biomart) > > then I would get a return of all genes that completely lie between x1 and > x2. What I would like is all genes that overlap that region. Ideally I could > do this by a filter that does "start<=x2" and "end>=x1" but that inverted > filter doesn't seem to be predefined. Is there a simple way to invert the > filter? Or am I missing something else obvious? It is possibly easier to simply pull in all genes and then do the overlaps in R. You could also write raw SQL, but that will mean accessing the mysql server directly and either a temp table (not possible at ensembl) or multiple queries if you have more than one region. Sean
ADD COMMENT

Login before adding your answer.

Traffic: 591 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6