1
- from typing import Optional , Tuple
1
+ from typing import Optional , Tuple , Sequence
2
2
3
3
import allel # type: ignore
4
4
import numpy as np
@@ -551,7 +551,7 @@ def _dipclust_concat_subplots(
551
551
summary = "Perform diplotype clustering, annotated with heterozygosity, gene copy number and amino acid variants." ,
552
552
parameters = dict (
553
553
heterozygosity = "Plot heterozygosity track." ,
554
- snp_transcript = "Plot amino acid variants for this transcript ." ,
554
+ snp_transcripts = "Plot amino acid variants for these transcripts ." ,
555
555
cnv_region = "Plot gene CNV calls for this region." ,
556
556
snp_filter_min_maf = "Filter amino acid variants with alternate allele frequency below this threshold." ,
557
557
),
@@ -561,7 +561,7 @@ def plot_diplotype_clustering_advanced(
561
561
region : base_params .regions ,
562
562
heterozygosity : bool = True ,
563
563
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 ,
565
565
snp_colorscale : plotly_params .color_continuous_scale = "Greys" ,
566
566
snp_filter_min_maf : float = 0.05 ,
567
567
snp_query : Optional [base_params .snp_query ] = AA_CHANGE_QUERY ,
@@ -601,7 +601,7 @@ def plot_diplotype_clustering_advanced(
601
601
chunks : base_params .chunks = base_params .native_chunks ,
602
602
inline_array : base_params .inline_array = base_params .inline_array_default ,
603
603
):
604
- if cohort_size and snp_transcript :
604
+ if cohort_size and snp_transcripts :
605
605
cohort_size = None
606
606
print (
607
607
"Cohort size is not supported with amino acid heatmap. Overriding cohort size to None."
@@ -682,7 +682,7 @@ def plot_diplotype_clustering_advanced(
682
682
figures .append (cnv_trace )
683
683
subplot_heights .append (cnv_row_height * n_cnv_genes )
684
684
685
- if snp_transcript :
685
+ for snp_transcript in snp_transcripts :
686
686
snp_trace , n_snps_transcript = self ._dipclust_snp_trace (
687
687
transcript = snp_transcript ,
688
688
sample_sets = sample_sets ,
0 commit comments