Commit 305bf4e
committed
fix: dedent empty-data check in cnv_discordant_read_calls (#777)
The if len(ly) == 0 check was incorrectly indented inside the inner
or s in prepared_sample_sets loop, making it dead code. This caused
an IndexError (from _simple_xarray_concat on an empty list) instead
of the intended ValueError when no data was found for a contig.
- Dedent the check to sit outside the inner loop (matching cnv_hmm)
- Improve error message to include the contig name
- Update test to verify the specific error message via match=1 parent aba27a3 commit 305bf4e
2 files changed
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
645 | | - | |
646 | | - | |
647 | | - | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
648 | 652 | | |
649 | 653 | | |
650 | 654 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
629 | | - | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
630 | 633 | | |
631 | 634 | | |
632 | 635 | | |
| |||
0 commit comments