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

refactor filtering of user specified strains #178

Merged
merged 8 commits into from
Dec 14, 2023
Merged

Conversation

CunliangGeng
Copy link
Member

@CunliangGeng CunliangGeng commented Nov 14, 2023

Based on the new loading pipeline, the filtering of user strains is conducted just after loading strain mappings, which will simplify the upcoming loading pipeline. The change of loading process looks like below:
Before: load strain mappings --> load BGC, GCF, spectra and MF --> filter user strains
Now: load strain mappings --> filter user strains --> load BGC, GCF, spectra and MF

Major Changes:

  • create strain_loader.py and add function load_user_strains
  • add schema for json file of user specified strains (now we require user to provide strains in a JSON file)
  • update the use of load_user_strains in loader.py
  • remove test_loader.py (the whole loading pipeline is ongoing, and tests will be added later)

- remove `_filter_user_strains` method
- remove reading user strains file from `_load_optional` method
- add `_load_user_strains` method
- update `_load_strain_mappings` method to include the reading and filtering of user specified strains after loading strain mappings
@CunliangGeng CunliangGeng marked this pull request as draft November 15, 2023 15:16
@CunliangGeng CunliangGeng marked this pull request as ready for review November 15, 2023 15:21
@CunliangGeng CunliangGeng marked this pull request as draft November 16, 2023 09:59
Users are required to provide their specified strains in a JSON file. Here the schema of that JSON file is added.
Create an independent `load_user_strains` function.
@CunliangGeng CunliangGeng marked this pull request as ready for review November 17, 2023 12:02
src/nplinker/strain_loader.py Outdated Show resolved Hide resolved
Co-authored-by: Giulia Crocioni <55382553+gcroci2@users.noreply.github.com>
Copy link
Member Author

CunliangGeng commented Dec 14, 2023

Merge activity

@CunliangGeng CunliangGeng merged commit bd45807 into dev Dec 14, 2023
2 of 4 checks passed
@CunliangGeng CunliangGeng deleted the filter_user_strains branch December 14, 2023 10:34
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

Successfully merging this pull request may close these issues.

2 participants