Skip to content

Commit

Permalink
Merge branch 'master' into 583-GWSS-colors
Browse files Browse the repository at this point in the history
  • Loading branch information
leehart authored Sep 19, 2024
2 parents bfabef4 + da6b7bb commit 2e8b4c4
Show file tree
Hide file tree
Showing 3 changed files with 567 additions and 566 deletions.
15 changes: 14 additions & 1 deletion malariagen_data/anoph/cnv_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,11 @@ def _cnv_discordant_read_calls_dataset(
data_vars = dict()

debug("open zarr")
root = self.open_cnv_discordant_read_calls(sample_set=sample_set)

try:
root = self.open_cnv_discordant_read_calls(sample_set=sample_set)
except FileNotFoundError:
return None

# not all contigs have CNVs, need to check
# TODO consider returning dataset with zero length variants dimension, would
Expand Down Expand Up @@ -556,8 +560,17 @@ def cnv_discordant_read_calls(
inline_array=inline_array,
chunks=chunks,
)

# If no CNV DRCs dataset was found then skip
if y is None:
continue

ly.append(y)

if len(ly) == 0:
# Bail out, no data for given sample sets and analysis.
raise ValueError("No data found for requested sample sets.")

x = simple_xarray_concat(ly, dim=DIM_SAMPLE)
lx.append(x)

Expand Down
Loading

0 comments on commit 2e8b4c4

Please sign in to comment.