Skip to content

[Bioc-devel] BioC packages - profileplyr

3 messages · Doug Barrows, Vincent Carey, Michael Shapiro

#
Hi,

Our package - profileplyr - is failing on the development branch with an
error when it tries to subset a RangedSummarizedExperiment object with
brackets ([ ]). Within our package we build a slightly modified
RangedSummarizedExperiment object with a few additional slots and features,
and often will subset this object using the brackets in both the functions
and in the vignette. When trying to subset (e.g. object[1:10, 1:10]) we get
the error "Error: $ operator not defined for this S4 class". This is a new
error, so I wanted to check if this kind of subsetting functionality is no
longer supported with RangedSummarizedExperiment objects in general, or
whether this is likely something specific to our package. Any insight you
may have would be greatly appreciated - thanks!

Bestm
Doug
#
Hi Doug,

I think you've written a method of "[" for class "profileplyr" that is
using certain aspects of the Assays API that
are not guaranteed to be stable.  It would be good to have a simple
reproducible example -- I can run
your vignette and see that certain uses of "$" cause errors but pinpointing
how you have to update your
code would take some work.  My gut feeling is that you do not have to write
as much of a "[" method as
you have ... let RangedSummarizedExperiment infrastructure do everything it
can, and only when one
of your extensions really needs to be fiddled with by "[" do you add that
operation.  Learning how to use
callNextMethod may be helpful.
On Fri, Jul 12, 2019 at 1:51 PM Doug Barrows <doug.barrows at gmail.com> wrote:

            

  
    
#
Is the failure in your code or in the vignettes?? I ran into a situation 
where I was @importFrom-ing function and my devtools::check() was 
failing because the @examples code wasn't seeing the imported 
functions.? This actually makes sense as a behavior because examples 
should act like the user is running them, not like they're running 
inside the package.
On 7/12/2019 6:50 PM, Doug Barrows wrote: