Hi Dario,

The situation for a GenomicRanges object is no different from the
situation for a IRanges object. In both case, when subject is missing,
the findOverlaps,Vector,missing method is called. This method accepts
the 'drop.self' and 'drop.redundant' arguments thru the ellipsis:

> selectMethod("findOverlaps", c("Vector", "missing"))
Method Definition:

function (query, subject, maxgap = 0L, minoverlap = 1L, type = c("any",
    "start", "end", "within", "equal"), select = c("all", "first",
    "last", "arbitrary"), ...)
{
    .local <- function (query, subject, maxgap = 0L, minoverlap = 1L,
type = c("any", "start", "end", "within", "equal"), select = c("all",
            "first", "last", "arbitrary"), ..., drop.self = FALSE,
drop.redundant = FALSE, ignoreSelf = FALSE, ignoreRedundant = FALSE)
    {
        if (!identical(ignoreSelf, FALSE) || !identical(ignoreRedundant,
            FALSE)) {
.Defunct(msg = wmsg("Please use 'drop.self' and/or 'drop.redundant' instead ",
                "of the 'ignoreSelf' and/or 'ignoreRedundant' arguments."))
            if (!identical(ignoreSelf, FALSE)) {
                if (!identical(drop.self, FALSE))
                  stop(wmsg("either 'drop.self' or 'ignoreSelf' ",
                    "can be specified, but not both"))
                drop.self <- ignoreSelf
            }
            if (!identical(ignoreRedundant, FALSE)) {
                if (!identical(drop.redundant, FALSE))
stop(wmsg("either 'drop.redundant' or 'ignoreRedundant' ",
                    "can be specified, but not both"))
                drop.redundant <- ignoreRedundant
            }
        }
        select <- match.arg(select)
        result <- findOverlaps(query, query, maxgap = maxgap,
            minoverlap = minoverlap, type = match.arg(type),
            select = "all", ...)
        process_self_hits(result, select, drop.self, drop.redundant)
    }
    .local(query, subject, maxgap, minoverlap, type, select,
        ...)
}
<environment: namespace:IRanges>

Signatures:
        query    subject
target  "Vector" "missing"
defined "Vector" "missing"
> args(selectMethod("findOverlaps", c("Vector", "missing")))
function (query, subject, maxgap = 0L, minoverlap = 1L, type = c("any",
    "start", "end", "within", "equal"), select = c("all", "first",
    "last", "arbitrary"), ...)
NULL

Cheers,
H.


On 10/26/2016 03:00 AM, Dario Strbenac wrote:
Good day,

For an IRanges object, findOverlaps has ignoreSelf and ignoreRedundant options. 
However, these aren't available for a GenomicRanges input object, even though 
the subject parameter is optional and a query GRanges object can be overlapped 
with itself. Could this be changed to be consistent?

--------------------------------------
Dario Strbenac
University of Sydney
Camperdown NSW 2050
Australia
_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fredhutch.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319

_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Reply via email to