@@ -451,15 +451,8 @@ def snp_allele_frequencies_advanced(
451451 ci_method : Optional [frq_params .ci_method ] = frq_params .ci_method_default ,
452452 chunks : base_params .chunks = base_params .native_chunks ,
453453 inline_array : base_params .inline_array = base_params .inline_array_default ,
454- taxon_by : Optional [ frq_params .taxon_by ] = frq_params .taxon_by_default ,
454+ taxon_by : frq_params .taxon_by = frq_params .taxon_by_default ,
455455 ) -> xr .Dataset :
456- # Check that the taxon_by default hasn't been subverted, e.g. via `taxon_by=None`.
457- # This also satisfies type-checking, e.g. with `getattr`.
458- if taxon_by is None :
459- raise ValueError (
460- f"`taxon_by` cannot be set to `None`. The default would be { frq_params .taxon_by_default !r} ."
461- )
462-
463456 # Load sample metadata.
464457 df_samples = self .sample_metadata (
465458 sample_sets = sample_sets ,
@@ -687,15 +680,8 @@ def aa_allele_frequencies_advanced(
687680 ci_method : Optional [frq_params .ci_method ] = "wilson" ,
688681 chunks : base_params .chunks = base_params .native_chunks ,
689682 inline_array : base_params .inline_array = base_params .inline_array_default ,
690- taxon_by : Optional [ frq_params .taxon_by ] = frq_params .taxon_by_default ,
683+ taxon_by : frq_params .taxon_by = frq_params .taxon_by_default ,
691684 ) -> xr .Dataset :
692- # Check that the taxon_by default hasn't been subverted, e.g. via `taxon_by=None`.
693- # This also satisfies type-checking, e.g. with `getattr`.
694- if taxon_by is None :
695- raise ValueError (
696- f"`taxon_by` cannot be set to `None`. The default would be { frq_params .taxon_by_default !r} ."
697- )
698-
699685 # Begin by computing SNP allele frequencies.
700686 ds_snp_frq = self .snp_allele_frequencies_advanced (
701687 transcript = transcript ,
0 commit comments