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
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