Skip to content

Comments

Exclusive fix#38

Merged
msarrias merged 15 commits intomainfrom
exclusive_fix
May 15, 2025
Merged

Exclusive fix#38
msarrias merged 15 commits intomainfrom
exclusive_fix

Conversation

@msarrias
Copy link
Owner

Main changes:

  • fixed reported exclusive events
  • fixed the length function
  • upgraded muscle and made the version a requirement

@msarrias msarrias requested a review from Copilot May 15, 2025 09:51
@sonarqubecloud
Copy link

@msarrias msarrias merged commit 8108071 into main May 15, 2025
6 checks passed
@msarrias msarrias deleted the exclusive_fix branch May 15, 2025 09:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes issues with exclusive events, updates the length function calculation, and enforces a specific version requirement for MUSCLE.

  • Fixed reported exclusive event calculations and test inconsistencies
  • Revised interval length calculation and sorting keys in data preprocessing
  • Upgraded MUSCLE usage and updated documentation accordingly

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/test_classification.py Adjusted exon coordinate lists and renamed a test for clarity
exonize/sqlite_handler.py Updated table creation defaults and added placeholder values
exonize/searcher.py Changed MUSCLE CLI options and switched to a helper for interval length
exonize/reconciler_handler.py Replaced direct coordinate arithmetic with a helper function
exonize/exonize.py Minor messaging adjustments in CLI descriptions
exonize/environment_setup.py Added tool version validation using subprocess and updated MUSCLE check
exonize/data_preprocessor.py Fixed sorting key and added an interval_length helper with +1 offset
exonize/classifier_handler.py Reworked exclusive event and intersection logic to use new parameters
docs/index.md & README.md Updated documentation to reflect MUSCLE (v.5.3) changes
Comments suppressed due to low confidence (1)

exonize/searcher.py:109

  • [nitpick] Verify that the new MUSCLE command flag '-align' (and its corresponding '-output') are correctly supported in MUSCLE v5.3 as these changes require alignment with updated documentation.
"-align",

@staticmethod
def _find_related_items(item, list_items):
def check_condition(itemi, itemj):
return bool(set(itemi).intersection(set(itemj))) if itemi != itemj else {}
Copy link

Copilot AI May 15, 2025

Choose a reason for hiding this comment

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

The condition function in _find_related_items returns an empty dictionary instead of a Boolean value when items are equal. Replace {} with false to ensure a consistent Boolean return type.

Suggested change
return bool(set(itemi).intersection(set(itemj))) if itemi != itemj else {}
return bool(set(itemi).intersection(set(itemj))) if itemi != itemj else False

Copilot uses AI. Check for mistakes.
def interval_length(
interval: P.Interval
):
return interval.upper - interval.lower + 1
Copy link

Copilot AI May 15, 2025

Choose a reason for hiding this comment

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

Add a comment clarifying that the '+1' adjustment is used because the interval boundaries are inclusive, to document this assumption for future maintainers.

Copilot uses AI. Check for mistakes.
capture_output=True,
text=True
)
if version not in program_version.stdout.strip():
Copy link

Copilot AI May 15, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider implementing a more robust version comparison rather than a substring check, as this can lead to false positives if version numbers share digits.

Copilot uses AI. Check for mistakes.
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.

1 participant