Skip to content

[Bioc-devel] help with imports for new package and other questions

2 messages · Hervé Pagès, Lorena Pantano

#
Hi Lorena,

In your particular case it seems to me that you're using dplyr
internally for convenient data frame transformations (nothing that
couldn't be done with plain R BTW), and that you're only using a few
dplyr symbols for this. The codetoolsBioC package could be useful to
help you identify these things and import them selectively. It seems
to me that these things are: %>%, group_by, filter, and summarise,
but I could be missing some. OTOH your package defines the IsomirDataSeq
class which extends the SummarizedExperiment class, and thus relies
largely on the GenomicRanges/SummarizedExperiment infrastructure.
So I would highly recommend that you *fully* import BiocGenerics,
S4Vectors, IRanges, and SummarizedExperiment. That will make the
maintenance of your NAMESPACE file much easier in the long run than
importing selectively from these packages.

I also remember seeing selective imports from the methods package
in NAMESPACE files generated with codetoolsBioC. Unless there is a
good reason for doing so, these should be avoided and the methods
package fully imported.

Cheers,
H.
On 08/14/2015 06:57 AM, Lo wrote:

  
    
#
Thanks a lot Herv?.

Your suggestions are perfect. I fully imported these classes because I 
realized that it would be less chances of errors, as you say here.

I used that, and it is true that I am using these functions for dplyr. 
The reason I tried to do with dplyr is was to summarize quicker. 
Previously I was using data.table. I will just import the used functions 
for dplyr, since, as you say, I am not using many functions.

Thanks for your help, really appreciate it.
On 08/17/2015 03:19 PM, Herv? Pag?s wrote: