[Bioc-devel] NAMESPACE best practices

Alexander Blume @|ex@go@90 @end|ng |rom gm@||@com
Tue May 24 12:56:26 CEST 2022


Dear All,

I recently took over maintenance of the “fastseg” package (http://bioconductor.org/packages/3.16/bioc/html/fastseg.html) and after fixing the issues recommended by `R CMD Check` I wanted to optimize the package's NAMESPACE file and the Depends/Imports given in the DESCRIPTION file. 

Replacing the generic complete `import` of dependent packages with more fine-grained `importFrom` calls is rather obvious. 
However, I was wondering if there are any reasons that speak against doing so?

Concerning the DESCRIPTION file, given that the used functions were already specified in the NAMESPACE I was planning to edit the DESCRIPTION file and move the “GenomicRanges” and “Biobase” dependencies from Depends to Imports. 
In the package, the Biobase functions are used to query supported ExpressionSet objects, while GenomicRanges is used to support Granges objects and create the final output as Granges object.  
Is it legit to have GenomicRanges “only" as Imports, even if the main function's output is in GRanges format? 

I want to keep the “Depends” field as small as possible to not pollute downstream packages to attach everything and mask other functions. Is this reasonable, or should I just import “GenomicRanges” plus all required packages from the beginning and live with it? I hope there are some general guidelines to follow. 

Best
Alex



More information about the Bioc-devel mailing list