saezlab/progeny

Modify main progeny function to also search for human and mouse models in the local environment.

Closed this issue · 1 comments

Dear progeny developers,

I am experiencing some bugs while using progeny due to the implemented behaviour in progeny::progeny(). While running the code, adapted from the vignette for scRNAseq datasets, it prompts me the error that the human model (model_human_full) is not available in the global environment.

And this is where my issue stems from. I am writing an R package as a means of workflow manager, so applying progeny is one part of it. For this, I imported the package in the local environment of my function, to avoid unnecessary global declarations in my code. Although the variable "model_human_full" is defined, accessible, and ready to use in the local environment, the error log will keep arising due to the progeny::progeny() function first searching for it in the global environment.

I am pretty sure this was coded this way since it is expected that the used would just load in the package using library(progeny). However, this is considered as of bad practice when writing R packages, enforcing the use of :: notations as much as possible (source).

Therefore, I think it would be great to enhance this function by expanding the search of the model not only to the global, but also to the local environment.

Best,
Enrique

Hi @enblacar,

thanks to @jan-glx pr this issue is now solved.

Thanks for using progeny,
Christian