Skip to content

Implement fragments aggregation into instances: modified main.py and map.py#43

Merged
marco-cominelli01 merged 11 commits into
bodegalab:mainfrom
marco-cominelli01:aggregate_into_instances
Jan 26, 2026
Merged

Implement fragments aggregation into instances: modified main.py and map.py#43
marco-cominelli01 merged 11 commits into
bodegalab:mainfrom
marco-cominelli01:aggregate_into_instances

Conversation

@marco-cominelli01

@marco-cominelli01 marco-cominelli01 commented Jan 21, 2026

Copy link
Copy Markdown
Collaborator

Edit --locus flag 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)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 --locus boolean flag
  • Implemented instance aggregation logic in map.py that 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.

Comment thread irescue/main.py Outdated
Comment thread irescue/map.py Outdated
Comment thread irescue/map.py Outdated
Comment thread irescue/map.py Outdated
bepoli and others added 5 commits January 26, 2026 10:35
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@marco-cominelli01
marco-cominelli01 merged commit 15a0a47 into bodegalab:main Jan 26, 2026
5 checks passed
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.

3 participants