We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 21af2d2 commit 67ffa47Copy full SHA for 67ffa47
1 file changed
malariagen_data/anoph/igv.py
@@ -84,7 +84,13 @@ def _igv_view_alignments_tracks(
84
visibility_window: int = 20_000,
85
):
86
# Look up sample set for sample.
87
- sample_rec = self.sample_metadata().set_index("sample_id").loc[sample]
+ try:
88
+ sample_rec = self.sample_metadata().set_index("sample_id").loc[sample]
89
+ except KeyError as e:
90
+ raise ValueError(
91
+ f"No data found for sample {sample!r}. This sample might be unavailable or irrelevant with respect to settings."
92
+ ) from e
93
+
94
sample_set = sample_rec["sample_set"]
95
96
# Load data catalog.
0 commit comments