-
Notifications
You must be signed in to change notification settings - Fork 3
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
Skip cell annotation if cell annotation sources empty #3
Conversation
Hey @vucinick, thank you for the PR. While your solution is valid, I think easier would be to remove these lines scdrake/R/config_process_common.R Lines 406 to 408 in d92f86e
and CELL_ANNOTATION_SOURCES will stay NULL after the config load.
I think the reason why this param is changed to an empty list is that the cell annotation subplan was earlier scdrake/R/plans_single_sample.R Lines 328 to 331 in e10c442
not separated from the main plan, but there couldn't be just NULL , because drake is then not able to dynamic map over it (cell_annotation_params ).
It's currently not documented, but you can run unit and end-to-end tests through https://github.com/bioinfocz/scdrake/blob/main/dev/run_tests.R: docker exec -it -u rstudio -w /home/rstudio/scdrake_source <container> \
r --interactive -L /usr/local/lib/R/site-library -t dev/run_tests.R \
--output-dir /home/rstudio/shared/scdrake_run_tests \
--output-dir-pipeline-tests /home/rstudio/shared/scdrake_run_tests/pipeline_outputs It assumes your Check |
Hi @gorgitko, scdrake/R/config_process_common.R Lines 406 to 408 in d92f86e
and Lines 13 to 15 in d92f86e
The empty file creation in R/cell_annotation.R seemed unnecessary with my solution, so I remove it in cell_annotation_params_fn .
The main part would be in R/config_process_single_sample.R, where I added the part to checks if the I ran the test for the single_sample pipeline, and it correctly creates normalization reports without the cell annotation 😁. |
Hi @vucinick, looks good! Please, add the relevant part also to the |
sources are null
the vignette
sources are null
If it is, add the variable to cfg. If it isn't, it continues with preparing the params.
8e3f03f
to
b39903e
Compare
Fixes issue #2
Description of the fix
This fix addresses the issue where declaring
CELL_ANNOTATION_SOURCES: null
in the02_norm_clustering.yaml
configuration file would result in the pipeline failing. The reason was that it creates an empty list which isn't null.The fix now checks the length of the list, and if it's 0, it skips the cell annotation step, ensuring the expected behavior mentioned in the issue. Additionally, I've updated the relevant Rmd files to determine whether to include the cell annotation part in the report.
I've also made an addition to the vignette to document that there is an option to use null for cell annotation sources. This can be particularly useful for cases involving non-model organisms with limited annotation sources.
Please review and merge this pull request to resolve the issue. Thank you!