drighelli / SpatialExperiment

55 stars 19 forks source link

Dependency stack #114

Open lgeistlinger opened 2 years ago

lgeistlinger commented 2 years ago

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?

drighelli commented 2 years ago

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

lgeistlinger commented 2 years ago

Great - thanks for pointing me to that discussion.

LiNk-NY commented 2 years ago

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

drighelli commented 2 years ago

Thanks @LiNk-NY ,

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

Dario