bokulich-lab / q2-fondue

Functions for reproducibly Obtaining and Normalizing Data re-Used from Elsewhere
BSD 3-Clause "New" or "Revised" License
20 stars 6 forks source link

ENH: Option to preserve DOI names when refetching with `failed_runs` #129

Closed adamovanja closed 2 years ago

adamovanja commented 2 years ago

This PR adds that DOI names can be preserved when refetching metadata with failed-runs artifacts.

Some details

Let's assume we provide DOI names in the original accession_ids input to get-metadata and the accession IDs are of an aggregate ID type (e.g. BioProject, Study), then the DOI names are linked with those aggregate IDs. If this initial get-metadata action returns some failed-runs, they don't contain any DOI name information as the matching from run ID to aggregate ID can only be done if the metadata was fetched correctly. In this case, to preserve the DOI information one needs to provide the DOI matching again when refetching the failed-runs. This is now possible with the changes implemented in this PR.

Testing

The tests implemented in this PR should already cover that the newly introduced optional linked-doi input is processed as expected. However, if you still feel like testing it on your own, you can refetch some failed runs with get-metadata using linked-doi containing DOI names matched to its aggregate IDs.

codecov[bot] commented 2 years ago

Codecov Report

Merging #129 (2d13b89) into main (1af4d81) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #129      +/-   ##
==========================================
+ Coverage   98.57%   98.58%   +0.01%     
==========================================
  Files          27       27              
  Lines        2868     2895      +27     
==========================================
+ Hits         2827     2854      +27     
  Misses         41       41              
Impacted Files Coverage Δ
q2_fondue/get_all.py 100.00% <100.00%> (ø)
q2_fondue/metadata.py 98.63% <100.00%> (+0.14%) :arrow_up:
q2_fondue/plugin_setup.py 100.00% <100.00%> (ø)
q2_fondue/tests/test_metadata.py 99.66% <100.00%> (+0.02%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

adamovanja commented 2 years ago

thanks @misialq for the review. I added a comment in the README file 🚀