xyalign.ploidy module¶
-
xyalign.ploidy.
permutation_test_chromosomes
(data_frame, first_chrom, second_chrom, chrom_column, value_column, num_perms, output_file=None)[source]¶ Runs a permutation test comparing mean values of two chromosomes.
Parameters: data_frame : pandas dataframe
first_chrom : str
The name of the first chromosome in comparison
second_chrom : str
The name of the second chromosome in comparison
chrom_column : str
The name of the column containing chromosome names
value_column : str
The name of the column containing the value of interest
num_perms : int
The number of permutations to use
output_file : {str, None}
If not None, will print results to this file
Returns: tuple
(mean of first chrom, mean of second chrom, p-value)
-
xyalign.ploidy.
ks_two_sample
(data_frame, first_chrom, second_chrom, chrom_column, value_column, output_file=None)[source]¶ Runs a Two-sample Kolmogorov-Smirnov test
Parameters: data_frame : pandas dataframe
first_chrom : str
The name of the first chromosome in comparison
second_chrom : str
The name of the second chromosome in comparison
chrom_column : str
The name of the column containing chromosome names
value_column : str
The name of the column containing the value of interest
output_file : {str, None}
If not None, will print results to this file.
Returns: tuple
(ks_statistic, ks_pvalue)
-
xyalign.ploidy.
bootstrap
(data_frame, first_chrom, second_chrom, chrom_column, value_column, num_reps, output_file=None)[source]¶ Bootstraps the 95 percent confidence interval of the mean ratio of measure for two chromosomes (chrom1 / chrom2).
Parameters: data_frame : pandas dataframe
first_chrom : str
The name of the first chromosome in comparison
second_chrom : str
The name of the second chromosome in comparison
chrom_column : str
The name of the column containing chromosome names
value_column : str
The name of the column containing the value of interest
num_reps : int
The number of bootstrap replicates to use
output_file : {str, None}
If not None, will print results to this file.
Returns: tuple
(mean ratio, 0.025 percentile, 0.975 percentile)