Implement fragments aggregation into instances: modified main.py and map.py#43
Merged
marco-cominelli01 merged 11 commits intoJan 26, 2026
Merged
Conversation
bepoli
approved these changes
Jan 23, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request implements a new feature for aggregating repeat fragments into instances, replacing the boolean --locus flag with a string-valued --locus-level flag that supports three modes: disabled (subfamily-level quantification), fragment (individual repeat fragments as loci), and instance (grouped fragments representing bona fide insertions).
Changes:
- Modified the command-line interface to use
--locus-level [disabled, fragment, instance]instead of--locusboolean flag - Implemented instance aggregation logic in
map.pythat groups repeat fragments by their RepeatMasker instance ID - Updated the rmsk.bed.gz file format to use RepeatMasker instance IDs instead of sequential locus indices
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| irescue/main.py | Updated argument parser to use --locus-level with string choices instead of boolean --locus flag, updated references from args.locus to args.locus_level |
| irescue/map.py | Modified makeRmsk() and chrcat() functions to accept string locus parameter; implemented instance aggregation logic that creates an rmsk_instance.bed.gz file with merged instance metadata; changed rmsk.bed.gz 5th column from sequential index to instance ID |
| tests/test.yml | Updated test commands to use new --locus-level flag syntax, added new test case for instance mode, updated md5sum checksums to reflect file format changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…eters in makeRmsk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Edit
--locusflag to--locus-level [disabled, fragment, instance]to choose between subfamily level, using individual repeats fragments as locus or grouping fragments to repeats instances (bona fide insertions)