phensim 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- phensim/__init__.py +109 -0
- phensim/_coalescent.py +649 -0
- phensim/_common.py +76 -0
- phensim/_numba.py +19 -0
- phensim/ancestry.py +596 -0
- phensim/genotypes.py +551 -0
- phensim/hapnest.py +197 -0
- phensim/io.py +198 -0
- phensim/kinship.py +222 -0
- phensim/pedigree.py +444 -0
- phensim/phenotypes.py +629 -0
- phensim/sumstats.py +749 -0
- phensim-1.0.0.dist-info/METADATA +331 -0
- phensim-1.0.0.dist-info/RECORD +17 -0
- phensim-1.0.0.dist-info/WHEEL +5 -0
- phensim-1.0.0.dist-info/licenses/LICENSE +19 -0
- phensim-1.0.0.dist-info/top_level.txt +1 -0
phensim/__init__.py
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"""phensim: genotype and phenotype simulators for genetic studies."""
|
|
2
|
+
|
|
3
|
+
__version__ = "1.0.0"
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"simulate_independent",
|
|
7
|
+
"simulate_population_structure",
|
|
8
|
+
"simulate_haplotype_blocks",
|
|
9
|
+
"simulate_ar1_blocks",
|
|
10
|
+
"realistic_block_sizes",
|
|
11
|
+
"simulate_coalescent",
|
|
12
|
+
"simulate_by_mutation_rate",
|
|
13
|
+
"simulate_hapnest",
|
|
14
|
+
"iter_hapnest",
|
|
15
|
+
"drift_frequencies",
|
|
16
|
+
"simulate_populations",
|
|
17
|
+
"simulate_admixed",
|
|
18
|
+
"simulate_split_coalescent",
|
|
19
|
+
"simulate_genome",
|
|
20
|
+
"simulate_meta_sumstats",
|
|
21
|
+
"simulate_trait",
|
|
22
|
+
"simulate_binary_trait",
|
|
23
|
+
"simulate_confounded_trait",
|
|
24
|
+
"simulate_gxe_trait",
|
|
25
|
+
"simulate_correlated_traits",
|
|
26
|
+
"ascertain_case_control",
|
|
27
|
+
"n_eff_case_control",
|
|
28
|
+
"h2_liability",
|
|
29
|
+
"simulate_effects",
|
|
30
|
+
"simulate_effects_pair",
|
|
31
|
+
"genetic_correlation",
|
|
32
|
+
"simulate_sumstats",
|
|
33
|
+
"simulate_sumstats_pair",
|
|
34
|
+
"prepare_blocks",
|
|
35
|
+
"simulate_gaussian_individuals",
|
|
36
|
+
"gwas_scan",
|
|
37
|
+
"shake_ld",
|
|
38
|
+
"simulate_pedigree",
|
|
39
|
+
"pedigree_birth_times",
|
|
40
|
+
"kinship_from_pedigree",
|
|
41
|
+
"mendelian_draw",
|
|
42
|
+
"grm",
|
|
43
|
+
"ibs_kinship",
|
|
44
|
+
"iter_loco_kinships",
|
|
45
|
+
"loco_kinships",
|
|
46
|
+
"windowed_kinships",
|
|
47
|
+
"write_plink",
|
|
48
|
+
"HAVE_NUMBA",
|
|
49
|
+
"__version__",
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
_MAP = {
|
|
53
|
+
"simulate_hapnest": ("phensim.hapnest", "simulate_hapnest"),
|
|
54
|
+
"iter_hapnest": ("phensim.hapnest", "iter_hapnest"),
|
|
55
|
+
"drift_frequencies": ("phensim.ancestry", "drift_frequencies"),
|
|
56
|
+
"simulate_populations": ("phensim.ancestry", "simulate_populations"),
|
|
57
|
+
"simulate_admixed": ("phensim.ancestry", "simulate_admixed"),
|
|
58
|
+
"simulate_split_coalescent": ("phensim.ancestry", "simulate_split_coalescent"),
|
|
59
|
+
"simulate_genome": ("phensim.ancestry", "simulate_genome"),
|
|
60
|
+
"simulate_meta_sumstats": ("phensim.ancestry", "simulate_meta_sumstats"),
|
|
61
|
+
"simulate_independent": ("phensim.genotypes", "simulate_independent"),
|
|
62
|
+
"simulate_population_structure": ("phensim.genotypes", "simulate_population_structure"),
|
|
63
|
+
"simulate_haplotype_blocks": ("phensim.genotypes", "simulate_haplotype_blocks"),
|
|
64
|
+
"simulate_ar1_blocks": ("phensim.genotypes", "simulate_ar1_blocks"),
|
|
65
|
+
"realistic_block_sizes": ("phensim.genotypes", "realistic_block_sizes"),
|
|
66
|
+
"simulate_coalescent": ("phensim.genotypes", "simulate_coalescent"),
|
|
67
|
+
"simulate_by_mutation_rate": ("phensim.genotypes", "simulate_by_mutation_rate"),
|
|
68
|
+
"simulate_trait": ("phensim.phenotypes", "simulate_trait"),
|
|
69
|
+
"simulate_binary_trait": ("phensim.phenotypes", "simulate_binary_trait"),
|
|
70
|
+
"simulate_confounded_trait": ("phensim.phenotypes", "simulate_confounded_trait"),
|
|
71
|
+
"simulate_gxe_trait": ("phensim.phenotypes", "simulate_gxe_trait"),
|
|
72
|
+
"simulate_correlated_traits": ("phensim.phenotypes", "simulate_correlated_traits"),
|
|
73
|
+
"ascertain_case_control": ("phensim.phenotypes", "ascertain_case_control"),
|
|
74
|
+
"n_eff_case_control": ("phensim.phenotypes", "n_eff_case_control"),
|
|
75
|
+
"h2_liability": ("phensim.phenotypes", "h2_liability"),
|
|
76
|
+
"simulate_effects": ("phensim.sumstats", "simulate_effects"),
|
|
77
|
+
"simulate_effects_pair": ("phensim.sumstats", "simulate_effects_pair"),
|
|
78
|
+
"genetic_correlation": ("phensim.sumstats", "genetic_correlation"),
|
|
79
|
+
"simulate_sumstats": ("phensim.sumstats", "simulate_sumstats"),
|
|
80
|
+
"simulate_sumstats_pair": ("phensim.sumstats", "simulate_sumstats_pair"),
|
|
81
|
+
"prepare_blocks": ("phensim.sumstats", "prepare_blocks"),
|
|
82
|
+
"simulate_gaussian_individuals": ("phensim.sumstats", "simulate_gaussian_individuals"),
|
|
83
|
+
"gwas_scan": ("phensim.sumstats", "gwas_scan"),
|
|
84
|
+
"shake_ld": ("phensim.sumstats", "shake_ld"),
|
|
85
|
+
"simulate_pedigree": ("phensim.pedigree", "simulate_pedigree"),
|
|
86
|
+
"pedigree_birth_times": ("phensim.pedigree", "pedigree_birth_times"),
|
|
87
|
+
"kinship_from_pedigree": ("phensim.pedigree", "kinship_from_pedigree"),
|
|
88
|
+
"mendelian_draw": ("phensim.pedigree", "mendelian_draw"),
|
|
89
|
+
"grm": ("phensim.kinship", "grm"),
|
|
90
|
+
"ibs_kinship": ("phensim.kinship", "ibs_kinship"),
|
|
91
|
+
"iter_loco_kinships": ("phensim.kinship", "iter_loco_kinships"),
|
|
92
|
+
"loco_kinships": ("phensim.kinship", "loco_kinships"),
|
|
93
|
+
"windowed_kinships": ("phensim.kinship", "windowed_kinships"),
|
|
94
|
+
"write_plink": ("phensim.io", "write_plink"),
|
|
95
|
+
"HAVE_NUMBA": ("phensim._numba", "HAVE_NUMBA"),
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def __getattr__(name):
|
|
100
|
+
if name in _MAP:
|
|
101
|
+
import importlib
|
|
102
|
+
|
|
103
|
+
module_name, attr = _MAP[name]
|
|
104
|
+
return getattr(importlib.import_module(module_name), attr)
|
|
105
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def __dir__():
|
|
109
|
+
return sorted(__all__)
|