Skip to content

Commit c5d5741

Browse files
authored
Merge branch 'master' into GH965-g123-cache-key-fix
2 parents 9971b84 + 532d574 commit c5d5741

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

malariagen_data/anoph/cnv_data.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,9 +642,13 @@ def cnv_discordant_read_calls(
642642

643643
ly.append(y)
644644

645-
if len(ly) == 0:
646-
# Bail out, no data for given sample sets and analysis.
647-
raise ValueError("No data found for requested sample sets.")
645+
if len(ly) == 0:
646+
# Bail out, no data for given sample sets and contig.
647+
raise ValueError(
648+
f"No CNV discordant read calls data found for contig {c!r} "
649+
f"in the requested sample sets. This could be because the "
650+
f"sample sets do not have discordant read calls data available."
651+
)
648652

649653
x = _simple_xarray_concat(ly, dim=DIM_SAMPLE)
650654
lx.append(x)

malariagen_data/mjn.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,6 @@ def _mjn_graph_edges(
281281
# add edge from final intermediate node to node j
282282
source = f"anon_{i}_{j}_{sep-2}"
283283
target = j
284-
graph_node = {
285-
"id": source,
286-
"count": 0,
287-
"width": anon_width,
288-
}
289-
graph_nodes.append(graph_node)
290284
graph_edge = {
291285
"id": f"edge_{i}_{j}_{sep-1}",
292286
"source": source,

tests/anoph/test_cnv_data.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,10 @@ def test_cnv_discordant_read_calls(fixture, api: AnophelesCnvData):
626626
assert isinstance(d2, xr.DataArray)
627627

628628
# Check with a contig that should not exist
629-
with pytest.raises(ValueError):
629+
with pytest.raises(
630+
ValueError,
631+
match="No CNV discordant read calls data found|no CNVs available for contig",
632+
):
630633
api.cnv_discordant_read_calls(
631634
contig="foobar", sample_sets=random.choice(all_sample_sets)
632635
)

0 commit comments

Comments
 (0)