Skip to content

Commit 74fb81f

Browse files
Merge branch 'master' into GH1056-local-file-urls-escaped-paths
2 parents 0af39cf + b1ab7fb commit 74fb81f

5 files changed

Lines changed: 452 additions & 10 deletions

File tree

malariagen_data/anoph/dipclust.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import warnings
12
from typing import Optional, Tuple
23

34
import allel # type: ignore
@@ -540,8 +541,9 @@ def _insert_dipclust_snp_trace(
540541
figures.append(snp_trace)
541542
subplot_heights.append(snp_row_height * n_snps_transcript)
542543
else:
543-
print(
544-
f"No SNPs were found below {snp_filter_min_maf} allele frequency. Omitting SNP genotype plot."
544+
warnings.warn(
545+
f"No SNPs were found below {snp_filter_min_maf} allele frequency. Omitting SNP genotype plot.",
546+
stacklevel=2,
545547
)
546548
return figures, subplot_heights, n_snps_transcript
547549

@@ -607,8 +609,9 @@ def plot_diplotype_clustering_advanced(
607609
cnv_colorscale = cnv_params.colorscale_default
608610
if cohort_size and snp_transcript:
609611
cohort_size = None
610-
print(
611-
"Cohort size is not supported with amino acid heatmap. Overriding cohort size to None."
612+
warnings.warn(
613+
"Cohort size is not supported with amino acid heatmap. Overriding cohort size to None.",
614+
stacklevel=2,
612615
)
613616

614617
res = self.plot_diplotype_clustering(

0 commit comments

Comments
 (0)