SpatialExperiment icon indicating copy to clipboard operation
SpatialExperiment copied to clipboard

Dependency stack

Open lgeistlinger opened this issue 3 years ago • 4 comments
trafficstars

Hi - I was wondering whether something can be done about SpatialExperiment's quite extensive dependency stack (the Bioc page lists 94 dependencies, which is a lot for a core class and compared to other core classes such as SE or SCE).

This also causes any package building on top of SpatialExperiment to more or less immediately hit Bioc's 100 dependencies bar, see eg my recent MerfishData package.

I was wondering whether SPE really needs to import DropletUtils - I understand it's for reading 10X Visium files. Looking at SE and SCE, I think they (intentionally) do not provide such readers within the package for the class and rather factor this out to other utility packages to keep dependency stacks small and allow innovation on top of these classes. Would this also be an option for SpatialExperiment?

lgeistlinger avatar Sep 07 '22 14:09 lgeistlinger

Hi Ludwig,

thanks for reporting this, of course, it is something to think about, in particular for the reading function, we are discussing this also in this thread on one of the Marcel's (@LiNk-NY) new packages (TENxIO).

Maybe you could be interested in participating in such a discussion :)

Dario

drighelli avatar Sep 07 '22 14:09 drighelli

Great - thanks for pointing me to that discussion.

lgeistlinger avatar Sep 07 '22 14:09 lgeistlinger

Hi Dario, @drighelli

I took a look with pkgndep and it says:

Following adjustment could be performed:
- Found 1 function is imported from a heavy parent 'DropletUtils'. Moving 'DropletUtils''
  to 'Suggests' will reduce 28 dependencies.
Moving all mentioned packages to 'Suggests' will reduce the dependency packages from 96 to 68.

That's one immediate action item that will lower the count. https://pkgndep.github.io/prefix_s/SpatialExperiment_dependency_report.html

Best, Marcel

LiNk-NY avatar Sep 07 '22 15:09 LiNk-NY

Thanks @LiNk-NY ,

that's an excellent suggestion, we'll apply this change before the next release :)

Dario

drighelli avatar Sep 09 '22 10:09 drighelli