diff --git a/phykit/services/alignment/compositional_bias_per_site.py b/phykit/services/alignment/compositional_bias_per_site.py index 3ba9ea7..1fb9f4e 100644 --- a/phykit/services/alignment/compositional_bias_per_site.py +++ b/phykit/services/alignment/compositional_bias_per_site.py @@ -45,7 +45,6 @@ def calculate_compositional_bias_per_site( List[Power_divergenceResult], List[Union[float, str]], ]: - # get aln length aln_len = alignment.get_alignment_length() stat_res = [] @@ -53,23 +52,19 @@ def calculate_compositional_bias_per_site( nan_idx = [] for idx in range(aln_len): - # Count occurrences of each character at site idx - num_occurrences = self.get_number_of_occurrences_per_character(alignment, idx) + num_occurrences = \ + self.get_number_of_occurrences_per_character(alignment, idx) - # Perform chi-square test on the counts chisquare_res = chisquare(num_occurrences) stat_res.append(chisquare_res) - # Collect p-values and track NaN values if str(chisquare_res.pvalue) != "nan": p_vals.append(chisquare_res.pvalue) else: nan_idx.append(idx) - # Correct p-values using false discovery control p_vals_corrected = list(false_discovery_control(p_vals)) - # Reinsert "nan" values at the appropriate positions for idx in reversed(nan_idx): p_vals_corrected.insert(idx, "nan") diff --git a/phykit/version.py b/phykit/version.py index 0dcddbc..8c0d5d5 100644 --- a/phykit/version.py +++ b/phykit/version.py @@ -1 +1 @@ -__version__ = "1.20.0" +__version__ = "2.0.0"