Skip to content

Modifying internal data handling and adding BiocFileCache - #52

Open
epbrenner wants to merge 10 commits into
mainfrom
updating-internal-data-use
Open

epbrenner wants to merge 10 commits into
mainfrom
updating-internal-data-use

Conversation

@epbrenner

Copy link
Copy Markdown
Contributor
  1. Added BiocFileCache for better handling of manifests and databases.
  2. Deprecated prior use of .tsv files instead of .rda objects.
  3. Added more manifest handling, including a readiness check for amRml.

prepareGenomes("Staphylococcus argenteus")

runDataProcessing("data/Staphylococcus_argenteus/Sar.duckdb")

This will probably take a while, as it will download the HMMER databases freshly into your BiocFileCache data directory. The manifest .json should also have fun new things recorded, including a status message for amRml to read.

Adding a very simple dev script that creates .rda files out of our .tsv mapping data. Replaced a few places where the only raw TSV data was used instead of the internal datasets. Removed some S. epi files of uncertain origin. Not sure where those came from, honestly.
Updating scripts to use BiocFileCache throughout. Updating manifest for better handoff to amRml. Updating HMMER databases to use BiocFileCache and be saved as resources.
Wee `devtools::document(".")` updates, and adding BiocFileCache to Imports.
@epbrenner epbrenner self-assigned this Sep 14, 2026
@epbrenner epbrenner added the enhancement New feature or request label Sep 14, 2026
epbrenner and others added 3 commits September 14, 2026 17:02
Error in `.runHmmerJob()`:
! unused argument (total_proteins = total_proteins)

So if make the change, the error is not showing up.
But I still don't know the logic.
@epbrenner epbrenner mentioned this pull request Sep 15, 2026
11 tasks
Without this, clean_drug/drug_class/drug_abbr/class_abbr/cleaned_bvbrc_countries
only resolve under devtools::load_all(); a real installed-package library() call
throws object 'clean_drug' not found, which breaks runDataProcessing().
Comment thread R/helpers.R
epbrenner and others added 2 commits September 15, 2026 14:55
Good catch Emily! Can replicate that `checkDataAvailability()` fails with this absent.

Co-authored-by: Emily Boyer <130874527+eboyer221@users.noreply.github.com>
CPU resource detection was faulty on HPC. Added parallelly as an Import, and updated to use the recommended future CPU detection method, parallelly::availableCores(). This should behave better to avoid oversubscription on any system, and generally handle CPU requests more carefully.
@AbhirupaGhosh

Copy link
Copy Markdown
Contributor

unable to open database file

If something happened while downloading .hmm or unzipping the hmmpress does not work.

I would suggest having a check if it fails to press, go back and download at least once again.

Abhirupa noted that HMMER DBs can corrupt on download or press, and get stuck in the mysterious BFC cache somewhere with no easy way to fix them. This adds a simple function to delete databases. Enjoy.
@epbrenner
epbrenner requested a review from eboyer221 September 15, 2026 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants