Skip to content
Prev 8006 / 21312 Next

[Bioc-devel] Proper way of documenting a BiocGenerics generics with extended prototypes

It sounds like everything is working, apart from roxygen 2.  This is the
right way to do this; there are many examples; for example findOverlaps for
GenomicRanges, GenomicRanges which support ignore.strand which is not an
argument to the generic; see below.  You may have to discuss this with the
roxygen developers; I don't use that framework.  But your general idea is
sound.

Best,
Kasper
standardGeneric for "findOverlaps" defined from package "IRanges"

function (query, subject, maxgap = 0L, minoverlap = 1L, type = c("any",
    "start", "end", "within", "equal"), select = c("all", "first",
    "last", "arbitrary"), algorithm = c("nclist", "intervaltree"),
    ...)
standardGeneric("findOverlaps")
<environment: 0x7fb7815a8518>
Methods may be defined for arguments: query, subject
Use  showMethods("findOverlaps")  for currently available ones.
Method Definition:

function (query, subject, maxgap = 0L, minoverlap = 1L, type = c("any",
    "start", "end", "within", "equal"), select = c("all", "first",
    "last", "arbitrary"), algorithm = c("nclist", "intervaltree"),
    ...)
{
    .local <- function (query, subject, maxgap = 0L, minoverlap = 1L,
        type = c("any", "start", "end", "within", "equal"), select =
c("all",
            "first", "last", "arbitrary"), algorithm = c("nclist",
            "intervaltree"), ignore.strand = FALSE)
    {
        type <- match.arg(type)
        select <- match.arg(select)
        algorithm <- match.arg(algorithm)
        if (algorithm == "nclist")
            FUN <- findOverlaps_GenomicRanges
        else FUN <- findOverlaps_GenomicRanges_old
        FUN(query, subject, maxgap = maxgap, minoverlap = minoverlap,
            type = type, select = select, ignore.strand = ignore.strand)
    }
    .local(query, subject, maxgap, minoverlap, type, select,
        algorithm, ...)
}
<environment: namespace:GenomicRanges>

Signatures:
        query           subject
target  "GenomicRanges" "GenomicRanges"
defined "GenomicRanges" "GenomicRanges"


On Sun, Sep 20, 2015 at 1:23 PM, Christian Arnold <christian.arnold at embl.de>
wrote: