turn them into BED files and use bedops/bedtools?

Or use findOverlaps() to generate an index that you can walk backwards.
 (see the manpage or a set of results to get a general idea of how this can
work; essentially you will want to match query results to subject results
in order to get back to lines in your files, although that's a lot of work
for the results you get)

Please post dummy code when possible, it's easier to reply with a fix when
one can just paste it into the example and send it back.  (Just a general
note)

Best,

--t


*He that would live in peace and at ease, *
*Must not speak all he knows, nor judge all he sees.*

Benjamin Franklin, Poor Richard's
Almanack<http://archive.org/details/poorrichardsalma00franrich>


On Tue, Nov 19, 2013 at 10:49 AM, Giovanni Carosso <gacarosso@gmail.com>wrote:

> Hello,
>
> I have three CSV files of genomic intervals (chromosome start, stop, plus
> other information in different columns) each containing between 10k-20k
> lines.
>
> I am looking for a way to pull out from one file only the lines that have
> genomic overlap with both of the other two files. In other words, subset
> file A to include only the lines of file A whose interval overlaps
> intervals in Files B and C.
>
> I'm able to create GRanges and manipulate these to get the subsetted
> GRanges list, but I have not found a way to then use this GRanges as an
> index to pull out the proper lines from CSV file.
>
> Is there a simple way to subset my file in this way that I'm missing?
>
> Thanks,
> Giovanni
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

