1- from typing import Optional , Tuple
1+ from typing import Optional , Tuple , Sequence
22
33import allel # type: ignore
44import numpy as np
@@ -551,7 +551,7 @@ def _dipclust_concat_subplots(
551551 summary = "Perform diplotype clustering, annotated with heterozygosity, gene copy number and amino acid variants." ,
552552 parameters = dict (
553553 heterozygosity = "Plot heterozygosity track." ,
554- snp_transcript = "Plot amino acid variants for this transcript ." ,
554+ snp_transcripts = "Plot amino acid variants for these transcripts ." ,
555555 cnv_region = "Plot gene CNV calls for this region." ,
556556 snp_filter_min_maf = "Filter amino acid variants with alternate allele frequency below this threshold." ,
557557 ),
@@ -561,7 +561,7 @@ def plot_diplotype_clustering_advanced(
561561 region : base_params .regions ,
562562 heterozygosity : bool = True ,
563563 heterozygosity_colorscale : plotly_params .color_continuous_scale = "Greys" ,
564- snp_transcript : Optional [base_params .transcript ] = None ,
564+ snp_transcripts : Optional [Sequence [ base_params .transcript ] ] = None ,
565565 snp_colorscale : plotly_params .color_continuous_scale = "Greys" ,
566566 snp_filter_min_maf : float = 0.05 ,
567567 snp_query : Optional [base_params .snp_query ] = AA_CHANGE_QUERY ,
@@ -601,7 +601,7 @@ def plot_diplotype_clustering_advanced(
601601 chunks : base_params .chunks = base_params .native_chunks ,
602602 inline_array : base_params .inline_array = base_params .inline_array_default ,
603603 ):
604- if cohort_size and snp_transcript :
604+ if cohort_size and snp_transcripts :
605605 cohort_size = None
606606 print (
607607 "Cohort size is not supported with amino acid heatmap. Overriding cohort size to None."
@@ -682,7 +682,7 @@ def plot_diplotype_clustering_advanced(
682682 figures .append (cnv_trace )
683683 subplot_heights .append (cnv_row_height * n_cnv_genes )
684684
685- if snp_transcript :
685+ for snp_transcript in snp_transcripts :
686686 snp_trace , n_snps_transcript = self ._dipclust_snp_trace (
687687 transcript = snp_transcript ,
688688 sample_sets = sample_sets ,
0 commit comments