gpsea.analysis.pscore.stats package
- class gpsea.analysis.pscore.stats.PhenotypeScoreStatistic(name: str)[source]
Bases:
Statistic
PhenotypeScoreStatistic calculates a p value for 2 or more phenotype score groups computed by a
PhenotypeScorer
.- abstract compute_pval(scores: Collection[Sequence[float]]) StatisticResult [source]
- class gpsea.analysis.pscore.stats.MannWhitneyStatistic[source]
Bases:
PhenotypeScoreStatistic
MannWhitneyStatistic is a wrapper around SciPy’s
mannwhitneyu()
function to apply Mann-Whitney U rank test on 2 phenotype scores.The NaN phenotype score values are ignored.
See Compare phenotype scores for an example usage.
- compute_pval(scores: Collection[Sequence[float]]) StatisticResult [source]
- class gpsea.analysis.pscore.stats.TTestStatistic[source]
Bases:
PhenotypeScoreStatistic
TTestStatistic is a wrapper around SciPy’s
ttest_ind()
function to apply T test on 2 phenotype scores.The NaN phenotype score values are ignored.
- compute_pval(scores: Collection[Sequence[float]]) StatisticResult [source]
- Returns:
a tuple with the p-value and the t-statistic