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

Local strain mappings #310

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

rtlortega
Copy link

This is a continuation of the previous pull request. However, I had to start over because my previous repository was outdated compared to the latest changes.

In response to @CunliangGeng 's comments:

  • I added tests for each function (see attached screenshots).
  • I ran mypy and ruff (screenshots attached). There is one mypy error, but it originates from other files in the repository, not my changes.
  • Functions are now listed in alphabetical order.

Overview of Added Functions:

Utils (generating strain_mappings locally):

  • create_strain_mappings → Generates a JSON file for NPLinker.
  • extract_bgcs_genome_id → Extracts BGCs based on strain_id (reverse of get_bgcs_genome_mapping).
  • extract_features_metabolome_id → Extracts features based on strain_id.
  • extract_strain_metadata → Retrieves metadata from researcher-provided files.
  • merge_bgcs_features → Creates a dictionary mapping features to BGCs.

Antismash Loader:

  • get_genome_bgcs_mapping → Reverse function of the existing get_bgcs_mapping.

Final Note:
I strongly suggest keeping updated test data in the latest format within the test folder. This ensures new functions are easier to build and verify against correct data structures and types.

Screenshot 2025-01-31 at 11 37 14
Screenshot 2025-01-31 at 15 36 48
Screenshot 2025-01-31 at 15 39 33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant