Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions kg_microbe/transform_utils/ontologies/ontologies_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,10 @@ def _fix_ec_iri(line, iri_index):
line = _replace_special_prefixes(line)
new_ef_lines.append(line)
if name == "ec":
# Remove Uniprot nodes since accounted for elsewhere
new_nf_lines = [line for line in new_nf_lines if UNIPROT_PREFIX not in line]
new_ef_lines = [line for line in new_ef_lines if UNIPROT_PREFIX not in line]
# Remove UniProt and TrEMBL nodes since accounted for elsewhere
protein_prefixes = [UNIPROT_PREFIX, "TrEMBL:"]
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "TrEMBL:" prefix is hardcoded as a string literal, which is inconsistent with the codebase pattern. The UNIPROT_PREFIX constant is imported from constants.py (line 47), but no corresponding TREMBL_PREFIX constant exists. Consider defining a TREMBL_PREFIX constant in kg_microbe/transform_utils/constants.py (similar to UNIPROT_PREFIX at line 452) and importing it here for consistency and maintainability.

Copilot uses AI. Check for mistakes.
new_nf_lines = [line for line in new_nf_lines if not any(prefix in line for prefix in protein_prefixes)]
new_ef_lines = [line for line in new_ef_lines if not any(prefix in line for prefix in protein_prefixes)]
# elif name == "rhea":
# # Remove debio nodes that account for direction, since already there in inverse triples
# # Note that CHEBI and EC predicates do not match Rhea pyobo, so removing them
Expand Down