Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies #139

Closed
ellispatrick opened this issue Aug 21, 2023 · 4 comments
Closed

Dependencies #139

ellispatrick opened this issue Aug 21, 2023 · 4 comments
Assignees

Comments

@ellispatrick
Copy link

Hi,

We have been trying to reduce the number of dependencies for some of our packages. Looking in dependency trees, a significant proportion of SpatialExperiment's dependencies come drop DropletUtils. It seems like read10xCounts() is only used in the examples and vignette, perhaps 1) maybe it doesn't need to be used at all or 2) add it to Suggests? I'm unsure about Bioconductor standards, but this would align with Hadley's recommendations.

"Suggests: your package can use these packages, but doesn’t require them. You might use suggested packages for example datasets, to run tests, build vignettes, or maybe there’s only one function that needs the package."

https://r-pkgs.org/dependencies-mindset-background.html#sec-dependencies-imports-vs-suggests

Thanks,
Ellis

@lmweber
Copy link
Collaborator

lmweber commented Aug 22, 2023

Hi @ellispatrick , thanks for this suggestion.

Yes, DropletUtils is mainly used within the read10xVisium() function, and also in some of the examples.

It may make sense to move this to Suggests: instead of Imports: so it is not installed automatically -- although then maybe we also should include a message when using read10xVisium() so that beginner users know what the problem is if they get an error when using read10xVisium() (i.e. something like "this function requires DropletUtils to be installed"). Otherwise people who are new-ish to R may be confused if they just installed the package and assumed it will automatically install all required dependencies. I believe there is a similar issue with uwot as a dependency in scran/scater.

Thanks for the link above to the section in the R Packages book -- some useful details / recommendations there about choosing Imports: vs. Suggests: too.

I'll assign this issue to me for now and we can consider some more.

@lmweber lmweber self-assigned this Aug 22, 2023
@drighelli
Copy link
Owner

drighelli commented Aug 29, 2023

hello here,

thanks for opening this issue.
This is a known problem that we're discussing in some other packages with other developers like Aaron and Marcel.

One solution is to move the read10xVisium function to the TENxIO package which seems to be the elected package for all the 10x import functions.

See also waldronlab/TENxIO#3

In the meantime, I think the Suggests: solution would be a very nice workaround.

Dario

@lmweber
Copy link
Collaborator

lmweber commented Sep 2, 2023

Hi @ellispatrick @drighelli , we just pushed this change to Bioc-devel in this pull request: #140

Thanks again for the suggestion.

Let's wait for it to go through the Bioc build system over the next couple of days, and then we can confirm the new lower number of dependencies and close this issue if we are happy with it.

@lmweber
Copy link
Collaborator

lmweber commented Sep 11, 2023

I checked and this update has now reduced the number of dependencies from 100 to 73 in Bioc-devel, so I think this is a good improvement! I'll close the issue. Thank you!

@lmweber lmweber closed this as completed Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants