Skip to content

Fix infinite loop when contig is shorter than read_len#264

Merged
joshfactorial merged 1 commit into
developfrom
fix/generate-reads-contig-shorter-than-read-len
Apr 7, 2026
Merged

Fix infinite loop when contig is shorter than read_len#264
joshfactorial merged 1 commit into
developfrom
fix/generate-reads-contig-shorter-than-read-len

Conversation

@joshfactorial
Copy link
Copy Markdown
Collaborator

When read_len exceeds a contig's length, cover_dataset enters an infinite loop because no fragment ever satisfies the length check on line 78, so read_count never increments. Add an early-return guard in generate_reads that skips the contig with a WARNING log instead of hanging.

When read_len exceeds a contig's length, cover_dataset enters an infinite
loop because no fragment ever satisfies the length check on line 78, so
read_count never increments. Add an early-return guard in generate_reads
that skips the contig with a WARNING log instead of hanging.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@joshfactorial joshfactorial merged commit dae00c1 into develop Apr 7, 2026
1 check passed
@joshfactorial joshfactorial deleted the fix/generate-reads-contig-shorter-than-read-len branch April 18, 2026 05:32
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