genetest.statistics package¶
Subpackages¶
Submodules¶
genetest.statistics.core module¶
-
class
genetest.statistics.core.
StatsModels
[source]¶ Bases:
object
-
fit
(y, X)[source]¶ Fit the model.
Parameters: - y (pandas.DataFrame) – The vector of endogenous variable.
- X (pandas.DataFrame) – The matrix of exogenous variables.
Returns: All available statistics for a given test.
Return type:
-
genetest.statistics.descriptive module¶
-
genetest.statistics.descriptive.
get_maf
(genotypes, minor, major)[source]¶ Computes the minor allele frequency using genotypes.
Parameters: - genotypes (pandas.Series) – The genotypes.
- minor (str) – The minor allele.
- major (str) – The major allele.
Returns: - Returns the MAF, the minor allele, the major allele and a
boolean telling if the markers were flip or not.
Return type: Note
The frequency is computed using the alternative allele (i.e. the
2
genotype). If there are more2
genotypes than0
genotypes, the alternative allele frequency will be higher than 0.5.Note
When computing the alternative allele frequency, the missing genotypes are excluded. If there are no genotypes,
NaN
is returned.