[Bioc-sig-seq] findOverlaps select argument

Martin Morgan mtmorgan at fhcrc.org
Wed Sep 1 04:07:22 CEST 2010


On 08/31/2010 06:00 PM, Dario Strbenac wrote:
> Hello,
> 
> In the documentation, it says that "When select is "all", the results
> are returned as a RangesMatching object. When select is "first",
> "last", or "arbitrary" the results are returned as ... ".
> 
> But in using this, it seems only two of the arguments are accepted in
> the code.
> 
>> ol <- findOverlaps(gr1, gr2, select = "arbitrary")
> Error in match.arg(select) : 'arg' should be one of “all”, “first”

Hi Dario,

Actually this is one of the tricky aspects of R documentation; after

  showMethods(findOverlaps)

(to get a sense of available methods) try looking for

?"findOverlaps,GRanges,GRanges-method"

where you'll see that the method relevant to your data types are
documented to take only a subset of the arguments in ?findOverlaps. (I
think this is also relevant to you minoverlaps query of a week or so ago).

The reason for this is at least partly that the interpretation of
arguments can be complicated for some objects, and that we have been
waiting to see what use cases are most relevant. As a quick example,
GRangesList might be used to represent genes (each element of the list
== 1 gene) and their exons (the ranges within elements). One might
visualize an element of the list as

  +++++    ++++    ++++++++

i.e., a gene consisting of three (short!) exons. So when one wishes to
interpret minoverlaps, does this mean that we wish for at least one exon
to have a minimum overlap with the query (which itself could be a list
of ranges), or are we satisfied with a total of minoverlaps occurring
with any combination of exon? The current feeling around here is the
latter, because the former could be calculated without too much
difficulty by, e.g., finding overlaps on the unlisted GRangesList.
Probably this description is too succinct, but perhaps provides a flavor
of the issues.

These will be fleshed out over time, so your requests are useful for us
in prioritizing implementation; just that finding the right
documentation might help you in getting your work done.

Martin

> 
> -------------------------------------- Dario Strbenac Research
> Assistant Cancer Epigenetics Garvan Institute of Medical Research 
> Darlinghurst NSW 2010 Australia 
> _______________________________________________ Bioc-sig-sequencing
> mailing list Bioc-sig-sequencing at r-project.org 
> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing


-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioc-sig-sequencing mailing list