├── docs ├── .nojekyll ├── src │ ├── simuPOPRef.ref │ ├── static │ │ ├── background.png │ │ ├── indexsidebar.html │ │ └── indexcontent.html │ ├── refManual.rst │ ├── BernullitrialsTRef.ref │ ├── elapsedTimeRef.ref │ ├── simuPOPdvarsRef.ref │ ├── simuPOPobjequalRef.ref │ ├── simuPOPsamplingisNumberRef.ref │ ├── simuPOPutilsRef.ref │ ├── getRNGRef.ref │ ├── simuPOPsamplingisSequenceRef.ref │ ├── simuPOPsamplingrandomshuffleRef.ref │ ├── simuPOPdumpRef.ref │ ├── simuPOPindgetInfothreeRef.ref │ ├── simuPOPindsetInfotwoRef.ref │ ├── simuPOPindsetInfothreeRef.ref │ ├── simuPOPmigrateRef.ref │ ├── simuPOPpyMutateRef.ref │ ├── simuPOPinitSexRef.ref │ ├── simuPOPpyExecRef.ref │ ├── simuPOPsnpMutateRef.ref │ ├── simuPOPacgtMutateRef.ref │ ├── simuPOPinitInfoRef.ref │ ├── index.rst │ ├── simuPOPmixedMutateRef.ref │ ├── simuPOPpointMutateRef.ref │ ├── loadPopulationRef.ref │ ├── simuPOPmatrixMutateRef.ref │ ├── simuPOPcontextMutateRef.ref │ ├── simuPOPinitLineageRef.ref │ ├── simuPOPkAlleleMutateRef.ref │ ├── opListRef.ref │ ├── simuPOPinitGenotypeRef.ref │ ├── simuPOPstepwiseMutateRef.ref │ ├── simuPOPutilsexportRef.ref │ ├── simuPOPbackwardMigrateRef.ref │ ├── simuPOPrevertFixedSitesRef.ref │ ├── floatListRef.ref │ ├── intMatrixRef.ref │ ├── uintStringRef.ref │ ├── stringListRef.ref │ ├── floatMatrixRef.ref │ ├── floatListFuncRef.ref │ ├── stringMatrixRef.ref │ ├── uintListFuncRef.ref │ ├── userGuide.rst │ ├── IndexErrorRef.ref │ ├── ValueErrorRef.ref │ ├── userGuide_ch4.rst │ ├── RevertEvolutionRef.ref │ ├── SystemErrorRef.ref │ ├── StopIterationRef.ref │ ├── RuntimeErrorRef.ref │ ├── refManual_ch4.rst │ ├── simuPOPsetRNGRef.ref │ ├── simuPOPdiscardIfRef.ref │ ├── StopEvolutionRef.ref │ ├── simuPOPaspopulationRef.ref │ ├── simuPOPinfoEvalRef.ref │ ├── simuPOPinfoExecRef.ref │ ├── stringFuncRef.ref │ ├── userGuide_ch2.rst │ ├── turnOffDebugRef.ref │ ├── uintListRef.ref │ ├── userGuide_ch3.rst │ ├── userGuide_ch7.rst │ ├── refManual_ch2.rst │ ├── turnOnDebugRef.ref │ ├── simuPOPmergeSubPopsRef.ref │ ├── simuPOPstatRef.ref │ ├── simuPOPaspedigreeRef.ref │ ├── simuPOPutilsMSImporterRef.ref │ ├── simuPOPutilsFStatImporterRef.ref │ ├── intListRef.ref │ ├── ExceptionRef.ref │ ├── lociListRef.ref │ ├── simuPOPutilsGenePopImporterRef.ref │ ├── userGuide_ch6.rst │ ├── simuPOPutilsPhylipImporterRef.ref │ ├── simuPOPutilsmigrIslandRatesRef.ref │ ├── simuPOPresizeSubPopsRef.ref │ ├── simuPOPmlPenetranceRef.ref │ ├── simuPOPpyQuanTraitRef.ref │ ├── simuPOPpyPenetranceRef.ref │ ├── vspIDRef.ref │ ├── simuPOPsplitSubPopsRef.ref │ ├── simuPOPmapPenetranceRef.ref │ ├── simuPOPsamplingdrawRandomSamplesRef.ref │ ├── simuPOPmaPenetranceRef.ref │ ├── simuPOPpyMlPenetranceRef.ref │ ├── simuPOPsamplingdrawCombinedSamplesRef.ref │ ├── NoneOpRef.ref │ ├── simuPOPutilsMSExporterRef.ref │ ├── simuPOPutilsMapExporterRef.ref │ ├── simuPOPutilsFStatExporterRef.ref │ ├── simuPOPtagIDRef.ref │ ├── simuPOPutilsGenePopExporterRef.ref │ ├── simuPOPutilsPhylipExporterRef.ref │ ├── pyPopIteratorRef.ref │ ├── simuPOPdefdictRef.ref │ ├── describeEvolProcessRef.ref │ ├── simuPOPsamplingdrawCaseControlSamplesRef.ref │ ├── simuPOPutilsPEDExporterRef.ref │ ├── simuPOPsamplingdrawAffectedSibpairSamplesRef.ref │ ├── simuPOPsamplingdrawCombinedSampleRef.ref │ ├── simuPOPdemographymigrtwoDSteppingStoneRatesRef.ref │ ├── simuPOPpyEvalRef.ref │ ├── simuPOPWithArgsRef.ref │ ├── simuPOPsamplingdrawNuclearFamilySamplesRef.ref │ ├── simuPOPsamplingdrawThreeGenFamilySamplesRef.ref │ ├── refManual_ch3.rst │ ├── simuPOPutilsCSVExporterRef.ref │ ├── subPopListRef.ref │ ├── setOptionsRef.ref │ ├── simuPOPutilsStructureExporterRef.ref │ ├── simuPOPdemographyMergeEventRef.ref │ ├── simuPOPSNPMutatorRef.ref │ ├── PyOutputRef.ref │ ├── simuPOPSequentialParentsChooserRef.ref │ ├── simuPOPsamplingdrawRandomSampleRef.ref │ ├── closeOutputRef.ref │ ├── simuPOPallindividualsRef.ref │ ├── simuPOPutilsviewVarsRef.ref │ ├── SexSplitterRef.ref │ ├── simuPOPsamplingCaseControlSamplerRef.ref │ ├── simuPOPutilsmigrSteppingStoneRatesRef.ref │ ├── pyIndIteratorRef.ref │ ├── IndividualIteratorRef.ref │ ├── simuPOPsamplingdrawCaseControlSampleRef.ref │ ├── userGuide_ch8.rst │ ├── pyMutantIteratorRef.ref │ ├── AffectionSplitterRef.ref │ ├── simuPOPsamplingdrawAffectedSibpairSampleRef.ref │ ├── MergeSubPopsRef.ref │ ├── ParentChooserRef.ref │ ├── simuPOPevolvepopRef.ref │ ├── simuPOPWithModeRef.ref │ ├── simuPOPdemographySplitEventRef.ref │ ├── simuPOPdemographyRef.ref │ ├── SavePopulationRef.ref │ ├── RevertFixedSitesRef.ref │ ├── simuPOPHaplodiploidMatingRef.ref │ ├── simuPOPRandomMatingRef.ref │ ├── simuPOPsamplingAffectedSibpairSamplerRef.ref │ ├── SelfingGenoTransmitterRef.ref │ ├── userGuide_ch7_sec5.rst │ ├── OffspringTaggerRef.ref │ ├── ProportionSplitterRef.ref │ ├── simuPOPMonogamousMatingRef.ref │ ├── simuPOPPolygamousMatingRef.ref │ ├── simuPOPsamplingindexToIDRef.ref │ ├── userGuide_ch7_sec1.rst │ ├── simuPOPCloneMatingRef.ref │ ├── simuPOPSelfMatingRef.ref │ ├── userGuide_ch8_sec1.rst │ ├── InitInfoRef.ref │ ├── simuPOPdemographyResizeEventRef.ref │ ├── simuPOPRandomSelectionRef.ref │ ├── simuPOPsamplingRandomSamplerRef.ref │ ├── simuPOPsamplingdrawNuclearFamilySampleRef.ref │ ├── ResizeSubPopsRef.ref │ ├── HaplodiploidGenoTransmitterRef.ref │ ├── simuPOPdemographyDemographicEventRef.ref │ ├── PyExecRef.ref │ ├── simuPOPHermaphroditicMatingRef.ref │ ├── RangeSplitterRef.ref │ ├── SummaryTaggerRef.ref │ ├── simuPOPutilsmigrHierarchicalIslandRatesRef.ref │ ├── ConditionalMatingRef.ref │ ├── MixedMutatorRef.ref │ ├── simuPOPsamplingdrawThreeGenFamilySampleRef.ref │ ├── simuPOPutilssimulateForwardTrajectoryRef.ref │ ├── SequentialParentChooserRef.ref │ ├── simuPOPutilssimulateBackwardTrajectoryRef.ref │ ├── PointMutatorRef.ref │ ├── InitSexRef.ref │ ├── KAlleleMutatorRef.ref │ ├── PyTaggerRef.ref │ ├── TerminateIfRef.ref │ ├── simuPOPsamplingCombinedSamplerRef.ref │ ├── userGuide_ch2_sec6.rst │ └── simuPOPAcgtMutatorRef.ref ├── _static │ ├── custom.css │ ├── up.png │ ├── down.png │ ├── file.png │ ├── plus.png │ ├── comment.png │ ├── minus.png │ ├── ajax-loader.gif │ ├── background.png │ ├── down-pressed.png │ ├── up-pressed.png │ ├── comment-bright.png │ ├── comment-close.png │ ├── documentation_options.js │ ├── indexsidebar.html │ └── indexcontent.html ├── demoEventModel.png ├── _build │ └── .doctrees │ │ ├── index.doctree │ │ ├── refManual.doctree │ │ ├── userGuide.doctree │ │ ├── refManual_ch1.doctree │ │ ├── refManual_ch2.doctree │ │ ├── refManual_ch3.doctree │ │ ├── refManual_ch4.doctree │ │ ├── userGuide_ch1.doctree │ │ ├── userGuide_ch2.doctree │ │ ├── userGuide_ch3.doctree │ │ ├── userGuide_ch4.doctree │ │ ├── userGuide_ch5.doctree │ │ ├── userGuide_ch6.doctree │ │ ├── userGuide_ch7.doctree │ │ ├── userGuide_ch8.doctree │ │ ├── refManual_ch2_sec1.doctree │ │ ├── refManual_ch2_sec2.doctree │ │ ├── refManual_ch2_sec3.doctree │ │ ├── refManual_ch2_sec4.doctree │ │ ├── refManual_ch2_sec5.doctree │ │ ├── refManual_ch2_sec6.doctree │ │ ├── refManual_ch3_sec1.doctree │ │ ├── refManual_ch3_sec10.doctree │ │ ├── refManual_ch3_sec11.doctree │ │ ├── refManual_ch3_sec12.doctree │ │ ├── refManual_ch3_sec13.doctree │ │ ├── refManual_ch3_sec14.doctree │ │ ├── refManual_ch3_sec15.doctree │ │ ├── refManual_ch3_sec2.doctree │ │ ├── refManual_ch3_sec3.doctree │ │ ├── refManual_ch3_sec4.doctree │ │ ├── refManual_ch3_sec5.doctree │ │ ├── refManual_ch3_sec6.doctree │ │ ├── refManual_ch3_sec7.doctree │ │ ├── refManual_ch3_sec8.doctree │ │ ├── refManual_ch3_sec9.doctree │ │ ├── refManual_ch4_sec1.doctree │ │ ├── refManual_ch4_sec2.doctree │ │ ├── refManual_ch4_sec3.doctree │ │ ├── refManual_ch4_sec4.doctree │ │ ├── refManual_ch4_sec5.doctree │ │ ├── userGuide_ch2_sec1.doctree │ │ ├── userGuide_ch2_sec2.doctree │ │ ├── userGuide_ch2_sec3.doctree │ │ ├── userGuide_ch2_sec4.doctree │ │ ├── userGuide_ch2_sec5.doctree │ │ ├── userGuide_ch2_sec6.doctree │ │ ├── userGuide_ch3_sec1.doctree │ │ ├── userGuide_ch3_sec2.doctree │ │ ├── userGuide_ch3_sec3.doctree │ │ ├── userGuide_ch3_sec4.doctree │ │ ├── userGuide_ch3_sec5.doctree │ │ ├── userGuide_ch4_sec1.doctree │ │ ├── userGuide_ch4_sec2.doctree │ │ ├── userGuide_ch4_sec3.doctree │ │ ├── userGuide_ch5_sec1.doctree │ │ ├── userGuide_ch5_sec10.doctree │ │ ├── userGuide_ch5_sec11.doctree │ │ ├── userGuide_ch5_sec12.doctree │ │ ├── userGuide_ch5_sec13.doctree │ │ ├── userGuide_ch5_sec14.doctree │ │ ├── userGuide_ch5_sec2.doctree │ │ ├── userGuide_ch5_sec3.doctree │ │ ├── userGuide_ch5_sec4.doctree │ │ ├── userGuide_ch5_sec5.doctree │ │ ├── userGuide_ch5_sec6.doctree │ │ ├── userGuide_ch5_sec7.doctree │ │ ├── userGuide_ch5_sec8.doctree │ │ ├── userGuide_ch5_sec9.doctree │ │ ├── userGuide_ch6_sec1.doctree │ │ ├── userGuide_ch6_sec2.doctree │ │ ├── userGuide_ch6_sec3.doctree │ │ ├── userGuide_ch6_sec4.doctree │ │ ├── userGuide_ch6_sec5.doctree │ │ ├── userGuide_ch6_sec6.doctree │ │ ├── userGuide_ch6_sec7.doctree │ │ ├── userGuide_ch6_sec8.doctree │ │ ├── userGuide_ch7_sec1.doctree │ │ ├── userGuide_ch7_sec2.doctree │ │ ├── userGuide_ch7_sec3.doctree │ │ ├── userGuide_ch7_sec4.doctree │ │ ├── userGuide_ch7_sec5.doctree │ │ ├── userGuide_ch8_sec1.doctree │ │ ├── userGuide_ch8_sec2.doctree │ │ ├── userGuide_ch8_sec3.doctree │ │ ├── userGuide_ch8_sec4.doctree │ │ ├── userGuide_ch8_sec5.doctree │ │ └── userGuide_ch8_sec6.doctree ├── _sources │ ├── refManual.rst.txt │ ├── index.rst.txt │ ├── userGuide.rst.txt │ ├── userGuide_ch4.rst.txt │ ├── refManual_ch4.rst.txt │ ├── userGuide_ch2.rst.txt │ ├── userGuide_ch3.rst.txt │ ├── userGuide_ch7.rst.txt │ ├── refManual_ch2.rst.txt │ ├── userGuide_ch6.rst.txt │ ├── refManual_ch3.rst.txt │ ├── userGuide_ch8.rst.txt │ ├── userGuide_ch7_sec5.rst.txt │ ├── userGuide_ch7_sec1.rst.txt │ ├── userGuide_ch8_sec1.rst.txt │ └── userGuide_ch2_sec6.rst.txt ├── help.py ├── standard.py └── haplodiploid.py ├── AUTHORS ├── requirements.txt ├── src ├── _version.py ├── simuPOP_std.i ├── simuPOP_ba.i ├── simuPOP_lin.i ├── simuPOP_op.i ├── simuPOP_la.i ├── simuPOP_laop.i ├── simuPOP_linop.i ├── simuPOP_baop.i ├── simuPOP_mu.i └── simuPOP_muop.i ├── .gitignore ├── doc ├── manual.layout ├── refManual.pdf ├── userGuide.pdf ├── doc_generation.png ├── figures │ ├── evolve.dia │ ├── evolve.png │ ├── genotype.png │ ├── getParam.png │ ├── simuCDCV.png │ ├── viewVars.png │ ├── chromType.png │ ├── operators.dia │ ├── operators.png │ ├── MatingScheme.dia │ ├── MatingScheme.png │ ├── HomoMatingScheme.dia │ └── HomoMatingScheme.png ├── tools │ ├── background.png │ ├── indexsidebar.html │ ├── sphinx-build.py │ └── indexcontent.html ├── index.rst └── pypaper.sty ├── gsl ├── complex │ └── math.c ├── gsl_complex_math.h ├── specfunc │ ├── check.h │ ├── eval.h │ ├── cheb_eval.c │ └── chebyshev.h ├── error.h ├── cdf │ ├── rat_eval.h │ ├── chisq.c │ ├── chisqinv.c │ └── exponentialinv.c ├── gsl_version.h ├── sys │ ├── fdiv.c │ └── log1p.c ├── build.h └── gsl_types.h ├── test ├── sample_32_ba.pop ├── sample_32_la.pop ├── sample_64_ba.pop ├── sample_64_la.pop ├── sample_32_ba_v1.pop ├── sample_32_ba_v2.pop ├── sample_32_la_v1.pop ├── sample_32_la_v2.pop ├── sample_32_mu_v1.pop ├── sample_32_mu_v2.pop ├── sample_32_std.pop ├── sample_64_ba_v1.pop ├── sample_64_ba_v2.pop ├── sample_64_ba_v3.pop ├── sample_64_la_v1.pop ├── sample_64_la_v2.pop ├── sample_64_mu_v1.pop ├── sample_64_mu_v2.pop ├── sample_64_std.pop ├── sample_32_lin_v1.pop ├── sample_32_lin_v2.pop ├── sample_32_std_v1.pop ├── sample_32_std_v2.pop ├── sample_64_lin_v1.pop ├── sample_64_lin_v2.pop ├── sample_64_std_v1.pop ├── sample_64_std_v2.pop └── sample_64_std_v3.pop ├── development ├── conda │ ├── build.sh │ └── bld.bat ├── release.sos └── docker │ └── Dockerfile ├── .travis.yml ├── Makefile └── .github └── workflows └── python-app.yml /docs/.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Bo Peng 2 | -------------------------------------------------------------------------------- /docs/src/simuPOPRef.ref: -------------------------------------------------------------------------------- 1 | FIXME: No document 2 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | numpy 2 | matplotlib 3 | setuptools 4 | -------------------------------------------------------------------------------- /src/_version.py: -------------------------------------------------------------------------------- 1 | __version__="1.1.17" 2 | __revision__="4682" 3 | -------------------------------------------------------------------------------- /docs/_static/custom.css: -------------------------------------------------------------------------------- 1 | /* This file intentionally left blank. */ 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | __pycache__ 3 | boost* 4 | build/ 5 | dist/ 6 | *.egg-info 7 | -------------------------------------------------------------------------------- /doc/manual.layout: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/manual.layout -------------------------------------------------------------------------------- /doc/refManual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/refManual.pdf -------------------------------------------------------------------------------- /doc/userGuide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/userGuide.pdf -------------------------------------------------------------------------------- /docs/_static/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_static/up.png -------------------------------------------------------------------------------- /gsl/complex/math.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/gsl/complex/math.c -------------------------------------------------------------------------------- /docs/_static/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_static/down.png -------------------------------------------------------------------------------- /docs/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_static/file.png -------------------------------------------------------------------------------- /docs/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_static/plus.png -------------------------------------------------------------------------------- /test/sample_32_ba.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_32_ba.pop -------------------------------------------------------------------------------- /test/sample_32_la.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_32_la.pop -------------------------------------------------------------------------------- /test/sample_64_ba.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_64_ba.pop -------------------------------------------------------------------------------- /test/sample_64_la.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_64_la.pop -------------------------------------------------------------------------------- /doc/doc_generation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/doc_generation.png -------------------------------------------------------------------------------- /doc/figures/evolve.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/figures/evolve.dia -------------------------------------------------------------------------------- /doc/figures/evolve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/figures/evolve.png -------------------------------------------------------------------------------- /doc/figures/genotype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/figures/genotype.png -------------------------------------------------------------------------------- /doc/figures/getParam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/figures/getParam.png -------------------------------------------------------------------------------- /doc/figures/simuCDCV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/figures/simuCDCV.png -------------------------------------------------------------------------------- /doc/figures/viewVars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/figures/viewVars.png -------------------------------------------------------------------------------- /doc/tools/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/tools/background.png -------------------------------------------------------------------------------- /docs/_static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_static/comment.png -------------------------------------------------------------------------------- /docs/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_static/minus.png -------------------------------------------------------------------------------- /docs/demoEventModel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/demoEventModel.png -------------------------------------------------------------------------------- /gsl/gsl_complex_math.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/gsl/gsl_complex_math.h -------------------------------------------------------------------------------- /test/sample_32_ba_v1.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_32_ba_v1.pop -------------------------------------------------------------------------------- /test/sample_32_ba_v2.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_32_ba_v2.pop -------------------------------------------------------------------------------- /test/sample_32_la_v1.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_32_la_v1.pop -------------------------------------------------------------------------------- /test/sample_32_la_v2.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_32_la_v2.pop -------------------------------------------------------------------------------- /test/sample_32_mu_v1.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_32_mu_v1.pop -------------------------------------------------------------------------------- /test/sample_32_mu_v2.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_32_mu_v2.pop -------------------------------------------------------------------------------- /test/sample_32_std.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_32_std.pop -------------------------------------------------------------------------------- /test/sample_64_ba_v1.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_64_ba_v1.pop -------------------------------------------------------------------------------- /test/sample_64_ba_v2.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_64_ba_v2.pop -------------------------------------------------------------------------------- /test/sample_64_ba_v3.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_64_ba_v3.pop -------------------------------------------------------------------------------- /test/sample_64_la_v1.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_64_la_v1.pop -------------------------------------------------------------------------------- /test/sample_64_la_v2.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_64_la_v2.pop -------------------------------------------------------------------------------- /test/sample_64_mu_v1.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_64_mu_v1.pop -------------------------------------------------------------------------------- /test/sample_64_mu_v2.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_64_mu_v2.pop -------------------------------------------------------------------------------- /test/sample_64_std.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_64_std.pop -------------------------------------------------------------------------------- /doc/figures/chromType.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/figures/chromType.png -------------------------------------------------------------------------------- /doc/figures/operators.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/figures/operators.dia -------------------------------------------------------------------------------- /doc/figures/operators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/figures/operators.png -------------------------------------------------------------------------------- /test/sample_32_lin_v1.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_32_lin_v1.pop -------------------------------------------------------------------------------- /test/sample_32_lin_v2.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_32_lin_v2.pop -------------------------------------------------------------------------------- /test/sample_32_std_v1.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_32_std_v1.pop -------------------------------------------------------------------------------- /test/sample_32_std_v2.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_32_std_v2.pop -------------------------------------------------------------------------------- /test/sample_64_lin_v1.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_64_lin_v1.pop -------------------------------------------------------------------------------- /test/sample_64_lin_v2.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_64_lin_v2.pop -------------------------------------------------------------------------------- /test/sample_64_std_v1.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_64_std_v1.pop -------------------------------------------------------------------------------- /test/sample_64_std_v2.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_64_std_v2.pop -------------------------------------------------------------------------------- /test/sample_64_std_v3.pop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/test/sample_64_std_v3.pop -------------------------------------------------------------------------------- /doc/figures/MatingScheme.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/figures/MatingScheme.dia -------------------------------------------------------------------------------- /doc/figures/MatingScheme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/figures/MatingScheme.png -------------------------------------------------------------------------------- /docs/_static/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_static/ajax-loader.gif -------------------------------------------------------------------------------- /docs/_static/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_static/background.png -------------------------------------------------------------------------------- /docs/_static/down-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_static/down-pressed.png -------------------------------------------------------------------------------- /docs/_static/up-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_static/up-pressed.png -------------------------------------------------------------------------------- /docs/_static/comment-bright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_static/comment-bright.png -------------------------------------------------------------------------------- /docs/_static/comment-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_static/comment-close.png -------------------------------------------------------------------------------- /docs/src/static/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/src/static/background.png -------------------------------------------------------------------------------- /doc/figures/HomoMatingScheme.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/figures/HomoMatingScheme.dia -------------------------------------------------------------------------------- /doc/figures/HomoMatingScheme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/doc/figures/HomoMatingScheme.png -------------------------------------------------------------------------------- /docs/_build/.doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/index.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch1.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch1.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch2.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch2.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch3.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch3.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch4.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch4.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch1.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch1.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch2.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch2.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch3.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch3.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch4.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch4.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch5.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch5.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch6.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch6.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch7.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch7.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch8.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch8.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch2_sec1.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch2_sec1.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch2_sec2.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch2_sec2.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch2_sec3.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch2_sec3.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch2_sec4.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch2_sec4.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch2_sec5.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch2_sec5.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch2_sec6.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch2_sec6.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch3_sec1.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch3_sec1.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch3_sec10.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch3_sec10.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch3_sec11.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch3_sec11.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch3_sec12.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch3_sec12.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch3_sec13.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch3_sec13.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch3_sec14.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch3_sec14.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch3_sec15.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch3_sec15.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch3_sec2.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch3_sec2.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch3_sec3.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch3_sec3.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch3_sec4.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch3_sec4.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch3_sec5.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch3_sec5.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch3_sec6.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch3_sec6.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch3_sec7.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch3_sec7.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch3_sec8.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch3_sec8.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch3_sec9.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch3_sec9.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch4_sec1.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch4_sec1.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch4_sec2.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch4_sec2.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch4_sec3.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch4_sec3.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch4_sec4.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch4_sec4.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/refManual_ch4_sec5.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/refManual_ch4_sec5.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch2_sec1.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch2_sec1.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch2_sec2.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch2_sec2.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch2_sec3.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch2_sec3.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch2_sec4.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch2_sec4.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch2_sec5.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch2_sec5.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch2_sec6.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch2_sec6.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch3_sec1.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch3_sec1.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch3_sec2.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch3_sec2.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch3_sec3.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch3_sec3.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch3_sec4.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch3_sec4.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch3_sec5.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch3_sec5.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch4_sec1.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch4_sec1.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch4_sec2.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch4_sec2.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch4_sec3.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch4_sec3.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch5_sec1.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch5_sec1.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch5_sec10.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch5_sec10.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch5_sec11.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch5_sec11.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch5_sec12.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch5_sec12.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch5_sec13.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch5_sec13.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch5_sec14.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch5_sec14.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch5_sec2.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch5_sec2.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch5_sec3.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch5_sec3.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch5_sec4.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch5_sec4.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch5_sec5.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch5_sec5.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch5_sec6.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch5_sec6.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch5_sec7.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch5_sec7.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch5_sec8.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch5_sec8.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch5_sec9.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch5_sec9.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch6_sec1.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch6_sec1.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch6_sec2.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch6_sec2.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch6_sec3.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch6_sec3.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch6_sec4.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch6_sec4.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch6_sec5.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch6_sec5.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch6_sec6.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch6_sec6.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch6_sec7.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch6_sec7.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch6_sec8.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch6_sec8.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch7_sec1.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch7_sec1.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch7_sec2.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch7_sec2.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch7_sec3.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch7_sec3.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch7_sec4.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch7_sec4.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch7_sec5.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch7_sec5.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch8_sec1.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch8_sec1.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch8_sec2.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch8_sec2.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch8_sec3.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch8_sec3.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch8_sec4.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch8_sec4.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch8_sec5.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch8_sec5.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/userGuide_ch8_sec6.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoPeng/simuPOP/HEAD/docs/_build/.doctrees/userGuide_ch8_sec6.doctree -------------------------------------------------------------------------------- /docs/src/refManual.rst: -------------------------------------------------------------------------------- 1 | .. toctree:: 2 | 3 | refManual_ch1.rst 4 | refManual_ch2.rst 5 | refManual_ch3.rst 6 | refManual_ch4.rst 7 | -------------------------------------------------------------------------------- /docs/_sources/refManual.rst.txt: -------------------------------------------------------------------------------- 1 | .. toctree:: 2 | 3 | refManual_ch1.rst 4 | refManual_ch2.rst 5 | refManual_ch3.rst 6 | refManual_ch4.rst 7 | -------------------------------------------------------------------------------- /gsl/specfunc/check.h: -------------------------------------------------------------------------------- 1 | /* check for underflow */ 2 | 3 | #define CHECK_UNDERFLOW(r) if (fabs((r)->val) < GSL_DBL_MIN) GSL_ERROR("underflow", GSL_EUNDRFLW); 4 | -------------------------------------------------------------------------------- /docs/src/BernullitrialsTRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class BernullitrialsT 3 | --------------------- 4 | 5 | .. class:: BernullitrialsT 6 | 7 | FIXME: No document 8 | 9 | -------------------------------------------------------------------------------- /docs/src/elapsedTimeRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function elapsedTime 3 | -------------------- 4 | 5 | 6 | .. function:: elapsedTime(name) 7 | 8 | FIXME: No document 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPdvarsRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function dvars 3 | -------------- 4 | 5 | 6 | .. function:: dvars(self, *args, **kwargs) 7 | 8 | FIXME: No document 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPobjequalRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function objequal 3 | ----------------- 4 | 5 | 6 | .. function:: obj_equal(self, obj) 7 | 8 | FIXME: No document 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingisNumberRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function isNumber 3 | ----------------- 4 | 5 | 6 | .. function:: isNumber(obj) 7 | 8 | FIXME: No document 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilsRef.ref: -------------------------------------------------------------------------------- 1 | 2 | .. module:: simuPOP.utils 3 | 4 | This module provides some commonly used operators 5 | and format conversion utilities. 6 | -------------------------------------------------------------------------------- /docs/src/getRNGRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function getRNG 3 | --------------- 4 | 5 | 6 | .. function:: getRNG() 7 | 8 | return the currently used random number generator 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingisSequenceRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function isSequence 3 | ------------------- 4 | 5 | 6 | .. function:: isSequence(obj) 7 | 8 | FIXME: No document 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingrandomshuffleRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function randomshuffle 3 | ---------------------- 4 | 5 | 6 | .. function:: random_shuffle(x) 7 | 8 | FIXME: No document 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPdumpRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function dump 3 | ------------- 4 | 5 | 6 | .. function:: dump(pop, *args, **kwargs) 7 | 8 | Apply operator :class:`Dumper` to population *pop*. 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPindgetInfothreeRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function indgetInfothree 3 | ------------------------ 4 | 5 | 6 | .. function:: ind_getInfo3(self, field) 7 | 8 | FIXME: No document 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPindsetInfotwoRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function indsetInfotwo 3 | ---------------------- 4 | 5 | 6 | .. function:: ind_setInfo2(self, field, value) 7 | 8 | FIXME: No document 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPindsetInfothreeRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function indsetInfothree 3 | ------------------------ 4 | 5 | 6 | .. function:: ind_setInfo3(self, field, value) 7 | 8 | FIXME: No document 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPmigrateRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function migrate 3 | ---------------- 4 | 5 | 6 | .. function:: migrate(pop, *args, **kwargs) 7 | 8 | Function form of operator :class:`Migrator`. 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPpyMutateRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function pyMutate 3 | ----------------- 4 | 5 | 6 | .. function:: pyMutate(pop, *args, **kwargs) 7 | 8 | Function form of operator :class:`PyMutator` 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPinitSexRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function initSex 3 | ---------------- 4 | 5 | 6 | .. function:: initSex(pop, *args, **kwargs) 7 | 8 | Apply operator :class:`InitSex` to population *pop*. 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPpyExecRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function pyExec 3 | --------------- 4 | 5 | 6 | .. function:: pyExec(pop, *args, **kwargs) 7 | 8 | Execute *stmts* in population *pop*\ 's local namespace. 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPsnpMutateRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function snpMutate 3 | ------------------ 4 | 5 | 6 | .. function:: snpMutate(pop, *args, **kwargs) 7 | 8 | Function form of operator :class:`SNPMutator` 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPacgtMutateRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function acgtMutate 3 | ------------------- 4 | 5 | 6 | .. function:: acgtMutate(pop, *args, **kwargs) 7 | 8 | Function form of operator :class:`AcgtMutator` 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPinitInfoRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function initInfo 3 | ----------------- 4 | 5 | 6 | .. function:: initInfo(pop, *args, **kwargs) 7 | 8 | Apply operator :class:`InitInfo` to population *pop*. 9 | -------------------------------------------------------------------------------- /docs/src/index.rst: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | simuPOP Documentation contents 3 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4 | 5 | .. toctree:: 6 | 7 | userGuide.rst 8 | refManual.rst 9 | 10 | -------------------------------------------------------------------------------- /docs/src/simuPOPmixedMutateRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function mixedMutate 3 | -------------------- 4 | 5 | 6 | .. function:: mixedMutate(pop, *args, **kwargs) 7 | 8 | Function form of operator :class:`MixedMutator` 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPpointMutateRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function pointMutate 3 | -------------------- 4 | 5 | 6 | .. function:: pointMutate(pop, *args, **kwargs) 7 | 8 | Function form of operator :class:`PointMutator` 9 | -------------------------------------------------------------------------------- /docs/src/loadPopulationRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function loadPopulation 3 | ----------------------- 4 | 5 | 6 | .. function:: loadPopulation(file) 7 | 8 | load a population from a file saved by ``Population::save()``. 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPmatrixMutateRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function matrixMutate 3 | --------------------- 4 | 5 | 6 | .. function:: matrixMutate(pop, *args, **kwargs) 7 | 8 | Function form of operator :class:`MatrixMutator` 9 | -------------------------------------------------------------------------------- /doc/index.rst: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | simuPOP Documentation contents 3 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4 | 5 | .. toctree:: 6 | 7 | build/userGuide.rst 8 | build/refManual.rst 9 | 10 | -------------------------------------------------------------------------------- /docs/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | simuPOP Documentation contents 3 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4 | 5 | .. toctree:: 6 | 7 | userGuide.rst 8 | refManual.rst 9 | 10 | -------------------------------------------------------------------------------- /docs/src/simuPOPcontextMutateRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function contextMutate 3 | ---------------------- 4 | 5 | 6 | .. function:: contextMutate(pop, *args, **kwargs) 7 | 8 | Function form of operator :class:`ContextMutator` 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPinitLineageRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function initLineage 3 | -------------------- 4 | 5 | 6 | .. function:: initLineage(pop, *args, **kwargs) 7 | 8 | Apply operator :class:`InitLineage` to population *pop*. 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPkAlleleMutateRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function kAlleleMutate 3 | ---------------------- 4 | 5 | 6 | .. function:: kAlleleMutate(pop, *args, **kwargs) 7 | 8 | Function form of operator :class:`KAlleleMutator` 9 | -------------------------------------------------------------------------------- /docs/src/opListRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class opList 3 | ------------ 4 | 5 | .. class:: opList 6 | 7 | FIXME: No document 8 | 9 | 10 | .. method:: opList(obj=None) 11 | 12 | 13 | FIXME: No document 14 | 15 | -------------------------------------------------------------------------------- /docs/src/simuPOPinitGenotypeRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function initGenotype 3 | --------------------- 4 | 5 | 6 | .. function:: initGenotype(pop, *args, **kwargs) 7 | 8 | Apply operator :class:`InitGenotype` to population *pop*. 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPstepwiseMutateRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function stepwiseMutate 3 | ----------------------- 4 | 5 | 6 | .. function:: stepwiseMutate(pop, *args, **kwargs) 7 | 8 | Function form of operator :class:`StepwiseMutator` 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilsexportRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function export 3 | --------------- 4 | 5 | 6 | .. function:: export(pop, format, *args, **kwargs) 7 | 8 | Apply operator ``Exporter`` to population *pop* in format *format*. 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPbackwardMigrateRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function backwardMigrate 3 | ------------------------ 4 | 5 | 6 | .. function:: backwardMigrate(pop, *args, **kwargs) 7 | 8 | Function form of operator :class:`BackwardMigrator`. 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPrevertFixedSitesRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function revertFixedSites 3 | ------------------------- 4 | 5 | 6 | .. function:: revertFixedSites(pop, *args, **kwargs) 7 | 8 | Function form of operator :class:`RevertFixedSites` 9 | -------------------------------------------------------------------------------- /docs/src/floatListRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class floatList 3 | --------------- 4 | 5 | .. class:: floatList 6 | 7 | FIXME: No document 8 | 9 | 10 | .. method:: floatList(obj=None) 11 | 12 | 13 | FIXME: No document 14 | 15 | -------------------------------------------------------------------------------- /docs/src/intMatrixRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class intMatrix 3 | --------------- 4 | 5 | .. class:: intMatrix 6 | 7 | FIXME: No document 8 | 9 | 10 | .. method:: intMatrix(obj=None) 11 | 12 | 13 | FIXME: No document 14 | 15 | -------------------------------------------------------------------------------- /docs/src/uintStringRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class uintString 3 | ---------------- 4 | 5 | .. class:: uintString 6 | 7 | FIXME: No document 8 | 9 | 10 | .. method:: uintString(value) 11 | 12 | 13 | FIXME: No document 14 | 15 | -------------------------------------------------------------------------------- /docs/src/stringListRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class stringList 3 | ---------------- 4 | 5 | .. class:: stringList 6 | 7 | FIXME: No document 8 | 9 | 10 | .. method:: stringList(str=None) 11 | 12 | 13 | FIXME: No document 14 | 15 | -------------------------------------------------------------------------------- /docs/src/floatMatrixRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class floatMatrix 3 | ----------------- 4 | 5 | .. class:: floatMatrix 6 | 7 | FIXME: No document 8 | 9 | 10 | .. method:: floatMatrix(obj=None) 11 | 12 | 13 | FIXME: No document 14 | 15 | -------------------------------------------------------------------------------- /docs/src/floatListFuncRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class floatListFunc 3 | ------------------- 4 | 5 | .. class:: floatListFunc 6 | 7 | FIXME: No document 8 | 9 | 10 | .. method:: floatListFunc(func) 11 | 12 | 13 | FIXME: No document 14 | 15 | -------------------------------------------------------------------------------- /docs/src/stringMatrixRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class stringMatrix 3 | ------------------ 4 | 5 | .. class:: stringMatrix 6 | 7 | FIXME: No document 8 | 9 | 10 | .. method:: stringMatrix(str=None) 11 | 12 | 13 | FIXME: No document 14 | 15 | -------------------------------------------------------------------------------- /docs/src/uintListFuncRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class uintListFunc 3 | ------------------ 4 | 5 | .. class:: uintListFunc 6 | 7 | FIXME: No document 8 | 9 | 10 | .. method:: uintListFunc(values=[]) 11 | 12 | 13 | FIXME: No document 14 | 15 | -------------------------------------------------------------------------------- /docs/src/userGuide.rst: -------------------------------------------------------------------------------- 1 | .. toctree:: 2 | 3 | userGuide_ch1.rst 4 | userGuide_ch2.rst 5 | userGuide_ch3.rst 6 | userGuide_ch4.rst 7 | userGuide_ch5.rst 8 | userGuide_ch6.rst 9 | userGuide_ch7.rst 10 | userGuide_ch8.rst 11 | -------------------------------------------------------------------------------- /docs/src/IndexErrorRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class IndexError 3 | ---------------- 4 | 5 | .. class:: IndexError 6 | 7 | exception, thrown if index out of range 8 | 9 | 10 | .. method:: IndexError(msg) 11 | 12 | 13 | FIXME: No document 14 | 15 | -------------------------------------------------------------------------------- /docs/src/ValueErrorRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class ValueError 3 | ---------------- 4 | 5 | .. class:: ValueError 6 | 7 | exception, thrown if value of range etc 8 | 9 | 10 | .. method:: ValueError(msg) 11 | 12 | 13 | FIXME: No document 14 | 15 | -------------------------------------------------------------------------------- /docs/src/userGuide_ch4.rst: -------------------------------------------------------------------------------- 1 | *************************** 2 | Individuals and Populations 3 | *************************** 4 | 5 | 6 | 7 | .. toctree:: 8 | 9 | userGuide_ch4_sec1.rst 10 | userGuide_ch4_sec2.rst 11 | userGuide_ch4_sec3.rst 12 | -------------------------------------------------------------------------------- /docs/_sources/userGuide.rst.txt: -------------------------------------------------------------------------------- 1 | .. toctree:: 2 | 3 | userGuide_ch1.rst 4 | userGuide_ch2.rst 5 | userGuide_ch3.rst 6 | userGuide_ch4.rst 7 | userGuide_ch5.rst 8 | userGuide_ch6.rst 9 | userGuide_ch7.rst 10 | userGuide_ch8.rst 11 | -------------------------------------------------------------------------------- /docs/src/RevertEvolutionRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class RevertEvolution 3 | --------------------- 4 | 5 | .. class:: RevertEvolution 6 | 7 | FIXME: No document 8 | 9 | 10 | .. method:: RevertEvolution(msg) 11 | 12 | 13 | FIXME: No document 14 | 15 | -------------------------------------------------------------------------------- /docs/src/SystemErrorRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class SystemError 3 | ----------------- 4 | 5 | .. class:: SystemError 6 | 7 | exception, thrown if system error occurs 8 | 9 | 10 | .. method:: SystemError(msg) 11 | 12 | 13 | FIXME: No document 14 | 15 | -------------------------------------------------------------------------------- /docs/_sources/userGuide_ch4.rst.txt: -------------------------------------------------------------------------------- 1 | *************************** 2 | Individuals and Populations 3 | *************************** 4 | 5 | 6 | 7 | .. toctree:: 8 | 9 | userGuide_ch4_sec1.rst 10 | userGuide_ch4_sec2.rst 11 | userGuide_ch4_sec3.rst 12 | -------------------------------------------------------------------------------- /docs/src/StopIterationRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class StopIteration 3 | ------------------- 4 | 5 | .. class:: StopIteration 6 | 7 | exception, thrown if out of memory 8 | 9 | 10 | .. method:: StopIteration(msg) 11 | 12 | 13 | FIXME: No document 14 | 15 | -------------------------------------------------------------------------------- /docs/src/RuntimeErrorRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class RuntimeError 3 | ------------------ 4 | 5 | .. class:: RuntimeError 6 | 7 | exception, thrown if a runtime error occurs 8 | 9 | 10 | .. method:: RuntimeError(msg) 11 | 12 | 13 | FIXME: No document 14 | 15 | -------------------------------------------------------------------------------- /docs/src/refManual_ch4.rst: -------------------------------------------------------------------------------- 1 | *************** 2 | Utility Modules 3 | *************** 4 | 5 | 6 | 7 | .. toctree:: 8 | 9 | refManual_ch4_sec1.rst 10 | refManual_ch4_sec2.rst 11 | refManual_ch4_sec3.rst 12 | refManual_ch4_sec4.rst 13 | refManual_ch4_sec5.rst 14 | -------------------------------------------------------------------------------- /docs/src/simuPOPsetRNGRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function setRNG 3 | --------------- 4 | 5 | 6 | .. function:: setRNG(name='', seed=0) 7 | 8 | Set random number generator. This function is obsolete but is provided 9 | for compatibility purposes. Please use setOptions instead 10 | -------------------------------------------------------------------------------- /docs/_sources/refManual_ch4.rst.txt: -------------------------------------------------------------------------------- 1 | *************** 2 | Utility Modules 3 | *************** 4 | 5 | 6 | 7 | .. toctree:: 8 | 9 | refManual_ch4_sec1.rst 10 | refManual_ch4_sec2.rst 11 | refManual_ch4_sec3.rst 12 | refManual_ch4_sec4.rst 13 | refManual_ch4_sec5.rst 14 | -------------------------------------------------------------------------------- /docs/src/simuPOPdiscardIfRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function discardIf 3 | ------------------ 4 | 5 | 6 | .. function:: discardIf(pop, *args, **kwargs) 7 | 8 | Apply operator :class:`DiscardIf` to population *pop* to remove individuals according 9 | to an expression or a Python function. 10 | -------------------------------------------------------------------------------- /docs/src/StopEvolutionRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class StopEvolution 3 | ------------------- 4 | 5 | .. class:: StopEvolution 6 | 7 | exception, throw if an operator would like to stop all replicates. 8 | 9 | 10 | .. method:: StopEvolution(msg) 11 | 12 | 13 | FIXME: No document 14 | 15 | -------------------------------------------------------------------------------- /docs/src/simuPOPaspopulationRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function aspopulation 3 | --------------------- 4 | 5 | 6 | .. function:: as_population(self) 7 | 8 | Convert the existing pedigree object to a population. This function will 9 | behave like a regular population after this function call. 10 | -------------------------------------------------------------------------------- /docs/src/simuPOPinfoEvalRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function infoEval 3 | ----------------- 4 | 5 | 6 | .. function:: infoEval(pop, *args, **kwargs) 7 | 8 | Evaluate *expr* for each individual, using information fields as variables. 9 | Please refer to operator :class:`InfoEval` for details. 10 | -------------------------------------------------------------------------------- /docs/src/simuPOPinfoExecRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function infoExec 3 | ----------------- 4 | 5 | 6 | .. function:: infoExec(pop, *args, **kwargs) 7 | 8 | Execute *stmts* for each individual, using information fields as variables. 9 | Please refer to operator :class:`InfoExec` for details. 10 | -------------------------------------------------------------------------------- /docs/src/stringFuncRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class stringFunc 3 | ---------------- 4 | 5 | .. class:: stringFunc 6 | 7 | FIXME: No document 8 | 9 | 10 | .. method:: stringFunc(value) 11 | 12 | 13 | FIXME: No document 14 | 15 | 16 | .. method:: stringFunc.mode() 17 | 18 | COPY. 19 | -------------------------------------------------------------------------------- /docs/src/userGuide_ch2.rst: -------------------------------------------------------------------------------- 1 | ************ 2 | Introduction 3 | ************ 4 | 5 | 6 | 7 | .. toctree:: 8 | 9 | userGuide_ch2_sec1.rst 10 | userGuide_ch2_sec2.rst 11 | userGuide_ch2_sec3.rst 12 | userGuide_ch2_sec4.rst 13 | userGuide_ch2_sec5.rst 14 | userGuide_ch2_sec6.rst 15 | -------------------------------------------------------------------------------- /docs/_sources/userGuide_ch2.rst.txt: -------------------------------------------------------------------------------- 1 | ************ 2 | Introduction 3 | ************ 4 | 5 | 6 | 7 | .. toctree:: 8 | 9 | userGuide_ch2_sec1.rst 10 | userGuide_ch2_sec2.rst 11 | userGuide_ch2_sec3.rst 12 | userGuide_ch2_sec4.rst 13 | userGuide_ch2_sec5.rst 14 | userGuide_ch2_sec6.rst 15 | -------------------------------------------------------------------------------- /docs/src/turnOffDebugRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function turnOffDebug 3 | --------------------- 4 | 5 | 6 | .. function:: turnOffDebug(code="DBG_ALL") 7 | 8 | Turn off debug code *code*. More than one code could be specified 9 | using a comma separated string. Default to turn off all debug 10 | codes. 11 | -------------------------------------------------------------------------------- /docs/src/uintListRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class uintList 3 | -------------- 4 | 5 | .. class:: uintList 6 | 7 | FIXME: No document 8 | 9 | 10 | .. method:: uintList(obj=Py_True) 11 | 12 | 13 | FIXME: No document 14 | 15 | 16 | .. method:: uintList.unspecified() 17 | 18 | FIXME: No document 19 | -------------------------------------------------------------------------------- /docs/src/userGuide_ch3.rst: -------------------------------------------------------------------------------- 1 | *************************** 2 | Loading and running simuPOP 3 | *************************** 4 | 5 | 6 | 7 | .. toctree:: 8 | 9 | userGuide_ch3_sec1.rst 10 | userGuide_ch3_sec2.rst 11 | userGuide_ch3_sec3.rst 12 | userGuide_ch3_sec4.rst 13 | userGuide_ch3_sec5.rst 14 | -------------------------------------------------------------------------------- /docs/src/userGuide_ch7.rst: -------------------------------------------------------------------------------- 1 | .. _cha_Utility_Modules: 2 | 3 | *************** 4 | Utility Modules 5 | *************** 6 | 7 | 8 | 9 | .. toctree:: 10 | 11 | userGuide_ch7_sec1.rst 12 | userGuide_ch7_sec2.rst 13 | userGuide_ch7_sec3.rst 14 | userGuide_ch7_sec4.rst 15 | userGuide_ch7_sec5.rst 16 | -------------------------------------------------------------------------------- /docs/src/refManual_ch2.rst: -------------------------------------------------------------------------------- 1 | ****************** 2 | simuPOP Components 3 | ****************** 4 | 5 | 6 | 7 | .. toctree:: 8 | 9 | refManual_ch2_sec1.rst 10 | refManual_ch2_sec2.rst 11 | refManual_ch2_sec3.rst 12 | refManual_ch2_sec4.rst 13 | refManual_ch2_sec5.rst 14 | refManual_ch2_sec6.rst 15 | -------------------------------------------------------------------------------- /gsl/error.h: -------------------------------------------------------------------------------- 1 | /* CDF_ERROR: call the error handler, and return a NAN. */ 2 | 3 | #define CDF_ERROR(reason, gsl_errno) GSL_ERROR_VAL(reason, gsl_errno, GSL_NAN) 4 | // this is added for simuPOP compiling usage because scons can not 5 | // tell between gsl/error.h and gsl/specfunc/error.h 6 | #include 7 | 8 | -------------------------------------------------------------------------------- /docs/_sources/userGuide_ch3.rst.txt: -------------------------------------------------------------------------------- 1 | *************************** 2 | Loading and running simuPOP 3 | *************************** 4 | 5 | 6 | 7 | .. toctree:: 8 | 9 | userGuide_ch3_sec1.rst 10 | userGuide_ch3_sec2.rst 11 | userGuide_ch3_sec3.rst 12 | userGuide_ch3_sec4.rst 13 | userGuide_ch3_sec5.rst 14 | -------------------------------------------------------------------------------- /docs/_sources/userGuide_ch7.rst.txt: -------------------------------------------------------------------------------- 1 | .. _cha_Utility_Modules: 2 | 3 | *************** 4 | Utility Modules 5 | *************** 6 | 7 | 8 | 9 | .. toctree:: 10 | 11 | userGuide_ch7_sec1.rst 12 | userGuide_ch7_sec2.rst 13 | userGuide_ch7_sec3.rst 14 | userGuide_ch7_sec4.rst 15 | userGuide_ch7_sec5.rst 16 | -------------------------------------------------------------------------------- /docs/_sources/refManual_ch2.rst.txt: -------------------------------------------------------------------------------- 1 | ****************** 2 | simuPOP Components 3 | ****************** 4 | 5 | 6 | 7 | .. toctree:: 8 | 9 | refManual_ch2_sec1.rst 10 | refManual_ch2_sec2.rst 11 | refManual_ch2_sec3.rst 12 | refManual_ch2_sec4.rst 13 | refManual_ch2_sec5.rst 14 | refManual_ch2_sec6.rst 15 | -------------------------------------------------------------------------------- /docs/src/turnOnDebugRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function turnOnDebug 3 | -------------------- 4 | 5 | 6 | .. function:: turnOnDebug(code="") 7 | 8 | Set debug code *code*. More than one code could be specified using 9 | a comma separated string. Name of available codes are available 10 | from ``moduleInfo()['debug'].keys()``. 11 | -------------------------------------------------------------------------------- /development/conda/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | $PYTHON setup.py install --single-version-externally-managed --record=record.txt 4 | 5 | # Add more build steps here, if they are necessary. 6 | 7 | # See 8 | # http://docs.continuum.io/conda/build.html 9 | # for a list of environment variables that are set during the build process. 10 | -------------------------------------------------------------------------------- /development/conda/bld.bat: -------------------------------------------------------------------------------- 1 | "%PYTHON%" setup.py install --single-version-externally-managed --record=record.txt 2 | if errorlevel 1 exit 1 3 | 4 | :: Add more build steps here, if they are necessary. 5 | 6 | :: See 7 | :: http://docs.continuum.io/conda/build.html 8 | :: for a list of environment variables that are set during the build process. 9 | -------------------------------------------------------------------------------- /docs/src/simuPOPmergeSubPopsRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function mergeSubPops 3 | --------------------- 4 | 5 | 6 | .. function:: mergeSubPops(pop, *args, **kwargs) 7 | 8 | Merge subpopulations *subPops* of population *pop* into a single 9 | subpopulation. Please refer to the operator form of this funciton 10 | (:class:`MergeSubPops`) for details 11 | -------------------------------------------------------------------------------- /docs/src/simuPOPstatRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function stat 3 | ------------- 4 | 5 | 6 | .. function:: stat(pop, *args, **kwargs) 7 | 8 | Apply operator :class:`Stat` with specified parameters to population *pop*. 9 | Resulting statistics could be accessed from the local namespace of ``pop`` 10 | using functions ``pop.vars()`` or ``pop.dvars()`` 11 | -------------------------------------------------------------------------------- /docs/src/simuPOPaspedigreeRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function aspedigree 3 | ------------------- 4 | 5 | 6 | .. function:: as_pedigree(self, idField='ind_id', fatherField='father_id', motherField='mother_id') 7 | 8 | Convert the existing population object to a pedigree. After this function 9 | pedigree function should magically be usable for this function. 10 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilsMSImporterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class MSImporter 3 | ---------------- 4 | 5 | .. class:: MSImporter 6 | 7 | FIXME: No document 8 | 9 | .. method:: MSImporter.MSImporter(ploidy=1, mergeBy='subPop') 10 | 11 | Initialize self. See help(type(self)) for accurate signature. 12 | 13 | .. method:: MSImporter.importFrom(filename) 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '', 4 | LANGUAGE: 'None', 5 | COLLAPSE_INDEX: false, 6 | FILE_SUFFIX: '.html', 7 | HAS_SOURCE: true, 8 | SOURCELINK_SUFFIX: '.txt', 9 | NAVIGATION_WITH_KEYS: false, 10 | }; -------------------------------------------------------------------------------- /docs/src/simuPOPutilsFStatImporterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class FStatImporter 3 | ------------------- 4 | 5 | .. class:: FStatImporter 6 | 7 | FIXME: No document 8 | 9 | .. method:: FStatImporter.FStatImporter(adjust=0) 10 | 11 | Initialize self. See help(type(self)) for accurate signature. 12 | 13 | .. method:: FStatImporter.importFrom(filename) 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/src/intListRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class intList 3 | ------------- 4 | 5 | .. class:: intList 6 | 7 | A class to specify replicate list. The reason why I cannot simple 8 | use vectori() is that users have got used to use a single number 9 | to specify a single replicate. 10 | 11 | 12 | .. method:: intList(obj=None) 13 | 14 | 15 | FIXME: No document 16 | 17 | -------------------------------------------------------------------------------- /docs/src/ExceptionRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class Exception 3 | --------------- 4 | 5 | .. class:: Exception 6 | 7 | exception handler. Exceptions will be passed to Python. 8 | 9 | 10 | .. method:: Exception(msg) 11 | 12 | 13 | constructor 14 | 15 | msg 16 | error message 17 | 18 | 19 | .. method:: Exception.message() 20 | 21 | return error message 22 | -------------------------------------------------------------------------------- /docs/src/lociListRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class lociList 3 | -------------- 4 | 5 | .. class:: lociList 6 | 7 | FIXME: No document 8 | 9 | 10 | .. method:: lociList(obj=Py_True) 11 | 12 | 13 | FIXME: No document 14 | 15 | 16 | .. method:: lociList.dynamic() 17 | 18 | FIXME: No document 19 | 20 | .. method:: lociList.empty() 21 | 22 | FIXME: No document 23 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilsGenePopImporterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class GenePopImporter 3 | --------------------- 4 | 5 | .. class:: GenePopImporter 6 | 7 | FIXME: No document 8 | 9 | .. method:: GenePopImporter.GenePopImporter(adjust=0) 10 | 11 | Initialize self. See help(type(self)) for accurate signature. 12 | 13 | .. method:: GenePopImporter.importFrom(filename) 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/src/userGuide_ch6.rst: -------------------------------------------------------------------------------- 1 | ******************** 2 | Evolving populations 3 | ******************** 4 | 5 | 6 | 7 | .. toctree:: 8 | 9 | userGuide_ch6_sec1.rst 10 | userGuide_ch6_sec2.rst 11 | userGuide_ch6_sec3.rst 12 | userGuide_ch6_sec4.rst 13 | userGuide_ch6_sec5.rst 14 | userGuide_ch6_sec6.rst 15 | userGuide_ch6_sec7.rst 16 | userGuide_ch6_sec8.rst 17 | -------------------------------------------------------------------------------- /docs/_sources/userGuide_ch6.rst.txt: -------------------------------------------------------------------------------- 1 | ******************** 2 | Evolving populations 3 | ******************** 4 | 5 | 6 | 7 | .. toctree:: 8 | 9 | userGuide_ch6_sec1.rst 10 | userGuide_ch6_sec2.rst 11 | userGuide_ch6_sec3.rst 12 | userGuide_ch6_sec4.rst 13 | userGuide_ch6_sec5.rst 14 | userGuide_ch6_sec6.rst 15 | userGuide_ch6_sec7.rst 16 | userGuide_ch6_sec8.rst 17 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilsPhylipImporterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class PhylipImporter 3 | -------------------- 4 | 5 | .. class:: PhylipImporter 6 | 7 | FIXME: No document 8 | 9 | .. method:: PhylipImporter.PhylipImporter(alleleNames, ploidy=1) 10 | 11 | Initialize self. See help(type(self)) for accurate signature. 12 | 13 | .. method:: PhylipImporter.importFrom(filename) 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilsmigrIslandRatesRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function migrIslandRates 3 | ------------------------ 4 | 5 | 6 | .. function:: migrIslandRates(r, n) 7 | 8 | migration rate matrix 9 | 10 | :: 11 | 12 | x m/(n-1) m/(n-1) .... 13 | m/(n-1) x ............ 14 | ..... 15 | .... m/(n-1) m/(n-1) x 16 | 17 | where x = 1-m 18 | -------------------------------------------------------------------------------- /docs/src/simuPOPresizeSubPopsRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function resizeSubPops 3 | ---------------------- 4 | 5 | 6 | .. function:: resizeSubPops(pop, *args, **kwargs) 7 | 8 | Resize subpopulations *subPops* of population *pop* into new sizes 9 | *size*. Individuals will be added or removed accordingly. Please refer to 10 | the operator form of this funciton (:class:`ResizeSubPops`) for details 11 | -------------------------------------------------------------------------------- /docs/src/simuPOPmlPenetranceRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function mlPenetrance 3 | --------------------- 4 | 5 | 6 | .. function:: mlPenetrance(pop, ops, mode, ancGens=True, *args, **kwargs) 7 | 8 | Apply opertor :class:`MapPenetrance` to population *pop*. Unlike the 9 | operator form of this operator that only handles the current generation, 10 | this function by default assign affection status to all generations. 11 | -------------------------------------------------------------------------------- /docs/src/simuPOPpyQuanTraitRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function pyQuanTrait 3 | -------------------- 4 | 5 | 6 | .. function:: pyQuanTrait(pop, func, loci=[], ancGens=True, *args, **kwargs) 7 | 8 | Apply opertor :class:`PyQuanTrait` to population *pop*. Unlike the 9 | operator form of this operator that only handles the current generation, 10 | this function by default assign affection status to all generations. 11 | -------------------------------------------------------------------------------- /docs/src/simuPOPpyPenetranceRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function pyPenetrance 3 | --------------------- 4 | 5 | 6 | .. function:: pyPenetrance(pop, func, loci=[], ancGens=True, *args, **kwargs) 7 | 8 | Apply opertor :class:`PyPenetrance` to population *pop*. Unlike the 9 | operator form of this operator that only handles the current generation, 10 | this function by default assign affection status to all generations. 11 | -------------------------------------------------------------------------------- /docs/src/vspIDRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class vspID 3 | ----------- 4 | 5 | .. class:: vspID 6 | 7 | A class to specify virtual subpopulation, which is composed of a 8 | subpopulation ID and a virtual subpopulation ID. 9 | 10 | 11 | .. method:: vspID(id) 12 | 13 | 14 | Create a subpopulation id. Accept id as well as names. 15 | 16 | 17 | .. method:: vspID.resolve(pop) 18 | 19 | FIXME: No document 20 | -------------------------------------------------------------------------------- /docs/src/simuPOPsplitSubPopsRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function splitSubPops 3 | --------------------- 4 | 5 | 6 | .. function:: splitSubPops(pop, *args, **kwargs) 7 | 8 | Split subpopulations (*subPops*) of population *pop* according to either 9 | *sizes* or *proportions* of the resulting subpopulations, or an information 10 | field. Please refer to the operator form of this function (``splitSubPop``) 11 | for details. 12 | -------------------------------------------------------------------------------- /docs/src/simuPOPmapPenetranceRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function mapPenetrance 3 | ---------------------- 4 | 5 | 6 | .. function:: mapPenetrance(pop, loci, penetrance, ancGens=True, *args, **kwargs) 7 | 8 | Apply opertor :class:`MapPenetrance` to population *pop*. Unlike the 9 | operator form of this operator that only handles the current generation, 10 | this function by default assign affection status to all generations. 11 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingdrawRandomSamplesRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function drawRandomSamples 3 | -------------------------- 4 | 5 | 6 | .. function:: drawRandomSamples(pop, sizes, numOfSamples=1, subPops=ALL_AVAIL) 7 | 8 | Draw ``numOfSamples`` random samples from a population and return a list of 9 | populations. Please refer to function ``drawRandomSample`` for more details 10 | about parameters ``sizes`` and ``subPops``. 11 | -------------------------------------------------------------------------------- /docs/src/simuPOPmaPenetranceRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function maPenetrance 3 | --------------------- 4 | 5 | 6 | .. function:: maPenetrance(pop, loci, penetrance, wildtype=0, ancGens=True, *args, **kwargs) 7 | 8 | Apply opertor :class:`MaPenetrance` to population *pop*. Unlike the 9 | operator form of this operator that only handles the current generation, 10 | this function by default assign affection status to all generations. 11 | -------------------------------------------------------------------------------- /docs/src/simuPOPpyMlPenetranceRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function pyMlPenetrance 3 | ----------------------- 4 | 5 | 6 | .. function:: pyMlPenetrance(pop, func, mode, loci=[], ancGens=True, *args, **kwargs) 7 | 8 | Apply opertor :class:`PyMlPenetrance` to population *pop*. Unlike the 9 | operator form of this operator that only handles the current generation, 10 | this function by default assign affection status to all generations. 11 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingdrawCombinedSamplesRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function drawCombinedSamples 3 | ---------------------------- 4 | 5 | 6 | .. function:: drawCombinedSamples(pop, samplers, numOfSamples=1, idField='ind_id') 7 | 8 | Draw combined samples ``numOfSamples`` numOfSamples and return a list of populations. 9 | Please refer to function ``drawCombinedSample`` for details about 10 | parameters ``samplers`` and ``idField``. 11 | -------------------------------------------------------------------------------- /docs/src/NoneOpRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class NoneOp 3 | ------------ 4 | 5 | .. class:: NoneOp 6 | 7 | This operator does nothing when it is applied to a population. It 8 | is usually used as a placeholder when an operator is needed 9 | syntactically. 10 | 11 | 12 | .. method:: NoneOp(output=">", begin=0, end=0, step=1, at=[], reps=ALL_AVAIL, subPops=ALL_AVAIL, infoFields=[]) 13 | 14 | 15 | Create a :class:`NoneOp`. 16 | 17 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilsMSExporterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class MSExporter 3 | ---------------- 4 | 5 | .. class:: MSExporter 6 | 7 | An exporter to export given population in MS format 8 | 9 | .. method:: MSExporter.MSExporter(splitBy=None) 10 | 11 | Initialize self. See help(type(self)) for accurate signature. 12 | 13 | .. method:: MSExporter.export(pop, output, subPops, infoFields, gui) 14 | 15 | Export in MS format 16 | 17 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilsMapExporterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class MapExporter 3 | ----------------- 4 | 5 | .. class:: MapExporter 6 | 7 | An exporter to export loci information in MAP format 8 | 9 | .. method:: MapExporter.MapExporter(posMultiplier=1) 10 | 11 | Initialize self. See help(type(self)) for accurate signature. 12 | 13 | .. method:: MapExporter.export(pop, output, subPops, infoFields, gui) 14 | 15 | Export in MAP format 16 | 17 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilsFStatExporterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class FStatExporter 3 | ------------------- 4 | 5 | .. class:: FStatExporter 6 | 7 | An exporter to export given population in fstat format 8 | 9 | .. method:: FStatExporter.FStatExporter(lociNames=None, adjust=1) 10 | 11 | Initialize self. See help(type(self)) for accurate signature. 12 | 13 | .. method:: FStatExporter.export(pop, output, subPops, infoFields, gui) 14 | 15 | Export in FSTAT format 16 | 17 | -------------------------------------------------------------------------------- /docs/src/simuPOPtagIDRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function tagID 3 | -------------- 4 | 5 | 6 | .. function:: tagID(pop, reset=False, *args, **kwargs) 7 | 8 | Apply operator :class:`IdTagger` to population *pop* to assign a unique ID 9 | to all individuals in the population. Individuals ID will starts from a 10 | system wide index. You can reset this start ID using parameter ``reset`` 11 | which can be ``True`` (reset to 1) or a non-negative number (start from 12 | this number). 13 | -------------------------------------------------------------------------------- /gsl/cdf/rat_eval.h: -------------------------------------------------------------------------------- 1 | static double 2 | rat_eval (const double a[], const size_t na, 3 | const double b[], const size_t nb, const double x) 4 | { 5 | size_t i, j; 6 | double u, v, r; 7 | 8 | u = a[na - 1]; 9 | 10 | for (i = na - 1; i > 0; i--) 11 | { 12 | u = x * u + a[i - 1]; 13 | } 14 | 15 | v = b[nb - 1]; 16 | 17 | for (j = nb - 1; j > 0; j--) 18 | { 19 | v = x * v + b[j - 1]; 20 | } 21 | 22 | r = u / v; 23 | 24 | return r; 25 | } 26 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilsGenePopExporterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class GenePopExporter 3 | --------------------- 4 | 5 | .. class:: GenePopExporter 6 | 7 | An exporter to export given population in structure format 8 | 9 | .. method:: GenePopExporter.GenePopExporter(title=None, adjust=1) 10 | 11 | Initialize self. See help(type(self)) for accurate signature. 12 | 13 | .. method:: GenePopExporter.export(pop, output, subPops, infoFields, gui) 14 | 15 | Export in genepop format 16 | 17 | -------------------------------------------------------------------------------- /gsl/specfunc/eval.h: -------------------------------------------------------------------------------- 1 | /* evaluate a function discarding the status value in a modifiable way */ 2 | 3 | #define EVAL_RESULT(fn) \ 4 | gsl_sf_result result; \ 5 | int status = fn; \ 6 | if (status != GSL_SUCCESS) { \ 7 | GSL_ERROR_VAL(#fn, status, result.val); \ 8 | } ; \ 9 | return result.val; 10 | 11 | #define EVAL_DOUBLE(fn) \ 12 | int status = fn; \ 13 | if (status != GSL_SUCCESS) { \ 14 | GSL_ERROR_VAL(#fn, status, result); \ 15 | } ; \ 16 | return result; 17 | 18 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilsPhylipExporterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class PhylipExporter 3 | -------------------- 4 | 5 | .. class:: PhylipExporter 6 | 7 | An exporter to export sequence data in Phylip format 8 | 9 | .. method:: PhylipExporter.PhylipExporter(alleleNames=None, seqNames=None, style='sequential') 10 | 11 | Initialize self. See help(type(self)) for accurate signature. 12 | 13 | .. method:: PhylipExporter.export(pop, output, subPops, infoFields, gui) 14 | 15 | Export in Phylip format 16 | 17 | -------------------------------------------------------------------------------- /docs/src/pyPopIteratorRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class pyPopIterator 3 | ------------------- 4 | 5 | .. class:: pyPopIterator 6 | 7 | This class implements a Python itertor class that can be used to 8 | iterate through populations in a population. 9 | 10 | 11 | .. method:: pyPopIterator(begin, end) 12 | 13 | 14 | FIXME: No document 15 | 16 | 17 | .. method:: pyPopIterator.__iter__() 18 | 19 | FIXME: No document 20 | 21 | .. method:: pyPopIterator.next() 22 | 23 | FIXME: No document 24 | -------------------------------------------------------------------------------- /docs/src/simuPOPdefdictRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class defdict 3 | ------------- 4 | 5 | .. class:: defdict 6 | 7 | defdict() --> dict with default value 8 | 9 | The default value is returned when an invalid key is used. 10 | 11 | .. method:: defdict.defdict(*args, **kwargs) 12 | 13 | Initialize self. See help(type(self)) for accurate signature. 14 | 15 | .. method:: defdict.fromkeys(type, iterable, value) 16 | 17 | Returns a new dict with keys from iterable and values equal to value. 18 | 19 | -------------------------------------------------------------------------------- /docs/src/describeEvolProcessRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function describeEvolProcess 3 | ---------------------------- 4 | 5 | 6 | .. function:: describeEvolProcess(initOps=[], preOps=[], matingScheme=MatingScheme, postOps=[], finalOps=[], gen=-1, numRep=1) 7 | 8 | This function takes the same parameters as :meth:`Simulator.evolve` 9 | and output a description of how an evolutionary process will be 10 | executed. It is recommended that you call this function if you have 11 | any doubt how your simulation will proceed. 12 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingdrawCaseControlSamplesRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function drawCaseControlSamples 3 | ------------------------------- 4 | 5 | 6 | .. function:: drawCaseControlSamples(pop, cases, controls, numOfSamples=1, subPops=ALL_AVAIL) 7 | 8 | Draw ``numOfSamples`` case-control samples from a population with ``cases`` 9 | affected and ``controls`` unaffected individuals and return a list of 10 | populations. Please refer to function ``drawCaseControlSample`` for a 11 | detailed descriptions of parameters. 12 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilsPEDExporterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class PEDExporter 3 | ----------------- 4 | 5 | .. class:: PEDExporter 6 | 7 | An exporter to export given population in PED format 8 | 9 | .. method:: PEDExporter.PEDExporter(idField='ind_id', fatherField='father_id', motherField='mother_id', phenoField=None, adjust=1) 10 | 11 | Initialize self. See help(type(self)) for accurate signature. 12 | 13 | .. method:: PEDExporter.export(pop, output, subPops, infoFields, gui) 14 | 15 | Export in PED format 16 | 17 | -------------------------------------------------------------------------------- /development/release.sos: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sos-runner 2 | #fileformat=SOS1.0 3 | 4 | [doxygen] 5 | depends: executable('doxygen') 6 | run: workdir='..' 7 | doxygen 8 | 9 | [src-doc] 10 | depends: executable('doxygen') 11 | run: workdir='..' 12 | doxygen Doxy_doc 13 | 14 | [swig] 15 | depends: sos_step('doxygen'), executable('lyx'), executable('pdflatex') 16 | run: workdir='..' 17 | python development/doxy2swig.py 18 | 19 | [examples] 20 | depends: Py_Module('simuPOP') 21 | run: workdir='../doc' 22 | python runSampleCode.py 23 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingdrawAffectedSibpairSamplesRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function drawAffectedSibpairSamples 3 | ----------------------------------- 4 | 5 | 6 | .. function:: drawAffectedSibpairSamples(pop, families, numOfSamples=1, subPops=ALL_AVAIL, idField='ind_id', fatherField='father_id', motherField='mother_id') 7 | 8 | Draw ``numOfSamples`` affected sibpair samplesa from population ``pop`` and 9 | return a list of populations. Please refer to function 10 | ``drawAffectedSibpairSample`` for a description of other parameters. 11 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingdrawCombinedSampleRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function drawCombinedSample 3 | --------------------------- 4 | 5 | 6 | .. function:: drawCombinedSample(pop, samplers, idField='ind_id') 7 | 8 | Draw different types of samples using a list of ``samplers``. A 9 | Population consists of all individuals from these samples will 10 | be returned. An ``idField`` that stores an unique ID for all individuals 11 | is needed to remove duplicated individuals who are drawn multiple 12 | numOfSamples from these samplers. 13 | -------------------------------------------------------------------------------- /docs/src/simuPOPdemographymigrtwoDSteppingStoneRatesRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function migrtwoDSteppingStoneRates 3 | ----------------------------------- 4 | 5 | 6 | .. function:: migr2DSteppingStoneRates(r, m, n, diagonal=False, circular=False) 7 | 8 | migration rate matrix for 2D stepping stone model, with or without 9 | diagonal neighbors (4 or 8 neighbors for central patches). The boundaries 10 | are connected if circular is True. Otherwise individuals from corner and 11 | bounary patches will migrate to their neighbors with higher probability. 12 | -------------------------------------------------------------------------------- /docs/src/simuPOPpyEvalRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function pyEval 3 | --------------- 4 | 5 | 6 | .. function:: pyEval(pop, *args, **kwargs) 7 | 8 | Evaluate statements *stmts* (optional) and expression *expr* in 9 | population *pop*\ 's local namespace and return the result of *expr*. 10 | If *exposePop* is given, population *pop* will be exposed in its local 11 | namespace as a variable with a name specified by *exposePop*. Unlike its 12 | operator counterpart, this function returns the result of *expr* rather 13 | than writting it to an output. 14 | -------------------------------------------------------------------------------- /docs/src/simuPOPWithArgsRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class WithArgs 3 | -------------- 4 | 5 | .. class:: WithArgs 6 | 7 | This class wraps around a user-provided function and provides an 8 | attribute ``args`` so that simuPOP knows which parameters to send to the 9 | function. This is only needed if the function can not be defined with 10 | allowed parameters. 11 | 12 | .. method:: WithArgs.WithArgs(func, args) 13 | 14 | Return a callable object that wraps around function ``func``. 15 | Parameter ``args`` should be a list of parameter names. 16 | 17 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingdrawNuclearFamilySamplesRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function drawNuclearFamilySamples 3 | --------------------------------- 4 | 5 | 6 | .. function:: drawNuclearFamilySamples(pop, families, numOffspring, affectedParents=0, affectedOffspring=0, numOfSamples=1, subPops=ALL_AVAIL, idField='ind_id', fatherField='father_id', motherField='mother_id') 7 | 8 | Draw ``numOfSamples`` affected sibpair samplesa from population ``pop`` and 9 | return a list of populations. Please refer to function 10 | ``drawNuclearFamilySample`` for a description of other parameters. 11 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingdrawThreeGenFamilySamplesRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function drawThreeGenFamilySamples 3 | ---------------------------------- 4 | 5 | 6 | .. function:: drawThreeGenFamilySamples(pop, families, numOffspring, pedSize, numOfAffected=0, numOfSamples=1, subPops=ALL_AVAIL, idField='ind_id', fatherField='father_id', motherField='mother_id') 7 | 8 | Draw ``numOfSamples`` three-generation pedigree samples from population ``pop`` 9 | and return a list of populations. Please refer to function 10 | ``drawThreeGenFamilySample`` for a description of other parameters. 11 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | #- "3.3" test stops at installing spyder notebook etc 4 | - "3.4" 5 | - "3.5" 6 | - "3.6" 7 | 8 | before_install: 9 | - sudo apt-get install swig zlibc zlib1g zlib1g-dev libboost-dev libboost-iostreams-dev libboost-regex-dev libboost-serialization-dev 10 | install: "python setup.py install" 11 | before_script: cd test 12 | script: 13 | - python run_tests.py 14 | notifications: 15 | email: 16 | recipients: 17 | - ben.bob@gmail.com 18 | on_success: never 19 | on_failure: always 20 | -------------------------------------------------------------------------------- /gsl/gsl_version.h: -------------------------------------------------------------------------------- 1 | #ifndef __GSL_VERSION_H__ 2 | #define __GSL_VERSION_H__ 3 | 4 | #include 5 | 6 | #undef __BEGIN_DECLS 7 | #undef __END_DECLS 8 | #ifdef __cplusplus 9 | # define __BEGIN_DECLS extern "C" { 10 | # define __END_DECLS } 11 | #else 12 | # define __BEGIN_DECLS /* empty */ 13 | # define __END_DECLS /* empty */ 14 | #endif 15 | __BEGIN_DECLS 16 | 17 | 18 | #define GSL_VERSION "1.15" 19 | #define GSL_MAJOR_VERSION 1 20 | #define GSL_MINOR_VERSION 15 21 | 22 | GSL_VAR const char * gsl_version; 23 | 24 | __END_DECLS 25 | 26 | #endif /* __GSL_VERSION_H__ */ 27 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for processing simuPOP 3 | # 4 | 5 | 6 | rebuild: 7 | bcpp src/*.h src/*.cpp 8 | doxygen 9 | tools/doxy2swig.py 10 | scons install -j4 std 11 | tools/doxy2swig.py 12 | scons install -j4 13 | cd doc; python runSampleCode.py; make dist_svn 14 | 15 | rebuild3: 16 | python3 setup.py install 17 | 18 | clean: 19 | @rm -rf build 20 | @rm -f src/*wrap* src/simuPOP_*.py 21 | @find . -name '*~' -exec rm -f {} \; 22 | @find . -name '*.bak' -exec rm -f {} \; 23 | @find . -name '*.py?' -exec rm -f {} \; 24 | @rm -f MANIFEST doc/*.aux doc/*.log doc/*.idx 25 | 26 | -------------------------------------------------------------------------------- /docs/src/refManual_ch3.rst: -------------------------------------------------------------------------------- 1 | ******************* 2 | Operator References 3 | ******************* 4 | 5 | 6 | 7 | .. toctree:: 8 | 9 | refManual_ch3_sec1.rst 10 | refManual_ch3_sec2.rst 11 | refManual_ch3_sec3.rst 12 | refManual_ch3_sec4.rst 13 | refManual_ch3_sec5.rst 14 | refManual_ch3_sec6.rst 15 | refManual_ch3_sec7.rst 16 | refManual_ch3_sec8.rst 17 | refManual_ch3_sec9.rst 18 | refManual_ch3_sec10.rst 19 | refManual_ch3_sec11.rst 20 | refManual_ch3_sec12.rst 21 | refManual_ch3_sec13.rst 22 | refManual_ch3_sec14.rst 23 | refManual_ch3_sec15.rst 24 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilsCSVExporterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class CSVExporter 3 | ----------------- 4 | 5 | .. class:: CSVExporter 6 | 7 | An exporter to export given population in csv format 8 | 9 | .. method:: CSVExporter.CSVExporter(header=True, genoFormatter=None, infoFormatter=None, sexFormatter={1: 'M', 2: 'F'}, affectionFormatter={True: 'A', False: 'U'}, delimiter=',', subPopFormatter=None) 10 | 11 | Initialize self. See help(type(self)) for accurate signature. 12 | 13 | .. method:: CSVExporter.export(pop, output, subPops, infoFields, gui) 14 | 15 | Export in CSV format 16 | 17 | -------------------------------------------------------------------------------- /docs/src/subPopListRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class subPopList 3 | ---------------- 4 | 5 | .. class:: subPopList 6 | 7 | A class to specify (virtual) subpopulation list. Using a dedicated 8 | class allows users to specify a single subpopulation, or a list of 9 | (virutal) subpoulations easily. 10 | 11 | 12 | .. method:: subPopList(obj=None) 13 | 14 | 15 | FIXME: No document 16 | 17 | 18 | .. method:: subPopList.expandFrom(pop) 19 | 20 | expand ALL_AVAIL and [(ALL_AVAIL, vsp), ...] according to pop 21 | 22 | .. method:: subPopList.__len__() 23 | 24 | FIXME: No document 25 | -------------------------------------------------------------------------------- /docs/_sources/refManual_ch3.rst.txt: -------------------------------------------------------------------------------- 1 | ******************* 2 | Operator References 3 | ******************* 4 | 5 | 6 | 7 | .. toctree:: 8 | 9 | refManual_ch3_sec1.rst 10 | refManual_ch3_sec2.rst 11 | refManual_ch3_sec3.rst 12 | refManual_ch3_sec4.rst 13 | refManual_ch3_sec5.rst 14 | refManual_ch3_sec6.rst 15 | refManual_ch3_sec7.rst 16 | refManual_ch3_sec8.rst 17 | refManual_ch3_sec9.rst 18 | refManual_ch3_sec10.rst 19 | refManual_ch3_sec11.rst 20 | refManual_ch3_sec12.rst 21 | refManual_ch3_sec13.rst 22 | refManual_ch3_sec14.rst 23 | refManual_ch3_sec15.rst 24 | -------------------------------------------------------------------------------- /docs/src/setOptionsRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function setOptions 3 | ------------------- 4 | 5 | 6 | .. function:: setOptions(numThreads=-1, name=None, seed=0) 7 | 8 | First argument is to set number of thread in openMP. The number of 9 | threads can be be positive, integer (number of threads) or 0, which 10 | implies all available cores, or a number set by environmental 11 | variable ``OMP_NUM_THREADS``. Second and third argument is to set 12 | the type or seed of existing random number generator using 13 | RNG*name* with *seed*. If using openMP, it sets the type or seed of 14 | random number generator of each thread. 15 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilsStructureExporterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class StructureExporter 3 | ----------------------- 4 | 5 | .. class:: StructureExporter 6 | 7 | An exporter to export given population in structure format 8 | 9 | .. method:: StructureExporter.StructureExporter(markerNames=True, recessiveAlleles=None, interMarkerDistances=True, phaseInformation=None, label=True, popData=True, popFlag=None, locData=None, phenotype=None) 10 | 11 | Initialize self. See help(type(self)) for accurate signature. 12 | 13 | .. method:: StructureExporter.export(pop, output, subPops, infoFields, gui) 14 | 15 | export in structure format 16 | 17 | -------------------------------------------------------------------------------- /docs/src/simuPOPdemographyMergeEventRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class MergeEvent 3 | ---------------- 4 | 5 | .. class:: MergeEvent 6 | 7 | A demographic event that merges one or more subpopulation to 8 | a single one. 9 | 10 | .. method:: MergeEvent.MergeEvent(name='', ops=[], output='', begin=0, end=-1, step=1, at=[], reps=True, subPops=ALL_AVAIL, infoFields=[]) 11 | 12 | A demographic event that merges subpopulations into a single subpopulation. 13 | The merged subpopulation will have the name of the first merged subpopulation 14 | unless a separate ``name`` is supported. 15 | 16 | .. method:: MergeEvent.apply(pop) 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/src/simuPOPSNPMutatorRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class SNPMutator 3 | ---------------- 4 | 5 | .. class:: SNPMutator 6 | 7 | A mutator model that assumes two alleles 0 and 1 and accepts mutation 8 | rate from 0 to 1, and from 1 to 0 alleles. 9 | 10 | .. method:: SNPMutator.SNPMutator(u=0, v=0, loci=True, mapIn=[], mapOut=[], output='', begin=0, end=-1, step=1, at=[], reps=True, subPops=ALL_AVAIL, infoFields=['ind_id'], lineageMode=115) 11 | 12 | Return a :class:`MatrixMutator` with proper mutate matrix for a two-allele 13 | mutation model using mutation rate from allele 0 to 1 (parameter ``u``) 14 | and from 1 to 0 (parameter ``v``) 15 | 16 | -------------------------------------------------------------------------------- /doc/pypaper.sty: -------------------------------------------------------------------------------- 1 | % 2 | % Change this to say a4paper instead of letterpaper if you want A4. These 3 | % are the latex defaults. 4 | % 5 | \newcommand{\py@paper}{letterpaper} 6 | \newcommand{\py@ptsize}{10pt} 7 | 8 | % These set up the fonts for the documents. 9 | % 10 | % The "times" package makes the default font the PostScript Times 11 | % font, which makes for smaller PostScript and a font that more people 12 | % like. 13 | % 14 | % The "avant" package causes the AvantGarde font to be used for 15 | % sans-serif text, instead of the uglier Helvetica set up by the "times" 16 | % package. 17 | % 18 | \RequirePackage{times}\typeout{Using Times instead of Computer Modern.} 19 | -------------------------------------------------------------------------------- /doc/tools/indexsidebar.html: -------------------------------------------------------------------------------- 1 |

Resources

2 | 11 | -------------------------------------------------------------------------------- /docs/_static/indexsidebar.html: -------------------------------------------------------------------------------- 1 |

Resources

2 | 11 | -------------------------------------------------------------------------------- /docs/src/PyOutputRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class PyOutput 3 | -------------- 4 | 5 | .. class:: PyOutput 6 | 7 | This operator outputs a given string when it is applied to a 8 | population. 9 | 10 | 11 | .. method:: PyOutput(msg="", output=">", begin=0, end=-1, step=1, at=[], reps=ALL_AVAIL, subPops=ALL_AVAIL, infoFields=[]) 12 | 13 | 14 | Creates a :class:`PyOutput` operator that outputs a string *msg* 15 | to *output* (default to standard terminal output) when it is 16 | applied to a population. Please refer to class 17 | :class:`BaseOperator` for a detailed description of common 18 | operator parameters such as *stage*, *begin* and *output*. 19 | 20 | -------------------------------------------------------------------------------- /docs/src/static/indexsidebar.html: -------------------------------------------------------------------------------- 1 |

Resources

2 | 11 | -------------------------------------------------------------------------------- /docs/_static/indexcontent.html: -------------------------------------------------------------------------------- 1 | {% extends "defindex.html" %} 2 | {% block tables %} 3 | 4 | 8 | 13 |
5 | 7 |
9 | 12 |
14 | 15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /docs/src/simuPOPSequentialParentsChooserRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class SequentialParentsChooser 3 | ------------------------------ 4 | 5 | .. class:: SequentialParentsChooser 6 | 7 | This parent chooser chooses two parents (a father and a mother) 8 | sequentially from their respective sex groups. Selection is not considered. 9 | If all fathers (or mothers) are exhausted, this parent chooser will choose 10 | fathers (or mothers) from the beginning of the (virtual) subpopulation 11 | again. 12 | 13 | .. method:: SequentialParentsChooser.SequentialParentsChooser() 14 | 15 | Create a parent chooser that chooses two parents sequentially from a 16 | parental (virtual) subpopulation. 17 | 18 | -------------------------------------------------------------------------------- /docs/src/static/indexcontent.html: -------------------------------------------------------------------------------- 1 | {% extends "defindex.html" %} 2 | {% block tables %} 3 | 4 | 8 | 13 |
5 | 7 |
9 | 12 |
14 | 15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /doc/tools/sphinx-build.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Sphinx - Python documentation toolchain 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5 | 6 | :copyright: 2007 by Georg Brandl. 7 | :license: Python license. 8 | """ 9 | 10 | import sys 11 | 12 | if __name__ == '__main__': 13 | 14 | if sys.version_info[:3] < (2, 4, 0): 15 | print >>sys.stderr, """\ 16 | Error: Sphinx needs to be executed with Python 2.4 or newer 17 | (If you run this from the Makefile, you can set the PYTHON variable 18 | to the path of an alternative interpreter executable, e.g., 19 | ``make html PYTHON=python2.5``). 20 | """ 21 | sys.exit(1) 22 | 23 | from sphinx import main 24 | sys.exit(main(sys.argv)) 25 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingdrawRandomSampleRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function drawRandomSample 3 | ------------------------- 4 | 5 | 6 | .. function:: drawRandomSample(pop, sizes, subPops=ALL_AVAIL) 7 | 8 | Draw ``sizes`` random individuals from a population. If a single ``sizes`` 9 | is given, individuals are drawn randomly from the whole population or 10 | from specified (virtual) subpopulations (parameter ``subPops``). Otherwise, 11 | a list of numbers should be used to specify number of samples from each 12 | subpopulation, which can be all subpopulations if ``subPops=ALL_AVAIL`` 13 | (default), or from each of the specified (virtual) subpopulations. This 14 | function returns a population with all extracted individuals. 15 | -------------------------------------------------------------------------------- /docs/src/closeOutputRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function closeOutput 3 | -------------------- 4 | 5 | 6 | .. function:: closeOutput(output="") 7 | 8 | Output files specified by ``'>'`` are closed immediately after they 9 | are written. Those specified by ``'>>'`` and ``'>>>'`` are closed 10 | by a simulator after ``Simulator.evolve()``. However, these files 11 | will be kept open if the operators are applied directly to a 12 | population using the operators' function form. In this case, 13 | function :func:`closeOutput` can be used to close a specific file 14 | *output*, and close all unclosed files if *output* is unspecified. 15 | An exception will be raised if *output* does not exist or it has 16 | already been closed. 17 | -------------------------------------------------------------------------------- /docs/src/simuPOPallindividualsRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function allindividuals 3 | ----------------------- 4 | 5 | 6 | .. function:: all_individuals(self, subPops=ALL_AVAIL, ancGens=True) 7 | 8 | Return an iterator that iterat through all (virtual) subpopulations in 9 | all ancestral generations. A list of (virtual) subpopulations (*subPops*) 10 | and a list of ancestral generations (*ancGens*, can be a single number) 11 | could be specified to iterate through only selected subpopulation and 12 | generations. Value ``ALL_AVAIL`` is acceptable in the specification of 13 | ``sp`` and/or ``vsp`` in specifying a virtual subpopulation ``(sp, vsp)`` 14 | for the iteration through all or specific virtual subpopulation in all or 15 | specific subpopulations. 16 | -------------------------------------------------------------------------------- /development/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # Docker image for simuPOP 3 | 4 | FROM ubuntu:latest 5 | 6 | MAINTAINER Bo Peng 7 | 8 | RUN apt-get update 9 | RUN apt-get -y install swig gcc g++ build-essential bzip2 libbz2-dev libz-dev curl git 10 | 11 | RUN curl -LO http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh 12 | RUN bash Miniconda3-latest-Linux-x86_64.sh -p /miniconda -b 13 | RUN rm Miniconda3-latest-Linux-x86_64.sh 14 | ENV PATH=/miniconda/bin:${PATH} 15 | RUN conda update -y conda 16 | 17 | WORKDIR /home/bpeng 18 | RUN git clone http://github.com/BoPeng/simuPOP simuPOP 19 | WORKDIR /home/bpeng/simuPOP 20 | RUN git pull 21 | RUN python setup.py install 22 | 23 | ENV HOME /home/bpeng 24 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilsviewVarsRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function viewVars 3 | ----------------- 4 | 5 | 6 | .. function:: viewVars(var, gui=None) 7 | 8 | list a variable in tree format, either in text format or in a 9 | wxPython window. 10 | 11 | var 12 | A dictionary variable to be viewed. Dictionary wrapper objects returned 13 | by ``Population.dvars()`` and ``Simulator.dvars()`` are also acceptable. 14 | 15 | gui 16 | If gui is ``False`` or ``'Tkinter'``, a text presentation (use the 17 | pprint module) of the variable will be printed to the screen. If gui is 18 | ``'wxPython'`` and wxPython is available, a wxPython windows will be 19 | used. The default mode is determined by the global gui mode (see also 20 | :func:`simuOpt.setOptions`). 21 | -------------------------------------------------------------------------------- /docs/src/SexSplitterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class SexSplitter 3 | ----------------- 4 | 5 | .. class:: SexSplitter 6 | 7 | This splitter defines two VSPs by individual sex. The first VSP 8 | consists of all male individuals and the second VSP consists of all 9 | females in a subpopulation. 10 | 11 | 12 | .. method:: SexSplitter(names=[]) 13 | 14 | 15 | Create a sex splitter that defines male and female VSPs. These 16 | VSPs are named ``Male`` and ``Female`` unless a new set of names 17 | are specified by parameter *names*. 18 | 19 | 20 | .. method:: SexSplitter.name(vsp) 21 | 22 | Return ``"Male"`` if *vsp=0* and ``"Female"`` otherwise, unless 23 | a new set of names are specified. 24 | 25 | .. method:: SexSplitter.numVirtualSubPop() 26 | 27 | Return ``2``. 28 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingCaseControlSamplerRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class CaseControlSampler 3 | ------------------------ 4 | 5 | .. class:: CaseControlSampler 6 | 7 | A sampler that draws affected and unaffected individuals randomly. 8 | 9 | .. method:: CaseControlSampler.CaseControlSampler(cases, controls, subPops=ALL_AVAIL) 10 | 11 | Ceates a case-control sampler with specified number of cases 12 | and controls. 13 | 14 | .. method:: CaseControlSampler.drawSample(input_pop) 15 | 16 | Draw a case control sample 17 | 18 | .. method:: CaseControlSampler.drawSamples(pop, numOfSamples) 19 | 20 | Draw multiple samples and return a list of populations. 21 | 22 | .. method:: CaseControlSampler.prepareSample(input_pop) 23 | 24 | Find out indexes all affected and unaffected individuales. 25 | 26 | -------------------------------------------------------------------------------- /gsl/specfunc/cheb_eval.c: -------------------------------------------------------------------------------- 1 | 2 | static inline int 3 | cheb_eval_e(const cheb_series * cs, 4 | const double x, 5 | gsl_sf_result * result) 6 | { 7 | int j; 8 | double d = 0.0; 9 | double dd = 0.0; 10 | 11 | double y = (2.0*x - cs->a - cs->b) / (cs->b - cs->a); 12 | double y2 = 2.0 * y; 13 | 14 | double e = 0.0; 15 | 16 | for(j = cs->order; j>=1; j--) { 17 | double temp = d; 18 | d = y2*d - dd + cs->c[j]; 19 | e += fabs(y2*temp) + fabs(dd) + fabs(cs->c[j]); 20 | dd = temp; 21 | } 22 | 23 | { 24 | double temp = d; 25 | d = y*d - dd + 0.5 * cs->c[0]; 26 | e += fabs(y*temp) + fabs(dd) + 0.5 * fabs(cs->c[0]); 27 | } 28 | 29 | result->val = d; 30 | result->err = GSL_DBL_EPSILON * e + fabs(cs->c[cs->order]); 31 | 32 | return GSL_SUCCESS; 33 | } 34 | 35 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilsmigrSteppingStoneRatesRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function migrSteppingStoneRates 3 | ------------------------------- 4 | 5 | 6 | .. function:: migrSteppingStoneRates(r, n, circular=False) 7 | 8 | migration rate matrix for circular stepping stone model (X=1-m) 9 | 10 | :: 11 | 12 | X m/2 m/2 13 | m/2 X m/2 0 14 | 0 m/2 x m/2 ......0 15 | ... 16 | m/2 0 .... m/2 X 17 | 18 | or non-circular 19 | 20 | :: 21 | 22 | X m/2 m/2 23 | m/2 X m/2 0 24 | 0 m/2 X m/2 ......0 25 | ... 26 | ... m X 27 | 28 | This function returns [[1]] when there is only one subpopulation. 29 | -------------------------------------------------------------------------------- /docs/src/pyIndIteratorRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class pyIndIterator 3 | ------------------- 4 | 5 | .. class:: pyIndIterator 6 | 7 | this class implements a Python itertor class that can be used to 8 | iterate through individuals in a (sub)population. If allInds are 9 | true, visiblility of individuals will not be checked. Otherwise, a 10 | functor will be used to check if indiviudals belong to a specified 11 | virtual subpopulation. 12 | 13 | An instance of this class is returned by population::Individuals() 14 | and Population::Individuals(subPop) 15 | 16 | 17 | .. method:: pyIndIterator(begin, end, allInds, func) 18 | 19 | 20 | FIXME: No document 21 | 22 | 23 | .. method:: pyIndIterator.__iter__() 24 | 25 | FIXME: No document 26 | 27 | .. method:: pyIndIterator.next() 28 | 29 | FIXME: No document 30 | -------------------------------------------------------------------------------- /docs/src/IndividualIteratorRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class IndividualIterator 3 | ------------------------ 4 | 5 | .. class:: IndividualIterator 6 | 7 | this class implements a C++ iterator class that iterate through 8 | individuals in a (sub)population. If allInds are true, the 9 | visiblility of individuals will not be checked. Note that 10 | IndividualIterator*will* iterate through only visible individuals, 11 | and allInds is only provided when we know in advance that all 12 | individuals are visible. This is a way to obtain better performance 13 | in simple cases. 14 | 15 | 16 | .. method:: IndividualIterator() 17 | 18 | 19 | FIXME: No document 20 | 21 | 22 | .. method:: IndividualIterator.rawIter() 23 | 24 | FIXME: No document 25 | 26 | .. method:: IndividualIterator.valid() 27 | 28 | FIXME: No document 29 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingdrawCaseControlSampleRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function drawCaseControlSample 3 | ------------------------------ 4 | 5 | 6 | .. function:: drawCaseControlSample(pop, cases, controls, subPops=ALL_AVAIL) 7 | 8 | Draw a case-control samples from a population with ``cases`` 9 | affected and ``controls`` unaffected individuals. If single ``cases`` and 10 | ``controls`` are given, individuals are drawn randomly from the whole 11 | Population or from specified (virtual) subpopulations (parameter 12 | ``subPops``). Otherwise, a list of numbers should be used to specify 13 | number of cases and controls from each subpopulation, which can be all 14 | subpopulations if ``subPops=ALL_AVAIL`` (default), or from each of the 15 | specified (virtual) subpopulations. This function returns a population with 16 | all extracted individuals. 17 | -------------------------------------------------------------------------------- /docs/src/userGuide_ch8.rst: -------------------------------------------------------------------------------- 1 | .. _cha_A_real_example: 2 | 3 | ******************** 4 | A real world example 5 | ******************** 6 | 7 | Previous chapters use a lot of examples to demonstrate individual simuPOP 8 | features. However, it might not be clear how to integrate these features in 9 | longer scripts that address real world problems, which may involve larger 10 | populations, more complex genetic and demographic models and may run thousands 11 | of replicates with different parameters. This chapter will show you, step by 12 | step, how to write a complete simuPOP script that has been used in a real-world 13 | research topic. 14 | 15 | 16 | 17 | .. toctree:: 18 | 19 | userGuide_ch8_sec1.rst 20 | userGuide_ch8_sec2.rst 21 | userGuide_ch8_sec3.rst 22 | userGuide_ch8_sec4.rst 23 | userGuide_ch8_sec5.rst 24 | userGuide_ch8_sec6.rst 25 | -------------------------------------------------------------------------------- /docs/src/pyMutantIteratorRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class pyMutantIterator 3 | ---------------------- 4 | 5 | .. class:: pyMutantIterator 6 | 7 | this class implements a Python itertor class that can be used to 8 | iterate through individuals in a (sub)population. If allInds are 9 | true, visiblility of individuals will not be checked. Otherwise, a 10 | functor will be used to check if indiviudals belong to a specified 11 | virtual subpopulation. 12 | 13 | An instance of this class is returned by population::Individuals() 14 | and Population::Individuals(subPop) 15 | 16 | 17 | .. method:: pyMutantIterator(base, begin, end, step) 18 | 19 | 20 | FIXME: No document 21 | 22 | 23 | .. method:: pyMutantIterator.__iter__() 24 | 25 | FIXME: No document 26 | 27 | .. method:: pyMutantIterator.next() 28 | 29 | FIXME: No document 30 | -------------------------------------------------------------------------------- /docs/_sources/userGuide_ch8.rst.txt: -------------------------------------------------------------------------------- 1 | .. _cha_A_real_example: 2 | 3 | ******************** 4 | A real world example 5 | ******************** 6 | 7 | Previous chapters use a lot of examples to demonstrate individual simuPOP 8 | features. However, it might not be clear how to integrate these features in 9 | longer scripts that address real world problems, which may involve larger 10 | populations, more complex genetic and demographic models and may run thousands 11 | of replicates with different parameters. This chapter will show you, step by 12 | step, how to write a complete simuPOP script that has been used in a real-world 13 | research topic. 14 | 15 | 16 | 17 | .. toctree:: 18 | 19 | userGuide_ch8_sec1.rst 20 | userGuide_ch8_sec2.rst 21 | userGuide_ch8_sec3.rst 22 | userGuide_ch8_sec4.rst 23 | userGuide_ch8_sec5.rst 24 | userGuide_ch8_sec6.rst 25 | -------------------------------------------------------------------------------- /docs/src/AffectionSplitterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class AffectionSplitter 3 | ----------------------- 4 | 5 | .. class:: AffectionSplitter 6 | 7 | This class defines two VSPs according individual affection status. 8 | The first VSP consists of unaffected invidiauls and the second VSP 9 | consists of affected ones. 10 | 11 | 12 | .. method:: AffectionSplitter(names=[]) 13 | 14 | 15 | Create a splitter that defined two VSPs by affection 16 | status.These VSPs are named ``Unaffected`` and ``Affected`` 17 | unless a new set of names are specified by parameter *names*. 18 | 19 | 20 | .. method:: AffectionSplitter.name(vsp) 21 | 22 | Return ``"Unaffected"`` if *vsp=0* and ``"Affected"`` if 23 | *vsp=1*, unless a new set of names are specified. 24 | 25 | .. method:: AffectionSplitter.numVirtualSubPop() 26 | 27 | Return 2. 28 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingdrawAffectedSibpairSampleRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function drawAffectedSibpairSample 3 | ---------------------------------- 4 | 5 | 6 | .. function:: drawAffectedSibpairSample(pop, families, subPops=ALL_AVAIL, idField='ind_id', fatherField='father_id', motherField='mother_id') 7 | 8 | Draw affected sibpair samples from a population. If a single 9 | ``families`` is given, affected sibpairs and their parents are drawn 10 | randomly from the whole population or from specified (virtual) 11 | subpopulations (parameter ``subPops``). Otherwise, a list of numbers should 12 | be used to specify number of families from each subpopulation, which can be 13 | all subpopulations if ``subPops=ALL_AVAIL`` (default), or from each of the 14 | specified (virtual) subpopulations. This function returns a population that 15 | contains extracted individuals. 16 | -------------------------------------------------------------------------------- /docs/src/MergeSubPopsRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class MergeSubPops 3 | ------------------ 4 | 5 | .. class:: MergeSubPops 6 | 7 | This operator merges subpopulations *subPops* to a single 8 | subpopulation. If ``subPops`` is ignored, all subpopulations will 9 | be merged. Virtual subpopulations are not allowed in *subPops*. 10 | 11 | 12 | .. method:: MergeSubPops(subPops=ALL_AVAIL, name="", begin=0, end=-1, step=1, at=[], reps=ALL_AVAIL, infoFields=[]) 13 | 14 | 15 | Create an operator that merges subpopulations *subPops* to a 16 | single subpopulation. If *subPops* is not given, all 17 | subpopulations will be merged. The merged subpopulation will 18 | take the name of the first subpopulation being merged unless a 19 | new *name* is given. 20 | 21 | Please refer to operator :class:`BaseOperator` for a detailed 22 | explanation for all parameters. 23 | 24 | -------------------------------------------------------------------------------- /docs/src/ParentChooserRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class ParentChooser 3 | ------------------- 4 | 5 | .. class:: ParentChooser 6 | 7 | A parent chooser repeatedly chooses parent(s) from a parental 8 | population and pass them to an offspring generator. A parent 9 | chooser can select one or two parents, which should be matched by 10 | the offspring generator. This class is the base class of all parent 11 | choosers, and should not be used directly. 12 | 13 | 14 | .. method:: ParentChooser(selectionField="") 15 | 16 | 17 | FIXME: No document 18 | 19 | 20 | .. method:: ParentChooser.chooseParents() 21 | 22 | Return chosen parents from a population if the parent chooser 23 | object is created with a population. 24 | 25 | .. method:: ParentChooser.initialize(pop, subPop) 26 | 27 | Initialize a parent chooser for subpopulation *subPop* of 28 | *population* pop. 29 | -------------------------------------------------------------------------------- /docs/src/simuPOPevolvepopRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function evolvepop 3 | ------------------ 4 | 5 | 6 | .. function:: evolve_pop(self, initOps=[], preOps=[], matingScheme=MatingScheme(), postOps=[], finalOps=[], gen=-1, dryrun=False) 7 | 8 | Evolve the current population *gen* generations using mating scheme 9 | *matingScheme* and operators *initOps* (applied before evolution), *preOps* 10 | (applied to the parental population at the beginning of each life cycle), 11 | *postOps* (applied to the offspring population at the end of each life 12 | cycle) and *finalOps* (applied at the end of evolution). More specifically, 13 | this function creates a *Simulator* using the current population, call its 14 | *evolve* function using passed parameters and then replace the current 15 | population with the evolved population. Please refer to function 16 | :meth:`Simulator.evolve` for more details about each parameter. 17 | -------------------------------------------------------------------------------- /docs/src/simuPOPWithModeRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class WithMode 3 | -------------- 4 | 5 | .. class:: WithMode 6 | 7 | This class wraps around a user-provided output string, function 8 | or file handle (acceptable by parameter ``output`` of operators) so 9 | that simuPOP knows which mode the output should be written to. For 10 | example, if the output of the operator is a binary compressed stream, 11 | ``WithMode(output, 'b')`` could be used to tell the operators to 12 | output bytes instead of string. This is most needed for Python 3 13 | because files in Python 2 accepts string even if they are opened in 14 | binary mode. 15 | 16 | .. method:: WithMode.WithMode(output, mode='') 17 | 18 | Return an object that wraps around ``output`` and tells simuPOP 19 | to output string in ``mode``. This class currently only support 20 | ``mode=''`` for text mode and ``mode='b'`` for binary output. 21 | 22 | -------------------------------------------------------------------------------- /docs/src/simuPOPdemographySplitEventRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class SplitEvent 3 | ---------------- 4 | 5 | .. class:: SplitEvent 6 | 7 | A demographic event that splits a specified population into two or 8 | more subpopulations. 9 | 10 | .. method:: SplitEvent.SplitEvent(sizes=[], names=[], ops=[], output='', begin=0, end=-1, step=1, at=[], reps=True, subPops=ALL_AVAIL, infoFields=[]) 11 | 12 | A demographic event that splits a subpopulation specified by 13 | ``subPops`` to two or more subpopulations, with specified ``sizes`` 14 | and ``names``. ``sizes`` can be a list of numbers, proportions 15 | (e.g. ``[1., 500]`` keeps the original population and copies 500 16 | individuals to create a new subpupulation). Note that ``sizes`` 17 | and ``names``, if specified, should include the source subpopulation 18 | as its first element. 19 | 20 | .. method:: SplitEvent.apply(pop) 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/src/simuPOPdemographyRef.ref: -------------------------------------------------------------------------------- 1 | 2 | .. module:: simuPOP.demography 3 | 4 | This module provides some commonly used demographic models. In addition 5 | to several migration rate generation functions, it provides models that 6 | encapsulate complete demographic features of one or more populations ( 7 | population growth, split, bottleneck, admixture, migration). These models 8 | provides: 9 | 10 | 1. The model itself can be passed to parameter subPopSize of a mating 11 | scheme to determine the size of the next generation. More importantly, 12 | it performs necessary actions of population size change when needed. 13 | 14 | 2. The model provides attribute num_gens, which can be passed to parameter 15 | ``gens`` of ``Simulator.evolve`` or ``Population.evolve`` function. 16 | A demographic model can also terminate an evolutionary process by 17 | returnning an empty list so ``gens=model.num_gens`` is no longer required. 18 | -------------------------------------------------------------------------------- /docs/src/SavePopulationRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class SavePopulation 3 | -------------------- 4 | 5 | .. class:: SavePopulation 6 | 7 | An operator that save populations to specified files. 8 | 9 | 10 | .. method:: SavePopulation(output="", begin=0, end=-1, step=1, at=[], reps=ALL_AVAIL, subPops=ALL_AVAIL, infoFields=[]) 11 | 12 | 13 | Create an operator that saves a population to *output* when it 14 | is applied to the population. This operator supports all output 15 | specifications (``''``, ``'filename'``, ``'filename'`` prefixed 16 | by one or more '>' characters, and ``'!expr'``) but output from 17 | different operators will always replace existing files 18 | (effectively ignore '>' specification). Parameter *subPops* is 19 | ignored. Please refer to class :class:`BaseOperator` for a 20 | detailed description about common operator parameters such as 21 | *stage* and *begin*. 22 | 23 | -------------------------------------------------------------------------------- /docs/src/RevertFixedSitesRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class RevertFixedSites 3 | ---------------------- 4 | 5 | .. class:: RevertFixedSites 6 | 7 | This operator checks all or specified loci of a population and 8 | revert all mutants at loci to wildtype alleles if they are fixed in 9 | the population. If a list of (virtual) subpopulations are 10 | specified, alleles are reverted if they are fixed in each 11 | subpopulation, regardless if the alleles are fixed in other 12 | subpopulations. 13 | 14 | 15 | .. method:: RevertFixedSites(loci=ALL_AVAIL, output="", begin=0, end=-1, step=1, at=[], reps=ALL_AVAIL, subPops=ALL_AVAIL, infoFields=["ind_id"]) 16 | 17 | 18 | Create an operator to set all alleles to zero at specified 19 | (parameter *loci*) or all loci if they are fixed (having one 20 | non-zero allele) at these loci. If parameter *subPops* are 21 | specified, only individuals in these subpopulations are 22 | considered. 23 | 24 | -------------------------------------------------------------------------------- /docs/src/simuPOPHaplodiploidMatingRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class HaplodiploidMating 3 | ------------------------ 4 | 5 | .. class:: HaplodiploidMating 6 | 7 | A homogeneous mating scheme that uses a random parents chooser with 8 | replacement and a haplodiploid offspring generator. It should be used 9 | in a haplodiploid population where male individuals only have one set 10 | of homologous chromosomes. 11 | 12 | .. method:: HaplodiploidMating.HaplodiploidMating(numOffspring=1.0, sexMode=RANDOM_SEX, ops=HaplodiploidGenoTransmitter(), subPopSize=[], subPops=ALL_AVAIL, weight=0, selectionField='fitness') 13 | 14 | Creates a mating scheme in haplodiploid populations. Please refer 15 | to class :class:`RandomParentsChooser` for parameter *selectionField*, to 16 | class :class:`OffspringGenerator` for parameters *ops*, *sexMode* and 17 | *numOffspring*, and to class :class:`HomoMating` for parameters 18 | *subPopSize*, *subPops* and *weight*. 19 | 20 | -------------------------------------------------------------------------------- /docs/src/simuPOPRandomMatingRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class RandomMating 3 | ------------------ 4 | 5 | .. class:: RandomMating 6 | 7 | A homogeneous mating scheme that uses a random parents chooser with 8 | replacement and a Mendelian offspring generator. This mating scheme is 9 | widely used to simulate diploid sexual Wright-Fisher random mating. 10 | 11 | .. method:: RandomMating.RandomMating(numOffspring=1, sexMode=RANDOM_SEX, ops=MendelianGenoTransmitter(), subPopSize=[], subPops=ALL_AVAIL, weight=0, selectionField='fitness') 12 | 13 | Creates a random mating ssheme that selects two parents randomly and 14 | transmit genotypes according to Mendelian laws. Please refer to class 15 | :class:`RandomParentsChooser` for parameter *selectionField*, to class 16 | :class:`OffspringGenerator` for parameters *ops*, *sexMode* and 17 | *numOffspring*, and to class :class:`HomoMating` for parameters 18 | *subPopSize*, *subPops* and *weight*. 19 | 20 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingAffectedSibpairSamplerRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class AffectedSibpairSampler 3 | ---------------------------- 4 | 5 | .. class:: AffectedSibpairSampler 6 | 7 | A sampler that draws a nuclear family with two affected offspring. 8 | 9 | .. method:: AffectedSibpairSampler.AffectedSibpairSampler(families, subPops=ALL_AVAIL, idField='ind_id', fatherField='father_id', motherField='mother_id') 10 | 11 | Initialize an affected sibpair sampler. 12 | 13 | .. method:: AffectedSibpairSampler.drawSample(input_pop) 14 | 15 | Randomly select Pedigrees 16 | 17 | .. method:: AffectedSibpairSampler.drawSamples(pop, numOfSamples) 18 | 19 | Draw multiple samples and return a list of populations. 20 | 21 | .. method:: AffectedSibpairSampler.family(id) 22 | 23 | Return id, its spouse and their children 24 | 25 | .. method:: AffectedSibpairSampler.prepareSample(input_pop) 26 | 27 | Find the father or all affected sibpair families 28 | 29 | -------------------------------------------------------------------------------- /doc/tools/indexcontent.html: -------------------------------------------------------------------------------- 1 | {% extends "defindex.html" %} 2 | {% block tables %} 3 | 4 | 8 | 13 | 17 |
5 | 7 |
9 | 12 |
14 | 16 |
18 | 19 | {% endblock %} 20 | -------------------------------------------------------------------------------- /docs/src/SelfingGenoTransmitterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class SelfingGenoTransmitter 3 | ---------------------------- 4 | 5 | .. class:: SelfingGenoTransmitter 6 | 7 | A genotype transmitter (during-mating operator) that transmits 8 | parental genotype of a parent through self-fertilization. That is 9 | to say, the offspring genotype is formed according to Mendel's 10 | laws, only that a parent serves as both maternal and paternal 11 | parents. 12 | 13 | 14 | .. method:: SelfingGenoTransmitter(output="", begin=0, end=-1, step=1, at=[], reps=ALL_AVAIL, subPops=ALL_AVAIL, infoFields=[]) 15 | 16 | 17 | Create a self-fertilization genotype transmitter that transmits 18 | genotypes of a parent to an offspring through self- 19 | fertilization. Cutsomized chromosomes are not handled. 20 | Parameters *subPops* and *infoFields* are ignored. This operator 21 | also copies allelic lineage when it is executed in a module with 22 | lineage allele type. 23 | 24 | -------------------------------------------------------------------------------- /docs/src/userGuide_ch7_sec5.rst: -------------------------------------------------------------------------------- 1 | Module :mod:`simuPOP.gsl` 2 | ========================= 3 | 4 | simuPOP makes use of many functions from the GUN Scientific Library. These 5 | functions are used to generate random number and perform statistical tests 6 | within simuPOP. Although these functions are not part of simuPOP, they can be 7 | useful to users of simuPOP from time to time and it makes sense to expose these 8 | functions directly to users. 9 | 10 | Module :mod:`simuPOP.gsl` contains a number of GSL functions. Because only a 11 | small proportion of GSL functions are used in simuPOP, this module is by no 12 | means a comprehensive wrapper of GSL. Please refer to the simuPOP reference 13 | manual for a list of functions included in this module, and the GSL manual for 14 | more details. Because random number generation functions such as 15 | ``gsl_ran_gamma`` are already provided in the ``simuPOP.RNG`` class (e.g. 16 | :func:`getRNG`\ ``.randGamma``), they are not provided in this module. 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/src/OffspringTaggerRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class OffspringTagger 3 | --------------------- 4 | 5 | .. class:: OffspringTagger 6 | 7 | This tagging operator records the indexes of offspring within a 8 | family (sharing the same parent or parents) in specified 9 | information field (default to ``offspring_idx``). This tagger can 10 | be used to control the number of offspring during mating. 11 | 12 | 13 | .. method:: OffspringTagger(begin=0, end=-1, step=1, at=[], reps=ALL_AVAIL, subPops=ALL_AVAIL, output="", infoFields=ALL_AVAIL) 14 | 15 | 16 | Create an offspring tagger that records the indexes of offspring 17 | within a family. The index is determined by successful 18 | production of offspring during a mating events so the it does 19 | not increase the index if a previous offspring is discarded, and 20 | it resets index even if adjacent families share the same 21 | parents. This operator ignores parameters *stage*, *output*, and 22 | *subPops*. 23 | 24 | -------------------------------------------------------------------------------- /docs/_sources/userGuide_ch7_sec5.rst.txt: -------------------------------------------------------------------------------- 1 | Module :mod:`simuPOP.gsl` 2 | ========================= 3 | 4 | simuPOP makes use of many functions from the GUN Scientific Library. These 5 | functions are used to generate random number and perform statistical tests 6 | within simuPOP. Although these functions are not part of simuPOP, they can be 7 | useful to users of simuPOP from time to time and it makes sense to expose these 8 | functions directly to users. 9 | 10 | Module :mod:`simuPOP.gsl` contains a number of GSL functions. Because only a 11 | small proportion of GSL functions are used in simuPOP, this module is by no 12 | means a comprehensive wrapper of GSL. Please refer to the simuPOP reference 13 | manual for a list of functions included in this module, and the GSL manual for 14 | more details. Because random number generation functions such as 15 | ``gsl_ran_gamma`` are already provided in the ``simuPOP.RNG`` class (e.g. 16 | :func:`getRNG`\ ``.randGamma``), they are not provided in this module. 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/src/ProportionSplitterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class ProportionSplitter 3 | ------------------------ 4 | 5 | .. class:: ProportionSplitter 6 | 7 | This splitter divides subpopulations into several VSPs by 8 | proportion. 9 | 10 | 11 | .. method:: ProportionSplitter(proportions=[], names=[]) 12 | 13 | 14 | Create a splitter that divides subpopulations by *proportions*, 15 | which should be a list of float numbers (between ``0`` and 16 | ``1``) that add up to ``1``. A default set of names are given to 17 | each VSP unless a new set of names is given by parameter 18 | *names*. 19 | 20 | 21 | .. method:: ProportionSplitter.name(vsp) 22 | 23 | Return the name of VSP *vsp*, which is ``"Prop p"`` where 24 | ``p=propotions[vsp]``. A user specified name will be returned if 25 | specified. 26 | 27 | .. method:: ProportionSplitter.numVirtualSubPop() 28 | 29 | Return the number of VSPs defined by this splitter, which is the 30 | length of parameter *proportions*. 31 | -------------------------------------------------------------------------------- /docs/src/simuPOPMonogamousMatingRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class MonogamousMating 3 | ---------------------- 4 | 5 | .. class:: MonogamousMating 6 | 7 | A homogeneous mating scheme that uses a random parents chooser without 8 | replacement and a Mendelian offspring generator. It differs from the basic 9 | random mating scheme in that each parent can mate only once so there is no 10 | half-sibling in the population. 11 | 12 | .. method:: MonogamousMating.MonogamousMating(numOffspring=1, sexMode=RANDOM_SEX, ops=MendelianGenoTransmitter(), subPopSize=[], subPops=ALL_AVAIL, weight=0, selectionField=None) 13 | 14 | Creates a monogamous mating scheme that selects each parent only 15 | once. Please refer to class :class:`OffspringGenerator` for parameters 16 | *ops*, *sexMode* and *numOffspring*, and to class :class:`HomoMating` for 17 | parameters *subPopSize*, *subPops* and *weight*. Parameter 18 | *selectionField* is ignored because this mating scheme does not 19 | support natural selection. 20 | 21 | -------------------------------------------------------------------------------- /docs/src/simuPOPPolygamousMatingRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class PolygamousMating 3 | ---------------------- 4 | 5 | .. class:: PolygamousMating 6 | 7 | A homogeneous mating scheme that uses a multi-spouse parents chooser 8 | and a Mendelian offspring generator. It differs from the basic random 9 | mating scheme in that each parent of sex *polySex* will have *polyNum* 10 | spouses. 11 | 12 | .. method:: PolygamousMating.PolygamousMating(polySex=MALE, polyNum=1, numOffspring=1, sexMode=RANDOM_SEX, ops=MendelianGenoTransmitter(), subPopSize=[], subPops=ALL_AVAIL, weight=0, selectionField='fitness') 13 | 14 | Creates a polygamous mating scheme that each parent mates with 15 | multiple spouses. Please refer to class :class:`PolyParentsChooser` for 16 | parameters *polySex*, *polyNum* and *selectionField*, to class 17 | :class:`OffspringGenerator` for parameters *ops*, *sexMode* and 18 | *numOffspring*, and to class :class:`HomoMating` for parameters 19 | *subPopSize*, *subPops* and *weight*. 20 | 21 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingindexToIDRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function indexToID 3 | ------------------ 4 | 5 | 6 | .. function:: indexToID(pop, idField='ind_id', fatherField='father_id', motherField='mother_id', fatherIndex='father_idx', motherIndex='mother_idx', reset=False) 7 | 8 | This function adds information field idField (default to ``'ind_id'``) 9 | to population ``pop`` and assigns an unique ID to every individual in this 10 | Population. It then adds information fields fatherField (default to 11 | ``'fatherField'``) and motherField (default to ``'motherField'``) and set 12 | their values with IDs according to the established index based 13 | parents-children relationship. Existing information fields will be used if 14 | idField, fatherField or motherField already exist. This function uses a 15 | system-wide ID generator for unique IDs, which does not have to start from 16 | zero. A parameter ``reset`` could be used to reset starting ID to zero 17 | (if ``reset=True``) or a specified number (``reset=number``). 18 | -------------------------------------------------------------------------------- /docs/src/userGuide_ch7_sec1.rst: -------------------------------------------------------------------------------- 1 | Module :mod:`simuOpt` (function :func:`simuOpt.setOptions`) 2 | =========================================================== 3 | 4 | Module :mod:`simuOpt` handles options to specify which simuPOP module to load 5 | and how this module should be loaded, using function ``simuOpt.setOptions``\ 6 | with parameters *alleleType* (``short``, ``long``, or ``binary`` ), *optimized* 7 | (``standard`` or ``optimized``), *gui* (whether or not use a graphical user 8 | interface and which graphical toolkit to use), *revision* ``(``\ minimal 9 | required version/revision), *quiet* (with or without banner message, and *debug* 10 | (which debug code to turn on). These options have been discussed in Example 11 | :ref:`lst_Use_of_standard_module ` and 12 | :ref:`lst_Use_of_optimized_module ` and other 13 | related sections. Note that **most options can be set by environmental variables 14 | and command line options** which are sometimes more versatile to use. 15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/_sources/userGuide_ch7_sec1.rst.txt: -------------------------------------------------------------------------------- 1 | Module :mod:`simuOpt` (function :func:`simuOpt.setOptions`) 2 | =========================================================== 3 | 4 | Module :mod:`simuOpt` handles options to specify which simuPOP module to load 5 | and how this module should be loaded, using function ``simuOpt.setOptions``\ 6 | with parameters *alleleType* (``short``, ``long``, or ``binary`` ), *optimized* 7 | (``standard`` or ``optimized``), *gui* (whether or not use a graphical user 8 | interface and which graphical toolkit to use), *revision* ``(``\ minimal 9 | required version/revision), *quiet* (with or without banner message, and *debug* 10 | (which debug code to turn on). These options have been discussed in Example 11 | :ref:`lst_Use_of_standard_module ` and 12 | :ref:`lst_Use_of_optimized_module ` and other 13 | related sections. Note that **most options can be set by environmental variables 14 | and command line options** which are sometimes more versatile to use. 15 | 16 | 17 | -------------------------------------------------------------------------------- /gsl/sys/fdiv.c: -------------------------------------------------------------------------------- 1 | /* sys/fdiv.c 2 | * 3 | * Copyright (C) 2001, 2007 Brian Gough 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or (at 8 | * your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | double 25 | gsl_fdiv (const double x, const double y) 26 | { 27 | return x / y; 28 | } 29 | -------------------------------------------------------------------------------- /docs/src/simuPOPCloneMatingRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class CloneMating 3 | ----------------- 4 | 5 | .. class:: CloneMating 6 | 7 | A homogeneous mating scheme that uses a sequential parent chooser and 8 | a clone offspring generator. 9 | 10 | .. method:: CloneMating.CloneMating(numOffspring=1, sexMode=None, ops=CloneGenoTransmitter(), subPopSize=[], subPops=ALL_AVAIL, weight=0, selectionField=None) 11 | 12 | Create a clonal mating scheme that clones parents to offspring using 13 | a :class:`CloneGenoTransmitter`. Please refer to class :class:`OffspringGenerator` 14 | for parameters *ops* and *numOffspring*, and to class :class:`HomoMating` for 15 | parameters *subPopSize*, *subPops* and *weight*. Parameters *sexMode* and 16 | *selectionField* are ignored because this mating scheme does not support 17 | natural selection, and :class:`CloneGenoTransmitter` copies sex from parents 18 | to offspring. Note that :class:`CloneGenoTransmitter` by default also copies 19 | all parental information fields to offspring. 20 | 21 | -------------------------------------------------------------------------------- /docs/src/simuPOPSelfMatingRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class SelfMating 3 | ---------------- 4 | 5 | .. class:: SelfMating 6 | 7 | A homogeneous mating scheme that uses a random single-parent parent 8 | chooser with or without replacement (parameter *replacement*) and a 9 | selfing offspring generator. It is used to mimic self-fertilization 10 | in certain plant populations. 11 | 12 | .. method:: SelfMating.SelfMating(replacement=True, numOffspring=1, sexMode=RANDOM_SEX, ops=SelfingGenoTransmitter(), subPopSize=[], subPops=ALL_AVAIL, weight=0, selectionField='fitness') 13 | 14 | Creates a selfing mating scheme where two homologous copies of 15 | parental chromosomes are transmitted to offspring according to 16 | Mendelian laws. Please refer to class :class:`RandomParentChooser` for 17 | parameter *replacement* and *selectionField*, to class 18 | :class:`OffspringGenerator` for parameters *ops*, *sexMode* and 19 | *numOffspring*, and to class :class:`HomoMating` for parameters 20 | *subPopSize*, *subPops* and *weight*. 21 | 22 | -------------------------------------------------------------------------------- /docs/src/userGuide_ch8_sec1.rst: -------------------------------------------------------------------------------- 1 | Simulation scenario 2 | =================== 3 | 4 | Reich and Lander Reich2001a proposed a population genetics framework to model 5 | the evolution of allelic spectra (the number and population frequency of alleles 6 | at a locus). The model is based on the fact that human population grew quickly 7 | from around 10,000 to 6 billion in 18,000 -150,000 years. His analysis showed 8 | that at the founder population, both common and rare diseases have simple 9 | spectra. After the sudden expansion of population size, the allelic spectra of 10 | simple diseases become complex; while those of complex diseases remained simple. 11 | 12 | This example is a simplified version of the ``simuCDCV.py`` script that 13 | simulates this evolution process and observe the allelic spectra of both types 14 | of diseases. The complete script is available at 15 | https://github.com/BoPeng/simuPOP/cookbookthe simuPOP online cookbook. The results 16 | are published in Peng2007, which has much more detailed discussion about the 17 | simulations, and the parameters used. 18 | -------------------------------------------------------------------------------- /docs/_sources/userGuide_ch8_sec1.rst.txt: -------------------------------------------------------------------------------- 1 | Simulation scenario 2 | =================== 3 | 4 | Reich and Lander Reich2001a proposed a population genetics framework to model 5 | the evolution of allelic spectra (the number and population frequency of alleles 6 | at a locus). The model is based on the fact that human population grew quickly 7 | from around 10,000 to 6 billion in 18,000 -150,000 years. His analysis showed 8 | that at the founder population, both common and rare diseases have simple 9 | spectra. After the sudden expansion of population size, the allelic spectra of 10 | simple diseases become complex; while those of complex diseases remained simple. 11 | 12 | This example is a simplified version of the ``simuCDCV.py`` script that 13 | simulates this evolution process and observe the allelic spectra of both types 14 | of diseases. The complete script is available at 15 | https://github.com/BoPeng/simuPOP-examples in the simuPOP examples repository. The results 16 | are published in Peng2007, which has much more detailed discussion about the 17 | simulations, and the parameters used. 18 | -------------------------------------------------------------------------------- /docs/src/InitInfoRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class InitInfo 3 | -------------- 4 | 5 | .. class:: InitInfo 6 | 7 | This operator initializes given information fields with a sequence 8 | of values, or a user-provided function such as ``random.random``. 9 | 10 | 11 | .. method:: InitInfo(values, begin=0, end=-1, step=1, at=[], reps=ALL_AVAIL, subPops=ALL_AVAIL, infoFields=[]) 12 | 13 | 14 | Create an operator that initialize individual information fields 15 | *infoFields* using a sequence of values or a user-defined 16 | function. If a list of values are given, it will be used 17 | sequentially for all individuals. The values will be reused if 18 | its length is less than the number of individuals. The values 19 | will be assigned repeatedly regardless of subpopulation 20 | boundaries. If a Python function is given, it will be called, 21 | without any argument, whenever a value is needed. If a list of 22 | (virtual) subpopulation is specified in parameter *subPop*, only 23 | individuals in these subpopulations will be initialized. 24 | 25 | -------------------------------------------------------------------------------- /docs/src/simuPOPdemographyResizeEventRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class ResizeEvent 3 | ----------------- 4 | 5 | .. class:: ResizeEvent 6 | 7 | A demographic event that resize specified subpopulations 8 | 9 | .. method:: ResizeEvent.ResizeEvent(sizes=[], names=[], removeEmptySubPops=False, ops=[], output='', begin=0, end=-1, step=1, at=[], reps=True, subPops=ALL_AVAIL, infoFields=[]) 10 | 11 | A demographic event that resizes given subpopulations ``subPops`` to new 12 | ``sizes`` (integer type), or sizes proportional to original sizes (if a float 13 | number is given). For example, ``sizes=[0.5, 500]`` will resize the first 14 | subpopulation to half of its original size, and the second subpopulation to 15 | size ``500``. If the new size is larger, existing individuals will be copied 16 | to sequentially, and repeatedly if needed. If the size of a subpopulation is 17 | 0 and ``removeEmptySubPops`` is ``True``, empty subpopulations will be 18 | removed. A new set of names could be assigned to the population being resized. 19 | 20 | .. method:: ResizeEvent.apply(pop) 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/src/simuPOPRandomSelectionRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class RandomSelection 3 | --------------------- 4 | 5 | .. class:: RandomSelection 6 | 7 | A homogeneous mating scheme that uses a random single-parent parent 8 | chooser with replacement, and a clone offspring generator. This mating 9 | scheme is usually used to simulate the basic haploid Wright-Fisher model 10 | but it can also be applied to diploid populations. 11 | 12 | .. method:: RandomSelection.RandomSelection(numOffspring=1, sexMode=None, ops=CloneGenoTransmitter(), subPopSize=[], subPops=ALL_AVAIL, weight=0, selectionField='fitness') 13 | 14 | Create a mating scheme that select a parent randomly and copy him or 15 | her to the offspring population. Please refer to class 16 | :class:`RandomParentChooser` for parameter *selectionField*, to class 17 | :class:`OffspringGenerator` for parameters *ops* and *numOffspring*, and to 18 | class :class:`HomoMating` for parameters *subPopSize*, *subPops* and *weight*. 19 | Parameter *sexMode* is ignored because ``cloneOffspringGenerator`` copies 20 | sex from parents to offspring. 21 | 22 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingRandomSamplerRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class RandomSampler 3 | ------------------- 4 | 5 | .. class:: RandomSampler 6 | 7 | A sampler that draws individuals randomly. 8 | 9 | .. method:: RandomSampler.RandomSampler(sizes, subPops=ALL_AVAIL) 10 | 11 | Creates a random sampler with specified number of individuals. 12 | 13 | .. method:: RandomSampler.drawSample(input_pop) 14 | 15 | Draw a random sample from passed population. 16 | 17 | .. method:: RandomSampler.drawSamples(pop, numOfSamples) 18 | 19 | Draw multiple samples and return a list of populations. 20 | 21 | .. method:: RandomSampler.prepareSample(pop, rearrange) 22 | 23 | Prepare passed population object for sampling according to parameter 24 | ``subPops``. If samples are drawn from the whole population, a 25 | Population will be trimmed if only selected (virtual) subpopulations 26 | are used. If samples are drawn separately from specified subpopulations, 27 | Population ``pop`` will be rearranged (if ``rearrange==True``) so that 28 | each subpoulation corresponds to one element in parameter ``subPops``. 29 | 30 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingdrawNuclearFamilySampleRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function drawNuclearFamilySample 3 | -------------------------------- 4 | 5 | 6 | .. function:: drawNuclearFamilySample(pop, families, numOffspring, affectedParents=0, affectedOffspring=0, subPops=ALL_AVAIL, idField='ind_id', fatherField='father_id', motherField='mother_id') 7 | 8 | Draw nuclear families from a population. Number of offspring, number of 9 | affected parents and number of affected offspring should be specified using 10 | parameters ``numOffspring``, ``affectedParents`` and ``affectedOffspring``, 11 | which can all be a single number, or a range ``[a, b]`` (``b`` is incldued). 12 | If a single ``families`` is given, Pedigrees are drawn randomly from the 13 | whole population or from specified (virtual) subpopulations (parameter 14 | ``subPops``). Otherwise, a list of numbers should be used to specify 15 | numbers of families from each subpopulation, which can be all 16 | subpopulations if ``subPops=ALL_AVAIL`` (default), or from each of the 17 | specified (virtual) subpopulations. This function returns a population that 18 | contains extracted individuals. 19 | -------------------------------------------------------------------------------- /src/simuPOP_std.i: -------------------------------------------------------------------------------- 1 | // 2 | // $File: simuPOP_std.i $ 3 | // $LastChangedDate$ 4 | // $Rev$ 5 | // 6 | // This file is part of simuPOP, a forward-time population genetics 7 | // simulation environment. Please visit https://github.com/BoPeng/simuPOP 8 | // for details. 9 | // 10 | // Copyright (C) 2004 - 2009 Bo Peng (Bo.Peng@bcm.edu) 11 | // 12 | // This program is free software: you can redistribute it and/or modify 13 | // it under the terms of the GNU General Public License as published by 14 | // the Free Software Foundation, either version 3 of the License, or 15 | // (at your option) any later version. 16 | // 17 | // This program is distributed in the hope that it will be useful, 18 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU General Public License 23 | // along with this program. If not, see . 24 | // 25 | 26 | %module simuPOP_std 27 | 28 | %include "simuPOP_common.i" 29 | %pythoncode %{ 30 | defdict = _simuPOP_std.defdict 31 | %} 32 | -------------------------------------------------------------------------------- /gsl/build.h: -------------------------------------------------------------------------------- 1 | /* Compile subsequent inline functions as static functions */ 2 | 3 | #ifdef __GSL_BUILD_H__ 4 | #error build.h must not be included multiple times 5 | #endif 6 | 7 | #define __GSL_BUILD_H__ 8 | 9 | #ifdef COMPILE_INLINE_STATIC 10 | #ifndef HIDE_INLINE_STATIC /* skip if inline functions are hidden */ 11 | 12 | #undef __GSL_INLINE_H__ 13 | #define __GSL_INLINE_H__ /* first, ignore the gsl_inline.h header file */ 14 | 15 | #undef INLINE_DECL 16 | #define INLINE_DECL /* disable inline in declarations */ 17 | 18 | #undef INLINE_FUN 19 | #define INLINE_FUN /* disable inline in definitions */ 20 | 21 | #ifndef HAVE_INLINE /* enable compilation of definitions in .h files */ 22 | #define HAVE_INLINE 23 | #endif 24 | 25 | /* Compile range checking code for inline functions used in the library */ 26 | #undef GSL_RANGE_CHECK 27 | #define GSL_RANGE_CHECK 1 28 | 29 | /* Use the global variable gsl_check_range to enable/disable range checking at 30 | runtime */ 31 | #undef GSL_RANGE_COND 32 | #define GSL_RANGE_COND(x) (gsl_check_range && (x)) 33 | 34 | #endif 35 | #else 36 | #error must be called with COMPILE_INLINE_STATIC 37 | #endif 38 | -------------------------------------------------------------------------------- /gsl/sys/log1p.c: -------------------------------------------------------------------------------- 1 | /* sys/log1p.c 2 | * 3 | * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or (at 8 | * your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | double gsl_log1p (const double x) 25 | { 26 | volatile double y, z; 27 | y = 1 + x; 28 | z = y - 1; 29 | return log(y) - (z-x)/y ; /* cancels errors with IEEE arithmetic */ 30 | } 31 | -------------------------------------------------------------------------------- /docs/src/ResizeSubPopsRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class ResizeSubPops 3 | ------------------- 4 | 5 | .. class:: ResizeSubPops 6 | 7 | This operator resizes subpopulations to specified sizes. 8 | individuals are added or removed depending on the new subpopulation 9 | sizes. 10 | 11 | 12 | .. method:: ResizeSubPops(subPops=ALL_AVAIL, sizes=[], proportions=[], propagate=True, begin=0, end=-1, step=1, at=[], reps=ALL_AVAIL, infoFields=[]) 13 | 14 | 15 | Resize given subpopulations *subPops* to new sizes *size*, or 16 | sizes proportional to original sizes (parameter *proportions*). 17 | All subpopulations will be resized if *subPops* is not 18 | specified. If the new size of a subpopulation is smaller than 19 | its original size, extra individuals will be removed. If the new 20 | size is larger, new individuals with empty genotype will be 21 | inserted, unless parameter *propagate* is set to ``True`` 22 | (default). In this case, existing individuals will be copied 23 | sequentially, and repeatedly if needed. 24 | 25 | Please refer to operator :class:`BaseOperator` for a detailed 26 | explanation for all parameters. 27 | 28 | -------------------------------------------------------------------------------- /src/simuPOP_ba.i: -------------------------------------------------------------------------------- 1 | // 2 | // $File: simuPOP_ba.i $ 3 | // $LastChangedDate$ 4 | // $Rev$ 5 | // 6 | // This file is part of simuPOP, a forward-time population genetics 7 | // simulation environment. Please visit https://github.com/BoPeng/simuPOP 8 | // for details. 9 | // 10 | // Copyright (C) 2004 - 2009 Bo Peng (Bo.Peng@bcm.edu) 11 | // 12 | // This program is free software: you can redistribute it and/or modify 13 | // it under the terms of the GNU General Public License as published by 14 | // the Free Software Foundation, either version 3 of the License, or 15 | // (at your option) any later version. 16 | // 17 | // This program is distributed in the hope that it will be useful, 18 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU General Public License 23 | // along with this program. If not, see . 24 | // 25 | 26 | %module simuPOP_ba 27 | 28 | #define BINARYALLELE 29 | %include "simuPOP_common.i" 30 | %pythoncode %{ 31 | defdict = _simuPOP_ba.defdict 32 | %} 33 | -------------------------------------------------------------------------------- /src/simuPOP_lin.i: -------------------------------------------------------------------------------- 1 | // 2 | // $File: simuPOP_lin.i $ 3 | // $LastChangedDate$ 4 | // $Rev$ 5 | // 6 | // This file is part of simuPOP, a forward-time population genetics 7 | // simulation environment. Please visit https://github.com/BoPeng/simuPOP 8 | // for details. 9 | // 10 | // Copyright (C) 2004 - 2009 Bo Peng (Bo.Peng@bcm.edu) 11 | // 12 | // This program is free software: you can redistribute it and/or modify 13 | // it under the terms of the GNU General Public License as published by 14 | // the Free Software Foundation, either version 3 of the License, or 15 | // (at your option) any later version. 16 | // 17 | // This program is distributed in the hope that it will be useful, 18 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU General Public License 23 | // along with this program. If not, see . 24 | // 25 | 26 | %module simuPOP_lin 27 | 28 | #define LINEAGE 29 | %include "simuPOP_common.i" 30 | %pythoncode %{ 31 | defdict = _simuPOP_lin.defdict 32 | %} 33 | -------------------------------------------------------------------------------- /src/simuPOP_op.i: -------------------------------------------------------------------------------- 1 | // 2 | // $File: simuPOP_op.i $ 3 | // $LastChangedDate$ 4 | // $Rev$ 5 | // 6 | // This file is part of simuPOP, a forward-time population genetics 7 | // simulation environment. Please visit https://github.com/BoPeng/simuPOP 8 | // for details. 9 | // 10 | // Copyright (C) 2004 - 2009 Bo Peng (Bo.Peng@bcm.edu) 11 | // 12 | // This program is free software: you can redistribute it and/or modify 13 | // it under the terms of the GNU General Public License as published by 14 | // the Free Software Foundation, either version 3 of the License, or 15 | // (at your option) any later version. 16 | // 17 | // This program is distributed in the hope that it will be useful, 18 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU General Public License 23 | // along with this program. If not, see . 24 | // 25 | 26 | %module simuPOP_op 27 | 28 | #define OPTIMIZED 29 | %include "simuPOP_common.i" 30 | %pythoncode %{ 31 | defdict = _simuPOP_op.defdict 32 | %} 33 | -------------------------------------------------------------------------------- /src/simuPOP_la.i: -------------------------------------------------------------------------------- 1 | // 2 | // $File: simuPOP_la.i $ 3 | // $LastChangedDate$ 4 | // $Rev$ 5 | // 6 | // This file is part of simuPOP, a forward-time population genetics 7 | // simulation environment. Please visit https://github.com/BoPeng/simuPOP 8 | // for details. 9 | // 10 | // Copyright (C) 2004 - 2009 Bo Peng (Bo.Peng@bcm.edu) 11 | // 12 | // This program is free software: you can redistribute it and/or modify 13 | // it under the terms of the GNU General Public License as published by 14 | // the Free Software Foundation, either version 3 of the License, or 15 | // (at your option) any later version. 16 | // 17 | // This program is distributed in the hope that it will be useful, 18 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU General Public License 23 | // along with this program. If not, see . 24 | // 25 | 26 | %module simuPOP_la 27 | 28 | #define LONGALLELE 29 | 30 | %include "simuPOP_common.i" 31 | %pythoncode %{ 32 | defdict = _simuPOP_la.defdict 33 | %} 34 | -------------------------------------------------------------------------------- /docs/src/HaplodiploidGenoTransmitterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class HaplodiploidGenoTransmitter 3 | --------------------------------- 4 | 5 | .. class:: HaplodiploidGenoTransmitter 6 | 7 | A genotype transmitter (during-mating operator) for haplodiploid 8 | populations. The female parent is considered as diploid and the 9 | male parent is considered as haploid (only the first homologous 10 | copy is valid). If the offspring is ``FEMALE``, she will get a 11 | random copy of two homologous chromosomes of her mother, and get 12 | the only paternal copy from her father. If the offspring is 13 | ``MALE``, he will only get a set of chromosomes from his mother. 14 | 15 | 16 | .. method:: HaplodiploidGenoTransmitter(output="", begin=0, end=-1, step=1, at=[], reps=ALL_AVAIL, subPops=ALL_AVAIL, infoFields=[]) 17 | 18 | 19 | Create a haplodiploid genotype transmitter (during-mating 20 | operator) that transmit parental genotypes from parents to 21 | offspring in a haplodiploid population. Parameters *subPops* and 22 | *infoFields* are ignored. This operator also copies allelic 23 | lineage when it is executed in a module with lineage allele 24 | type. 25 | 26 | -------------------------------------------------------------------------------- /docs/src/simuPOPdemographyDemographicEventRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class DemographicEvent 3 | ---------------------- 4 | 5 | .. class:: DemographicEvent 6 | 7 | A demographic events that will be applied to one or more populations at 8 | specified generations. The interface of a DemographicEvent is very similar to 9 | an simuPOP operator, but the applicable parameters are handled so that 10 | the generations are relative to the demographic model, not the populations 11 | to which the event is applied. 12 | 13 | .. method:: DemographicEvent.DemographicEvent(ops=[], output='', begin=0, end=-1, step=1, at=[], reps=True, subPops=ALL_AVAIL, infoFields=[]) 14 | 15 | Create a demographic event that will be applied at specified 16 | generations according to applicability parameters ``reps``, ``begin``, 17 | ``end``, ``step`` and ``at``. Parameter ``subPops`` is usually used 18 | to specify the subpopulations affected by the event. One or more simuPOP 19 | operators, if specified in ``ops``, will be applied when the event 20 | happens. Parameters ``output`` and ``infoFields`` are currently ignored. 21 | 22 | .. method:: DemographicEvent.apply(pop) 23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/src/PyExecRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class PyExec 3 | ------------ 4 | 5 | .. class:: PyExec 6 | 7 | This operator executes given Python statements in a population's 8 | local namespace when it is applied to this population. 9 | 10 | 11 | .. method:: PyExec(stmts="", exposePop="", output=">", begin=0, end=-1, step=1, at=[], reps=ALL_AVAIL, subPops=Py_False, infoFields=[]) 12 | 13 | 14 | Create a :class:`PyExec` operator that executes statements 15 | *stmts* in a population's local namespace when it is applied to 16 | this population. This namespace can either be the population's 17 | local namespace (``pop.vars()``), or namespaces ``subPop[sp]`` 18 | for each (virtual) subpop (``pop.vars(subpop)``) in specified 19 | *subPops*. If *exposePop* is given, current population will be 20 | exposed in its local namespace as a variable named by 21 | *exposePop*. Although multiple statements can be executed, it is 22 | recommended that you use this operator to execute short 23 | statements and use :class:`PyOperator` for more complex once. 24 | Note that exposed population variables will be removed after the 25 | statements are executed. 26 | 27 | -------------------------------------------------------------------------------- /src/simuPOP_laop.i: -------------------------------------------------------------------------------- 1 | // 2 | // $File: simuPOP_laop.i $ 3 | // $LastChangedDate$ 4 | // $Rev$ 5 | // 6 | // This file is part of simuPOP, a forward-time population genetics 7 | // simulation environment. Please visit https://github.com/BoPeng/simuPOP 8 | // for details. 9 | // 10 | // Copyright (C) 2004 - 2009 Bo Peng (Bo.Peng@bcm.edu) 11 | // 12 | // This program is free software: you can redistribute it and/or modify 13 | // it under the terms of the GNU General Public License as published by 14 | // the Free Software Foundation, either version 3 of the License, or 15 | // (at your option) any later version. 16 | // 17 | // This program is distributed in the hope that it will be useful, 18 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU General Public License 23 | // along with this program. If not, see . 24 | // 25 | 26 | %module simuPOP_laop 27 | 28 | #define LONGALLELE 29 | #define OPTIMIZED 30 | %include "simuPOP_common.i" 31 | %pythoncode %{ 32 | defdict = _simuPOP_laop.defdict 33 | %} 34 | -------------------------------------------------------------------------------- /src/simuPOP_linop.i: -------------------------------------------------------------------------------- 1 | // 2 | // $File: simuPOP_linop.i $ 3 | // $LastChangedDate$ 4 | // $Rev$ 5 | // 6 | // This file is part of simuPOP, a forward-time population genetics 7 | // simulation environment. Please visit https://github.com/BoPeng/simuPOP 8 | // for details. 9 | // 10 | // Copyright (C) 2004 - 2009 Bo Peng (Bo.Peng@bcm.edu) 11 | // 12 | // This program is free software: you can redistribute it and/or modify 13 | // it under the terms of the GNU General Public License as published by 14 | // the Free Software Foundation, either version 3 of the License, or 15 | // (at your option) any later version. 16 | // 17 | // This program is distributed in the hope that it will be useful, 18 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU General Public License 23 | // along with this program. If not, see . 24 | // 25 | 26 | %module simuPOP_linop 27 | 28 | #define OPTIMIZED 29 | #define LINEAGE 30 | %include "simuPOP_common.i" 31 | %pythoncode %{ 32 | defdict = _simuPOP_linop.defdict 33 | %} 34 | -------------------------------------------------------------------------------- /gsl/cdf/chisq.c: -------------------------------------------------------------------------------- 1 | /* cdf/cdf_chisq.c 2 | * 3 | * Copyright (C) 2003, 2007 Brian Gough 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or (at 8 | * your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | double 25 | gsl_cdf_chisq_P (const double x, const double nu) 26 | { 27 | return gsl_cdf_gamma_P (x, nu / 2, 2.0); 28 | } 29 | 30 | double 31 | gsl_cdf_chisq_Q (const double x, const double nu) 32 | { 33 | return gsl_cdf_gamma_Q (x, nu / 2, 2.0); 34 | } 35 | -------------------------------------------------------------------------------- /src/simuPOP_baop.i: -------------------------------------------------------------------------------- 1 | // 2 | // $File: simuPOP_baop.i $ 3 | // $LastChangedDate$ 4 | // $Rev$ 5 | // 6 | // This file is part of simuPOP, a forward-time population genetics 7 | // simulation environment. Please visit https://github.com/BoPeng/simuPOP 8 | // for details. 9 | // 10 | // Copyright (C) 2004 - 2009 Bo Peng (Bo.Peng@bcm.edu) 11 | // 12 | // This program is free software: you can redistribute it and/or modify 13 | // it under the terms of the GNU General Public License as published by 14 | // the Free Software Foundation, either version 3 of the License, or 15 | // (at your option) any later version. 16 | // 17 | // This program is distributed in the hope that it will be useful, 18 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU General Public License 23 | // along with this program. If not, see . 24 | // 25 | 26 | %module simuPOP_baop 27 | 28 | #define BINARYALLELE 29 | #define OPTIMIZED 30 | 31 | %include "simuPOP_common.i" 32 | %pythoncode %{ 33 | defdict = _simuPOP_baop.defdict 34 | %} 35 | -------------------------------------------------------------------------------- /gsl/cdf/chisqinv.c: -------------------------------------------------------------------------------- 1 | /* cdf/chisqinv.c 2 | * 3 | * Copyright (C) 2003, 2007 Brian Gough 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or (at 8 | * your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | double 25 | gsl_cdf_chisq_Pinv (const double P, const double nu) 26 | { 27 | return gsl_cdf_gamma_Pinv (P, nu / 2, 2.0); 28 | } 29 | 30 | double 31 | gsl_cdf_chisq_Qinv (const double Q, const double nu) 32 | { 33 | return gsl_cdf_gamma_Qinv (Q, nu / 2, 2.0); 34 | } 35 | -------------------------------------------------------------------------------- /docs/src/simuPOPHermaphroditicMatingRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class HermaphroditicMating 3 | -------------------------- 4 | 5 | .. class:: HermaphroditicMating 6 | 7 | A hermaphroditic mating scheme that chooses two parents randomly 8 | from the population regardless of sex. The parents could be chosen 9 | with or without replacement (parameter *replacement*). Selfing (if 10 | the same parents are chosen) is allowed unless *allowSelfing* is 11 | set to *False* 12 | 13 | .. method:: HermaphroditicMating.HermaphroditicMating(replacement=True, allowSelfing=True, numOffspring=1, sexMode=RANDOM_SEX, ops=MendelianGenoTransmitter(), subPopSize=[], subPops=ALL_AVAIL, weight=0, selectionField='fitness') 14 | 15 | Creates a hermaphroditic mating scheme where individuals can 16 | serve as father or mother, or both (self-fertilization). Please 17 | refer to class :class:`CombinedParentsChooser` for parameter *allowSelfing``, 18 | to :class:`RandomParentChooser` for parameter *replacement* and 19 | *selectionField*, to class :class:`OffspringGenerator` for parameters *ops*, 20 | *sexMode* and *numOffspring*, and to class :class:`HomoMating` for parameters 21 | *subPopSize*, *subPops* and *weight*. 22 | 23 | -------------------------------------------------------------------------------- /src/simuPOP_mu.i: -------------------------------------------------------------------------------- 1 | // 2 | // $File: simuPOP_mu.i $ 3 | // $LastChangedDate: 2011-07-06 22:05:52 -0500 (Wed, 06 Jul 2011) $ 4 | // $Rev: 4253 $ 5 | // 6 | // This file is part of simuPOP, a forward-time population genetics 7 | // simulation environment. Please visit https://github.com/BoPeng/simuPOP 8 | // for details. 9 | // 10 | // Copyright (C) 2004 - 2009 Bo Peng (Bo.Peng@bcm.edu) 11 | // 12 | // This program is free software: you can redistribute it and/or modify 13 | // it under the terms of the GNU General Public License as published by 14 | // the Free Software Foundation, either version 3 of the License, or 15 | // (at your option) any later version. 16 | // 17 | // This program is distributed in the hope that it will be useful, 18 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU General Public License 23 | // along with this program. If not, see . 24 | // 25 | 26 | %module simuPOP_mu 27 | 28 | #define MUTANTALLELE 29 | %include "simuPOP_common.i" 30 | %pythoncode %{ 31 | defdict = _simuPOP_mu.defdict 32 | %} 33 | -------------------------------------------------------------------------------- /docs/src/RangeSplitterRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class RangeSplitter 3 | ------------------- 4 | 5 | .. class:: RangeSplitter 6 | 7 | This class defines a splitter that groups individuals in certain 8 | ranges into VSPs. 9 | 10 | 11 | .. method:: RangeSplitter(ranges, names=[]) 12 | 13 | 14 | Create a splitter according to a number of individual ranges 15 | defined in *ranges*. For example, ``RangeSplitter(ranges=[[0, 16 | 20], [40, 50]])`` defines two VSPs. The first VSP consists of 17 | individuals ``0``, ``1``, ..., ``19``, and the sceond VSP 18 | consists of individuals ``40``, ``41``, ..., ``49``. Note that a 19 | nested list has to be used even if only one range is defined. A 20 | default set of names are given to each VSP unless a new set of 21 | names is given by parameter *names*. 22 | 23 | 24 | .. method:: RangeSplitter.name(vsp) 25 | 26 | Return the name of VSP *vsp*, which is ``"Range [a, b)"`` where 27 | ``[a, b)`` is range ``ranges[vsp]``. A user specified name will 28 | be returned if specified. 29 | 30 | .. method:: RangeSplitter.numVirtualSubPop() 31 | 32 | Return the number of VSPs, which is the number of ranges defined 33 | in parameter *ranges*. 34 | -------------------------------------------------------------------------------- /docs/src/SummaryTaggerRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class SummaryTagger 3 | ------------------- 4 | 5 | .. class:: SummaryTagger 6 | 7 | A summary tagger summarize values of one or more parental 8 | information field to another information field of an offspring. If 9 | mating is sexual, two sets of parental values will be involved. 10 | 11 | 12 | .. method:: SummaryTagger(mode=MEAN, begin=0, end=-1, step=1, at=[], reps=ALL_AVAIL, subPops=ALL_AVAIL, output="", infoFields=[]) 13 | 14 | 15 | Creates a summary tagger that summarize values of one or more 16 | parental information field (*infoFields*[:-1]) to an offspring 17 | information field (*infoFields*[-1]). A parameter *mode* 18 | specifies how to pass summarize parental values. More 19 | specifically, 20 | 21 | + ``mode=MEAN`` Passing the average of values. 22 | 23 | + ``mode=MAXIMUM`` Passing the maximum value of values. 24 | 25 | + ``mode=Minumum`` Passing the minimum value of values. 26 | 27 | + ``mode=SUMMATION`` Passing the sum of values. 28 | 29 | + ``mode=MULTIPLICATION`` Passing the multiplication of values. 30 | 31 | This operator does not support parameter *subPops* and does not 32 | output any information. 33 | 34 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilsmigrHierarchicalIslandRatesRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function migrHierarchicalIslandRates 3 | ------------------------------------ 4 | 5 | 6 | .. function:: migrHierarchicalIslandRates(r1, r2, n) 7 | 8 | Return the migration rate matrix for a hierarchical island model 9 | where there are different migration rate within and across groups 10 | of islands. 11 | 12 | r1 13 | Within group migration rates. It can be a number or a list of numbers 14 | for each group of the islands. 15 | 16 | r2 17 | Across group migration rates which is the probability that someone will 18 | migrate to a subpopulation outside of his group. A list of r2 could be 19 | specified for each group of the islands. 20 | 21 | n 22 | Number of islands in each group. E.g. n=[5, 4] specifies two groups of 23 | islands with 5 and 4 islands each. 24 | 25 | For individuals in an island, the probability that it remains in the same 26 | island is 1-r1-r2 (r1, r2 might vary by island groups), that it migrates 27 | to another island in the same group is r1 and migrates to another island 28 | outside of the group is r2. migrate rate to a specific island depends on 29 | the size of group. 30 | -------------------------------------------------------------------------------- /docs/src/ConditionalMatingRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class ConditionalMating 3 | ----------------------- 4 | 5 | .. class:: ConditionalMating 6 | 7 | A conditional mating scheme that applies different mating schemes 8 | according to a condition (similar to operator IfElse). The 9 | condition can be a fixed condition, an expression or a user-defined 10 | function, to determine which mating scheme to be used. 11 | 12 | 13 | .. method:: ConditionalMating(cond, ifMatingScheme, elseMatingScheme) 14 | 15 | 16 | Create a conditional mating scheme that applies mating scheme 17 | *ifMatingScheme* if the condition *cond* is ``True``, or 18 | *elseMatingScheme* if *cond* is ``False``. If a Python 19 | expression (a string) is given to parameter *cond*, the 20 | expression will be evalulated in parental population's local 21 | namespace. When a Python function is specified, it accepts 22 | parameter ``pop`` for the parental population. The return value 23 | of this function should be ``True`` or ``False``. Otherwise, 24 | parameter *cond* will be treated as a fixed condition (converted 25 | to ``True`` or ``False``) upon which *ifMatingScheme* or 26 | *elseMatingScheme* will alway be applied. 27 | 28 | -------------------------------------------------------------------------------- /docs/src/MixedMutatorRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class MixedMutator 3 | ------------------ 4 | 5 | .. class:: MixedMutator 6 | 7 | This mixed mutator accepts a list of mutators and use one of them 8 | to mutate an allele when an mutation event happens. 9 | 10 | 11 | .. method:: MixedMutator(rates=[], loci=ALL_AVAIL, mutators=[], prob=[], mapIn=[], mapOut=[], context=0, output="", begin=0, end=-1, step=1, at=[], reps=ALL_AVAIL, subPops=ALL_AVAIL, infoFields=["ind_id"], lineageMode=FROM_INFO) 12 | 13 | 14 | Create a mutator that randomly chooses one of the specified 15 | *mutators* to mutate an allele when a mutation event happens. 16 | The mutators are choosen according to a list of probabilities 17 | (\parameter *prob*) that should add up to ``1``. The passed and 18 | returned alleles might be changed if parameters *mapIn* and 19 | *mapOut* are used. Most parameters, including *loci*, *mapIn*, 20 | *mapOut*, *rep*, and *subPops* of mutators specified in 21 | parameter *mutators* are ignored. This mutator by default 22 | applies to all loci unless parameter *loci* is specified. Please 23 | refer to classes ``mutator`` and :class:`BaseOperator` for 24 | descriptions of other parameters. 25 | 26 | -------------------------------------------------------------------------------- /docs/help.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # 4 | # $File: help.py $ 5 | # 6 | # This file is part of simuPOP, a forward-time population genetics 7 | # simulation environment. Please visit https://github.com/BoPeng/simuPOP 8 | # for details. 9 | # 10 | # Copyright (C) 2004 - 2010 Bo Peng (Bo.Peng@bcm.edu) 11 | # 12 | # This program is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 3 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # This program is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with this program. If not, see . 24 | # 25 | 26 | # This script is an example in the simuPOP user's guide. Please refer to 27 | # the user's guide (https://github.com/BoPeng/simuPOP/manual) for a detailed 28 | # description of this example. 29 | # 30 | 31 | import simuPOP as sim 32 | help(sim.Population.addInfoFields) 33 | -------------------------------------------------------------------------------- /docs/_sources/userGuide_ch2_sec6.rst.txt: -------------------------------------------------------------------------------- 1 | Other help sources 2 | ================== 3 | 4 | If you are new to Python, it is recommended that you borrow a Python book, or at 5 | least go through the following online Python tutorials: 6 | 7 | #. The Python tutorial (``http://docs.python.org/tut/tut.html``) 8 | 9 | #. Other online tutorials listed at ``http://www.python.org/doc/`` 10 | 11 | If you are new to simuPOP, please read this guide before you dive into *the 12 | simuPOP reference manual*, which describes all the details of simuPOP but does 13 | not show you how to use them. Both documents are available online at 14 | ``https://github.com/BoPeng/simuPOP`` in both searchable HTML format and PDF 15 | format. 16 | 17 | The simuPOP examples repository on GitHub (``https://github.com/BoPeng/simuPOP-examples``) 18 | has example scripts for various simulation scenarios. Please consider contributing 19 | to these examples if you have written some scripts that might be useful to others. 20 | 21 | If you cannot find the answer you need, or if you believe that you have 22 | encountered a bug, or if you would like to request a feature, please subscribe 23 | to the simuPOP mailinglist (``https://lists.sourceforge.net/lists/listinfo/simupop-list``) 24 | and send your questions there. 25 | -------------------------------------------------------------------------------- /src/simuPOP_muop.i: -------------------------------------------------------------------------------- 1 | // 2 | // $File: simuPOP_muop.i $ 3 | // $LastChangedDate: 2011-07-06 22:05:52 -0500 (Wed, 06 Jul 2011) $ 4 | // $Rev: 4253 $ 5 | // 6 | // This file is part of simuPOP, a forward-time population genetics 7 | // simulation environment. Please visit https://github.com/BoPeng/simuPOP 8 | // for details. 9 | // 10 | // Copyright (C) 2004 - 2009 Bo Peng (Bo.Peng@bcm.edu) 11 | // 12 | // This program is free software: you can redistribute it and/or modify 13 | // it under the terms of the GNU General Public License as published by 14 | // the Free Software Foundation, either version 3 of the License, or 15 | // (at your option) any later version. 16 | // 17 | // This program is distributed in the hope that it will be useful, 18 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU General Public License 23 | // along with this program. If not, see . 24 | // 25 | 26 | %module simuPOP_muop 27 | 28 | #define MUTANTALLELE 29 | #define OPTIMIZED 30 | 31 | %include "simuPOP_common.i" 32 | %pythoncode %{ 33 | defdict = _simuPOP_muop.defdict 34 | %} 35 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingdrawThreeGenFamilySampleRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function drawThreeGenFamilySample 3 | --------------------------------- 4 | 5 | 6 | .. function:: drawThreeGenFamilySample(pop, families, numOffspring, pedSize, numOfAffected=0, subPops=ALL_AVAIL, idField='ind_id', fatherField='father_id', motherField='mother_id') 7 | 8 | Draw three-generation families from a population. Such families consist 9 | of grant parents, their children, spouse of these children, and grand 10 | children. Number of offspring, total number of individuals, and total 11 | number of affected individuals in a pedigree should be specified using 12 | parameters ``numOffspring``, ``pedSize`` and ``numOfAffected``, which can all 13 | be a single number, or a range ``[a, b]`` (``b`` is incldued). If a single 14 | ``families`` is given, Pedigrees are drawn randomly from the whole 15 | Population or from specified (virtual) subpopulations (parameter 16 | ``subPops``). Otherwise, a list of numbers should be used to specify 17 | numbers of families from each subpopulation, which can be all 18 | subpopulations if ``subPops=ALL_AVAIL`` (default), or from each of the 19 | specified (virtual) subpopulations. This function returns a population that 20 | contains extracted individuals. 21 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilssimulateForwardTrajectoryRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function simulateForwardTrajectory 3 | ---------------------------------- 4 | 5 | 6 | .. function:: simulateForwardTrajectory(N, beginGen, endGen, beginFreq, endFreq, nLoci=1, fitness=None, maxAttempts=10000, logger=None) 7 | 8 | Given a demographic model (*N*) and the fitness of genotype at one or 9 | more loci (*fitness*), this function simulates a trajectory of one or more 10 | unlinked loci (*nLoci*) from allele frequency *freq* at generation 11 | *beginGen* forward in time, until it reaches generation *endGen*. A 12 | ``Trajectory`` object will be returned if the allele frequency falls 13 | into specified ranges (*endFreq*). ``None`` will be returned if no valid 14 | Trajectory is simulated after ``maxAttempts`` attempts. Please refer to 15 | class ``Trajectory``, ``TrajectorySimulator`` and their member functions 16 | for more details about allowed input for these parameters. If a *logger* 17 | object is given, it will send detailed debug information at ``DEBUG`` 18 | level and ending allele frequencies at the ``INFO`` level. The latter 19 | can be used to adjust your fitness model and/or ending allele frequency 20 | if a trajectory is difficult to obtain because of parameter mismatch. 21 | -------------------------------------------------------------------------------- /docs/src/SequentialParentChooserRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class SequentialParentChooser 3 | ----------------------------- 4 | 5 | .. class:: SequentialParentChooser 6 | 7 | This parent chooser chooses a parent from a parental (virtual) 8 | subpopulation sequentially. Natural selection is not considered. If 9 | the last parent is reached, this parent chooser will restart from 10 | the beginning of the (virtual) subpopulation. 11 | 12 | 13 | .. method:: SequentialParentChooser(sexChoice=ANY_SEX) 14 | 15 | 16 | Create a parent chooser that chooses a parent from a parental 17 | (virtual) subpopulation sequentially. Parameter *choice* can be 18 | ``ANY_SEX`` (default), ``MALE_ONLY`` and ``FEMALE_ONLY``. In the 19 | latter two cases, only male or female individuals are selected. 20 | A :class:`RuntimeError` will be raised if there is no male or 21 | female individual from the population. 22 | 23 | 24 | .. method:: SequentialParentChooser.chooseParents() 25 | 26 | Return chosen parents from a population if the parent chooser 27 | object is created with a population. 28 | 29 | .. method:: SequentialParentChooser.initialize(pop, subPop) 30 | 31 | Initialize a parent chooser for subpopulation *subPop* of 32 | *population* pop. 33 | -------------------------------------------------------------------------------- /gsl/cdf/exponentialinv.c: -------------------------------------------------------------------------------- 1 | /* cdf/exponentialinv.c 2 | * 3 | * Copyright (C) 2003, 2007 Brian Gough 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or (at 8 | * your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | double 26 | gsl_cdf_exponential_Pinv (const double P, const double mu) 27 | { 28 | double x = -mu * log1p (-P); 29 | 30 | return x; 31 | } 32 | 33 | double 34 | gsl_cdf_exponential_Qinv (const double Q, const double mu) 35 | { 36 | double x = -mu * log (Q); 37 | 38 | return x; 39 | } 40 | -------------------------------------------------------------------------------- /docs/src/simuPOPutilssimulateBackwardTrajectoryRef.ref: -------------------------------------------------------------------------------- 1 | 2 | Function simulateBackwardTrajectory 3 | ----------------------------------- 4 | 5 | 6 | .. function:: simulateBackwardTrajectory(N, endGen, endFreq, nLoci=1, fitness=None, minMutAge=None, maxMutAge=None, maxAttempts=1000, logger=None) 7 | 8 | Given a demographic model (*N*) and the fitness of genotype at one or 9 | more loci (*fitness*), this function simulates a trajectory of one or more 10 | unlinked loci (*nLoci*) from allele frequency *freq* at generation *endGen* 11 | backward in time, until all alleles get lost. A ``Trajectory`` object will 12 | be returned if the length of simulated Trajectory with ``minMutAge`` and 13 | ``maxMutAge`` (if specified). ``None`` will be returned if no valid 14 | Trajectory is simulated after ``maxAttempts`` attempts. Please refer to 15 | class ``Trajectory``, ``TrajectorySimulator`` and their member functions 16 | for more details about allowed input for these parameters. If a *logger* 17 | object is given, it will send detailed debug information at ``DEBUG`` 18 | level and ending generation and frequency at the ``INFO`` level. The latter 19 | can be used to adjust your fitness model and/or ending allele frequency 20 | if a trajectory is difficult to obtain because of parameter mismatch. 21 | -------------------------------------------------------------------------------- /docs/src/PointMutatorRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class PointMutator 3 | ------------------ 4 | 5 | .. class:: PointMutator 6 | 7 | A point mutator is different from all other mutators because 8 | mutations in this mutator do not happen randomly. Instead, it 9 | happens to specific loci and mutate an allele to a specific state, 10 | regardless of its original state. This mutator is usually used to 11 | introduce a mutant to a population. 12 | 13 | 14 | .. method:: PointMutator(loci, allele, ploidy=0, inds=[], output="", begin=0, end=-1, step=1, at=[], reps=ALL_AVAIL, subPops=0, infoFields=["ind_id"], lineageMode=FROM_INFO) 15 | 16 | 17 | Create a point mutator that mutates alleles at specified *loci* 18 | to a given *allele* of individuals *inds*. If there are multiple 19 | alleles at a locus (e.g. individuals in a diploid population), 20 | only the first allele is mutated unless indexes of alleles are 21 | listed in parameter *ploidy*. This operator is by default 22 | applied to individuals in the first subpopulation but you can 23 | apply it to a different or more than one (virtual) 24 | subpopulations using parameter *subPops* (``AllAvail`` is also 25 | accepted). Please refer to class :class:`BaseOperator` for 26 | detailed descriptions of other parameters. 27 | 28 | -------------------------------------------------------------------------------- /gsl/gsl_types.h: -------------------------------------------------------------------------------- 1 | /* gsl_types.h 2 | * 3 | * Copyright (C) 2001, 2007 Brian Gough 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or (at 8 | * your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef __GSL_TYPES_H__ 21 | #define __GSL_TYPES_H__ 22 | 23 | #ifndef GSL_VAR 24 | 25 | #ifdef WIN32 26 | # ifdef GSL_DLL 27 | # ifdef DLL_EXPORT 28 | # define GSL_VAR extern __declspec(dllexport) 29 | # else 30 | # define GSL_VAR extern __declspec(dllimport) 31 | # endif 32 | # else 33 | # define GSL_VAR extern 34 | # endif 35 | #else 36 | # define GSL_VAR extern 37 | #endif 38 | 39 | #endif 40 | 41 | #endif /* __GSL_TYPES_H__ */ 42 | -------------------------------------------------------------------------------- /docs/standard.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # 4 | # $File: standard.py $ 5 | # 6 | # This file is part of simuPOP, a forward-time population genetics 7 | # simulation environment. Please visit https://github.com/BoPeng/simuPOP 8 | # for details. 9 | # 10 | # Copyright (C) 2004 - 2010 Bo Peng (Bo.Peng@bcm.edu) 11 | # 12 | # This program is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 3 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # This program is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with this program. If not, see . 24 | # 25 | 26 | # This script is an example in the simuPOP user's guide. Please refer to 27 | # the user's guide (https://github.com/BoPeng/simuPOP/manual) for a detailed 28 | # description of this example. 29 | # 30 | 31 | import simuPOP as sim 32 | pop = sim.Population(10, loci=2) 33 | pop.locusPos(10) 34 | pop.individual(20).setAllele(1, 0) 35 | -------------------------------------------------------------------------------- /.github/workflows/python-app.yml: -------------------------------------------------------------------------------- 1 | # This workflow will install Python dependencies and run tests 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python 3 | 4 | name: SimuPOP 5 | 6 | on: 7 | push: 8 | branches: [ "master" ] 9 | pull_request: 10 | branches: [ "master" ] 11 | 12 | permissions: 13 | contents: read 14 | 15 | jobs: 16 | build: 17 | runs-on: ubuntu-latest 18 | timeout-minutes: 60 19 | strategy: 20 | fail-fast: false 21 | matrix: 22 | python-version: ["3.9", "3.10", "3.11", "3.12"] 23 | 24 | steps: 25 | - uses: actions/checkout@v4 26 | - name: Set up Python ${{ matrix.python-version }} 27 | uses: actions/setup-python@v4 28 | with: 29 | python-version: ${{ matrix.python-version }} 30 | cache: 'pip' 31 | # - name: Install boost 32 | # run: | 33 | # sudo apt-get install libboost1.74-all-dev 34 | # ln -s /usr/include/boost/ ./boost_1_74_0 35 | - name: Install dependencies 36 | run: | 37 | python -m pip install --upgrade pip 38 | pip install -r requirements.txt 39 | - name: Install simuPOP 40 | run: python setup.py install 41 | - name: Run tests 42 | run: python ./test/run_tests.py 43 | -------------------------------------------------------------------------------- /docs/src/InitSexRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class InitSex 3 | ------------- 4 | 5 | .. class:: InitSex 6 | 7 | This operator initializes sex of individuals, either randomly or 8 | use a list of sexes. 9 | 10 | 11 | .. method:: InitSex(maleFreq=0.5, maleProp=-1, sex=[], begin=0, end=-1, step=1, at=[], reps=ALL_AVAIL, subPops=ALL_AVAIL, infoFields=[]) 12 | 13 | 14 | Create an operator that initializes individual sex to ``MALE`` 15 | or ``FEMALE``. By default, it assigns sex to individuals 16 | randomly, with equal probability of having a male or a female. 17 | This probabability can be adjusted through parameter *maleFreq* 18 | or be made to exact proportions by specifying parameter 19 | *maleProp*. Alternatively, a fixed sequence of sexes can be 20 | assigned. For example, if ``sex=[MALE, FEMALE]``, individuals 21 | will be assigned ``MALE`` and ``FEMALE`` successively. Parameter 22 | *maleFreq* or *maleProp* are ignored if *sex* is given. If a 23 | list of (virtual) subpopulation is specified in parameter 24 | *subPop*, only individuals in these subpopulations will be 25 | initialized. Note that the *sex* sequence, if used, is assigned 26 | repeatedly regardless of (virtual) subpopulation boundaries so 27 | that you can assign *sex* to all individuals in a population. 28 | 29 | -------------------------------------------------------------------------------- /docs/src/KAlleleMutatorRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class KAlleleMutator 3 | -------------------- 4 | 5 | .. class:: KAlleleMutator 6 | 7 | This mutator implements a *k-allele* mutation model that assumes 8 | *k* allelic states (alleles 0, 1, 2, ..., *k-1*) at each locus. 9 | When a mutation event happens, it mutates an allele to any other 10 | states with equal probability. 11 | 12 | 13 | .. method:: KAlleleMutator(k, rates=[], loci=ALL_AVAIL, mapIn=[], mapOut=[], output="", begin=0, end=-1, step=1, at=[], reps=ALL_AVAIL, subPops=ALL_AVAIL, infoFields=["ind_id"], lineageMode=FROM_INFO) 14 | 15 | 16 | Create a k-allele mutator that mutates alleles to one of the 17 | other ``k-1`` alleles with equal probability. This mutator by 18 | default applies to all loci unless parameter *loci* is 19 | specified. A single mutation rate will be used for all loci if a 20 | single value of parameter *rates* is given. Otherwise, a list of 21 | mutation rates can be specified for each locus in parameter 22 | *loci*. If the mutated allele is larger than or equal to ``k``, 23 | it will not be mutated. A warning message will be displayed if 24 | debugging code ``DBG_WARNING`` is turned on. Please refer to 25 | classes ``mutator`` and :class:`BaseOperator` for descriptions 26 | of other parameters. 27 | 28 | -------------------------------------------------------------------------------- /gsl/specfunc/chebyshev.h: -------------------------------------------------------------------------------- 1 | /* specfunc/chebyshev.h 2 | * 3 | * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or (at 8 | * your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | /* data for a Chebyshev series over a given interval */ 21 | 22 | struct cheb_series_struct { 23 | double * c; /* coefficients */ 24 | int order; /* order of expansion */ 25 | double a; /* lower interval point */ 26 | double b; /* upper interval point */ 27 | int order_sp; /* effective single precision order */ 28 | }; 29 | typedef struct cheb_series_struct cheb_series; 30 | 31 | 32 | -------------------------------------------------------------------------------- /docs/src/PyTaggerRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class PyTagger 3 | -------------- 4 | 5 | .. class:: PyTagger 6 | 7 | A Python tagger takes some information fields from both parents, 8 | pass them to a user provided Python function and set the offspring 9 | individual fields with the return values. 10 | 11 | 12 | .. method:: PyTagger(func=None, begin=0, end=-1, step=1, at=[], reps=ALL_AVAIL, subPops=ALL_AVAIL, output="", infoFields=[]) 13 | 14 | 15 | Create a hybrid tagger that provides an user provided function 16 | *func* with values of specified information fields (determined 17 | by parameter names of this function) of parents and assign 18 | corresponding information fields of offspring with its return 19 | value. If more than one parent are available, maternal values 20 | are passed after paternal values. For example, if a function 21 | ``func(A, B)`` is passed, this operator will send two tuples 22 | with parental values of information fields ``'A'`` and ``'B'`` 23 | to this function and assign its return values to fields ``'A'`` 24 | and ``'B'`` of each offspring. The return value of this function 25 | should be a list, although a single value will be accepted if 26 | only one information field is specified. This operator ignores 27 | parameters *stage*, *output* and *subPops*. 28 | 29 | -------------------------------------------------------------------------------- /docs/src/TerminateIfRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class TerminateIf 3 | ----------------- 4 | 5 | .. class:: TerminateIf 6 | 7 | This operator evaluates an expression in a population's local 8 | namespace and terminate the evolution of this population, or the 9 | whole simulator, if the return value of this expression is 10 | ``True``. Termination caused by an operator will stop the execution 11 | of all operators after it. The generation at which the population 12 | is terminated will be counted in the *evolved generations* (return 13 | value from ``Simulator::evolve``) if termination happens after 14 | mating. 15 | 16 | 17 | .. method:: TerminateIf(condition="", stopAll=False, message="", output="", begin=0, end=-1, step=1, at=[], reps=ALL_AVAIL, subPops=ALL_AVAIL, infoFields=[]) 18 | 19 | 20 | Create a terminator with an expression *condition*, which will 21 | be evalulated in a population's local namespace when the 22 | operator is applied to this population. If the return value of 23 | *condition* is ``True``, the evolution of the population will be 24 | terminated. If *stopAll* is set to ``True``, the evolution of 25 | all replicates of the simulator will be terminated. If this 26 | operator is allowed to write to an *output* (default to ""), the 27 | generation number, proceeded with an optional *message*. 28 | 29 | -------------------------------------------------------------------------------- /docs/src/simuPOPsamplingCombinedSamplerRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class CombinedSampler 3 | --------------------- 4 | 5 | .. class:: CombinedSampler 6 | 7 | A combined sampler accepts a list of sampler objects, draw samples and 8 | combine the returned sample into a single population. An id field is 9 | required to use this sampler, which will be used to remove extra copies of 10 | individuals who have been drawn by different samplers. 11 | 12 | .. method:: CombinedSampler.CombinedSampler(samplers=[], idField='ind_id') 13 | 14 | samplers 15 | A list of samplers 16 | 17 | .. method:: CombinedSampler.drawSample(pop) 18 | 19 | Draw and return a sample. 20 | 21 | .. method:: CombinedSampler.drawSamples(pop, numOfSamples) 22 | 23 | Draw multiple samples and return a list of populations. 24 | 25 | .. method:: CombinedSampler.prepareSample(pop, rearrange) 26 | 27 | Prepare passed population object for sampling according to parameter 28 | ``subPops``. If samples are drawn from the whole population, a 29 | Population will be trimmed if only selected (virtual) subpopulations 30 | are used. If samples are drawn separately from specified subpopulations, 31 | Population ``pop`` will be rearranged (if ``rearrange==True``) so that 32 | each subpoulation corresponds to one element in parameter ``subPops``. 33 | 34 | -------------------------------------------------------------------------------- /docs/src/userGuide_ch2_sec6.rst: -------------------------------------------------------------------------------- 1 | Other help sources 2 | ================== 3 | 4 | If you are new to Python, it is recommended that you borrow a Python book, or at 5 | least go through the following online Python tutorials: 6 | 7 | #. The Python tutorial (``http://docs.python.org/tut/tut.html``) 8 | 9 | #. Other online tutorials listed at ``http://www.python.org/doc/`` 10 | 11 | If you are new to simuPOP, please read this guide before you dive into *the 12 | simuPOP reference manual*, which describes all the details of simuPOP but does 13 | not show you how to use them. Both documents are available online at 14 | ``https://github.com/BoPeng/simuPOP`` in both searchable HTML format and PDF 15 | format. 16 | 17 | A *simuPOP online cookbook* (``https://github.com/BoPeng/simuPOP``/``cookbook``) is 18 | a wiki-based website where you can browse and download examples, functions and 19 | scripts for various simulation scenarios, and upload your own code snippets for 20 | the benefit of all simuPOP users. Please consider contributing to this cookbook 21 | if you have written some scripts that might be useful to others. 22 | 23 | If you cannot find the answer you need, or if you believe that you have 24 | encountered a bug, or if you would like to request a feature, please subscribe 25 | to the simuPOP mailinglist (``simupop-list@lists.sourceforge.net``) and send 26 | your questions there. 27 | -------------------------------------------------------------------------------- /docs/haplodiploid.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # 4 | # $File: haplodiploid.py $ 5 | # 6 | # This file is part of simuPOP, a forward-time population genetics 7 | # simulation environment. Please visit https://github.com/BoPeng/simuPOP 8 | # for details. 9 | # 10 | # Copyright (C) 2004 - 2010 Bo Peng (Bo.Peng@bcm.edu) 11 | # 12 | # This program is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 3 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # This program is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with this program. If not, see . 24 | # 25 | 26 | # This script is an example in the simuPOP user's guide. Please refer to 27 | # the user's guide (https://github.com/BoPeng/simuPOP/manual) for a detailed 28 | # description of this example. 29 | # 30 | 31 | import simuPOP as sim 32 | pop = sim.Population(size=[2,5], ploidy=sim.HAPLODIPLOID, loci=[3, 5]) 33 | sim.initGenotype(pop, freq=[0.3, 0.7]) 34 | sim.dump(pop) 35 | -------------------------------------------------------------------------------- /docs/src/simuPOPAcgtMutatorRef.ref: -------------------------------------------------------------------------------- 1 | 2 | class AcgtMutator 3 | ----------------- 4 | 5 | .. class:: AcgtMutator 6 | 7 | This mutation operator assumes alleles 0, 1, 2, 3 as nucleotides ``A``, 8 | ``C``, ``G`` and ``T`` and use a 4 by 4 mutation rate matrix to mutate them. 9 | Although a general model needs 12 parameters, less parameters are needed 10 | for specific nucleotide mutation models (parameter ``model``). The length 11 | and meaning of parameter ``rate`` is model dependent. 12 | 13 | .. method:: AcgtMutator.AcgtMutator(rate=[], model='general', loci=True, mapIn=[], mapOut=[], output='', begin=0, end=-1, step=1, at=[], reps=True, subPops=ALL_AVAIL, infoFields=['ind_id'], lineageMode=115) 14 | 15 | Create a mutation model that mutates between nucleotides ``A``, 16 | ``C``, ``G``, and ``T`` (alleles are coded in that order as 0, 1, 2 17 | and 3). Currently supported models are Jukes and Cantor 1969 model 18 | (``JC69``), Kimura's 2-parameter model (``K80``), Felsenstein 1981 19 | model (``F81``), Hasgawa, Kishino and Yano 1985 model (``HKY85``), 20 | Tamura 1992 model (``T92``), Tamura and Nei 1993 model (``TN93``), 21 | Generalized time reversible model (``GTR``), and a general model 22 | (``general``) with 12 parameters. Please refer to the simuPOP user's 23 | guide for detailed information about each model. 24 | 25 | --------------------------------------------------------------------------------