From roebuck at odin.mdacc.tmc.edu  Mon Jul 11 19:35:24 2005
From: roebuck at odin.mdacc.tmc.edu (Paul Roebuck)
Date: Mon, 11 Jul 2005 12:35:24 -0500 (CDT)
Subject: [Rd] Packaging and Optional BioC Capabilities
Message-ID: <Pine.OSF.4.58.0507111139260.59847@odin.mdacc.tmc.edu>

I am currently involved with a package that has certain
raw capabilities that enable it to be used without external
package dependencies. However, there are certain
Bioconductor packages containing classes from which I can
extract data to pass along to my current code.

Since my code is not really dependent on these external
packages but merely augmented by their presence, how best
is that relationship "packaged"?

1) Build second package dependent on external packages
that imports original methods and adds additional methods
to S4 generic functions for those BioC classes.

2) Keep single package with external packages suggested
and conditionally add additional methods to S4 generic
functions based on the presence of BioC packages.

If the latter approach is acceptable, something like this
perhaps?

biocpkg <- "whatever"
if (!inherits(try(library(biocpkg), silent = TRUE),
              'try-error')) {
    # SetMethod call using class from Bioconductor
}


----------------------------------------------------------
SIGSIG -- signature too long (core dumped)



[Rd] Packaging and Optional BioC Capabilities
Paul Roebuck