Thanks Steve,

I already did it and it went perfectly well.

I was just trying to understand the functions David wrote, so that I can use
them maybe for other queries.
Unfortunately I wasn't able to add a condition for the fact that there is a
third parameter to be compared.

I would still ove to know whether there is a way of adding such a perameter.

I tried to do it with a third argument in this line:       any( apply(locs,
1, function(x){vec["start"]>x[2] & vec["start"]<=x[3] & *
as.character(vec["chr"])==as.character(x["chr"]*)
but it doesn't seems to work at all.

Thanks for the help anyway
Assa

On Wed, Oct 26, 2011 at 15:33, Steve Lianoglou <
mailinglist.honeypot@gmail.com> wrote:

> Hi,
>
> On Wed, Oct 26, 2011 at 8:17 AM, Assa Yeroslaviz <frymor@gmail.com> wrote:
> > Hi David,
> >
> > your function works just fine if I take nly the region into account. But
> > unfortunately it does not consider the first column of the chromosomes.
> > There can be an overlap between the two tables only if the regions are on
> > the same chromosome. This is why the first column of both tables is a
> > prerequisite for the analysis.
> >
> > I treid somehow to create a second argument to consider this, but until
> now
> > without success.
>
> Well, bioconductor has packages to deal with this type of data, and
> these type of queries (overlaps) very efficiently.
>
> Martin Morgan had sent you an email earlier explaining how you can use
> the GenomicRanges packages to get what you're after ... I (highly)
> suggest you go that route.
>
> HTH,
>
> -steve
>
> --
> Steve Lianoglou
> Graduate Student: Computational Systems Biology
>  | Memorial Sloan-Kettering Cancer Center
>  | Weill Medical College of Cornell University
> Contact Info: http://cbio.mskcc.org/~lianos/contact
>

	[[alternative HTML version deleted]]

