Functions¶
Genetic-related tools for Limix..
-
limix_genetics.
maf
(X)¶ Compute minor allele frequencies.
It assumes that X encodes 0, 1, and 2 representing the number of alleles.
Parameters: X (array_like) – Genotype matrix. Returns: minor allele frequencies. Return type: array_like
-
limix_genetics.
qqplot
(df, figure=None, colors=None, show=True, tools=None, nmax_points=1000, atleast_points=0.01, significance_level=0.01, paper_settings=False, **kwargs)¶ Plot number of significant hits across p-value thresholds.
Parameters: df ( pandas.DataFrame
) – Columns label and p-value define labeled curves.Example
from limix_genetics import qqplot import pandas as pd import numpy as np random = np.random.RandomState(0) snp_ids = np.arange(1000) data1 = np.stack((['method1']*1000, random.rand(1000)), axis=1) df1 = pd.DataFrame(data1, columns=['label', 'p-value'], index=snp_ids) data2 = np.stack((['method2']*1000, random.rand(1000)), axis=1) df2 = pd.DataFrame(data2, columns=['label', 'p-value'], index=snp_ids) df = pd.concat([df1, df2]) qqplot(df)
-
limix_genetics.
hitsplot
(df, figure=None, colors=None, show=True, tools=None, min_threshold=1e-05, max_threshold=0.01, paper_settings=False, perc=False, **kwargs)¶ Plot number of significant hits across p-value thresholds.
Parameters: df ( pandas.DataFrame
) – Columns label and p-value define labeled curves.Example
from limix_genetics import hitsplot import pandas as pd import numpy as np random = np.random.RandomState(0) snp_ids = np.arange(1000) data1 = np.stack((['method1']*1000, random.rand(1000) * 0.1), axis=1) df1 = pd.DataFrame(data1, columns=['label', 'p-value'], index=snp_ids) data2 = np.stack((['method2']*1000, random.rand(1000) * 0.05), axis=1) df2 = pd.DataFrame(data2, columns=['label', 'p-value'], index=snp_ids) df = pd.concat([df1, df2]) hitsplot(df)