Skip to content

Comments

feat: Add 62 new unit tests for match_regions_to_genes, transcript, candidate processing, and parsers#13

Closed
TianYuan-Liu wants to merge 2 commits intomasterfrom
continuous-claude/iteration-12/2026-01-30-488874e4
Closed

feat: Add 62 new unit tests for match_regions_to_genes, transcript, candidate processing, and parsers#13
TianYuan-Liu wants to merge 2 commits intomasterfrom
continuous-claude/iteration-12/2026-01-30-488874e4

Conversation

@TianYuan-Liu
Copy link
Member

  • match_regions_to_genes integration tests (9 tests): empty regions/genes
    handling, sorted region processing, max_gene_length effects, multiple
    chromosomes, large gaps between genes, gene level reporting with merging,
    and region order preservation.

  • Transcript advanced tests (7 tests): set_length interactions with
    calculate_size, exons extending beyond boundaries, renumber with many
    exons for both strands, overlapping exons robustness, single exon
    transcripts, and clone preserving exon numbers.

  • Process candidates edge cases (7 tests): single candidate at each
    reporting level (exon/transcript/gene), multiple genes at gene level,
    same gene different transcripts merging, mixed areas at transcript
    level, and all-below-threshold handling.

  • Config validation tests (8 tests): empty/comma-only rules parsing,
    partial valid rules, invalid tag handling, multiple set_distance_kb
    calls, all-zero and large max_lookback values, default rules order.

  • TSS boundary condition tests (5 tests): region at exact TSS position,
    very large distances, negative strand at end, zero length TSS zone,
    large region spanning all zones.

  • TTS boundary condition tests (5 tests): region at exact TTS position,
    very large distances, negative strand at start, zero TTS zone, large
    region spanning TTS and downstream.

  • BED reader edge cases (6 tests): single line files, exact chunk size,
    chunk larger than file, mixed comments, browser/track lines, Windows
    line endings.

  • GTF parser edge cases (6 tests): single exon genes, many exons (20),
    unsorted exons, mixed strands on same chromosome, genes without exons,
    duplicate exons.

  • Rules priority tests (5 tests): FirstExon beats Promoter, TSS beats
    FirstExon, custom rules with Downstream first, same priority ties,
    pctg_region tiebreaker.

  • Output line format validation (5 tests): field count with/without
    metadata, field order verification, percentage rounding, hundred
    percent formatting.

Unit test count increased from 282 to 344 tests.

TianYuan-Liu and others added 2 commits January 30, 2026 02:48
…andidate processing, and parsers

Add comprehensive test coverage across multiple modules:

- match_regions_to_genes integration tests (9 tests): empty regions/genes
  handling, sorted region processing, max_gene_length effects, multiple
  chromosomes, large gaps between genes, gene level reporting with merging,
  and region order preservation.

- Transcript advanced tests (7 tests): set_length interactions with
  calculate_size, exons extending beyond boundaries, renumber with many
  exons for both strands, overlapping exons robustness, single exon
  transcripts, and clone preserving exon numbers.

- Process candidates edge cases (7 tests): single candidate at each
  reporting level (exon/transcript/gene), multiple genes at gene level,
  same gene different transcripts merging, mixed areas at transcript
  level, and all-below-threshold handling.

- Config validation tests (8 tests): empty/comma-only rules parsing,
  partial valid rules, invalid tag handling, multiple set_distance_kb
  calls, all-zero and large max_lookback values, default rules order.

- TSS boundary condition tests (5 tests): region at exact TSS position,
  very large distances, negative strand at end, zero length TSS zone,
  large region spanning all zones.

- TTS boundary condition tests (5 tests): region at exact TTS position,
  very large distances, negative strand at start, zero TTS zone, large
  region spanning TTS and downstream.

- BED reader edge cases (6 tests): single line files, exact chunk size,
  chunk larger than file, mixed comments, browser/track lines, Windows
  line endings.

- GTF parser edge cases (6 tests): single exon genes, many exons (20),
  unsorted exons, mixed strands on same chromosome, genes without exons,
  duplicate exons.

- Rules priority tests (5 tests): FirstExon beats Promoter, TSS beats
  FirstExon, custom rules with Downstream first, same priority ties,
  pctg_region tiebreaker.

- Output line format validation (5 tests): field count with/without
  metadata, field order verification, percentage rounding, hundred
  percent formatting.

Unit test count increased from 282 to 344 tests.
Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
@TianYuan-Liu TianYuan-Liu deleted the continuous-claude/iteration-12/2026-01-30-488874e4 branch January 30, 2026 01:50
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