{"id":38471128,"url":"https://github.com/border-lab/xftsim","last_synced_at":"2026-04-25T00:01:43.609Z","repository":{"id":156592681,"uuid":"609983929","full_name":"border-lab/xftsim","owner":"border-lab","description":"eXtensible Forward Time SIMulator for complex phenogenetic architectures","archived":false,"fork":false,"pushed_at":"2026-04-22T16:56:34.000Z","size":58593,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-22T18:38:05.773Z","etag":null,"topics":["simulation","statistical-genetics"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/border-lab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-05T20:08:25.000Z","updated_at":"2026-03-23T00:45:33.000Z","dependencies_parsed_at":"2025-05-28T16:15:33.058Z","dependency_job_id":null,"html_url":"https://github.com/border-lab/xftsim","commit_stats":null,"previous_names":["border-lab/xftsim"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/border-lab/xftsim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/border-lab%2Fxftsim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/border-lab%2Fxftsim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/border-lab%2Fxftsim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/border-lab%2Fxftsim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/border-lab","download_url":"https://codeload.github.com/border-lab/xftsim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/border-lab%2Fxftsim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32245151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["simulation","statistical-genetics"],"created_at":"2026-01-17T05:07:23.688Z","updated_at":"2026-04-25T00:01:43.604Z","avatar_url":"https://github.com/border-lab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"./xftsimlogo.svg\" width=\"20%\"\u003e \n\n[![Documentation Status](https://readthedocs.org/projects/xftsim/badge/?version=latest)](https://xftsim.readthedocs.io/en/latest/?badge=latest) [![PyPI version](https://badge.fury.io/py/xftsim.svg)](https://badge.fury.io/py/xftsim)\n\n# eXtensible Forward Time SIMulator\n`xftsim` simulates complex phenotype/genotype data with an emphasis on short timescale phenomena. `xftsim` is designed with two primary goals:\n\n - make it easy for statistical geneticists to perform reproducible and systematic sensitivity analyses to better understand limitations and assumptions\n\n - enable evaulation of methods for analyzing complex traits under realistically complex generative models\n\n## Installation\n\n`xftsim` is on PyPI. It can be installed in a couple minutes using pip and conda:\n\n```bash\nconda create --name xftsim python=3.9.6\nconda activate xftsim\npip install xftsim\n```\n\nAlternatively, you can install the latest development version from github:\n\n```bash\ngit clone https://github/rborder/xftsim\ncd xftsim\ngit checkout dev\npip -e . install\n```\n\nTo enable full functionality (i.e., automatic generation of causal diagrams), you must install [pygraphviz](https://pygraphviz.github.io).\n\n`xftsim` has been tested on MacOS 13.4 and the following GNU/Linux distributions: Ubuntu 22.04, Ubuntu 24.04, PopOS 22.04, and RHEL 7 using Python version 3.9.6. \n\n\u003cdetails\u003e\n\u003csummary\u003e`xftsim` depends on the following packages...\u003c/summary\u003e\n \n```\nasciitree==0.3.3\nattrs==23.2.0\ncattrs==23.2.3\ncertifi==2023.11.17\ncffi==1.17.1\ncharset-normalizer==3.3.2\nchembl-webresource-client==0.10.9\nclick==8.1.7\ncloudpickle==3.1.0\ncontourpy==1.2.0\ncsrgraph==0.1.28\ncycler==0.12.1\ndask==2024.8.0\ndask-expr==1.1.10\ndask-glm==0.3.2\ndask-ml==2024.4.4\nDeprecated==1.2.14\ndistributed==2024.8.0\neasydict==1.13\nexceptiongroup==1.2.0\nfasteners==0.19\nfonttools==4.46.0\nfsspec==2024.10.0\nfuncy==2.0\ngensim==4.3.2\nidna==3.6\nimportlib-metadata==8.5.0\nimportlib-resources==6.1.1\niniconfig==2.0.0\njinja2==3.1.4\njoblib==1.3.2\nkiwisolver==1.4.5\nllvmlite==0.39.1\nlocket==1.0.0\nMarkupSafe==3.0.2\nmatplotlib==3.8.2\nmsgpack==1.1.0\nmultipledispatch==1.0.0\nnetworkx==2.8.8\nnode2vec==0.4.6\nnodevectors==0.1.23\nnptyping==2.5.0\nnumba==0.56.4\nnumcodecs==0.12.1\nnumpy==1.23.5\npackaging==23.2\npandas==2.1.4\npandas-plink==2.2.9\npartd==1.4.2\nPillow==10.1.0\nplatformdirs==4.2.0\npluggy==1.5.0\npsutil==6.1.0\npyarrow==18.0.0\npycparser==2.22\npyparsing==3.1.1\npytest==8.3.3\npython-dateutil==2.8.2\npytz==2023.3.post1\nPyYAML==6.0.2\nrdkit==2023.9.5\nrequests==2.31.0\nrequests-cache==1.2.0\nscikit-learn==1.3.2\nscipy==1.11.4\nseaborn==0.13.0\nsgkit==0.9.0\nsix==1.16.0\nsmart-open==7.0.1\nsortedcontainers==2.4.0\nsparse==0.15.4\ntblib==3.0.0\nthreadpoolctl==3.2.0\ntomli==2.0.2\ntoolz==1.0.0\ntornado==6.4.1\ntqdm==4.66.2\ntyping-extensions==4.10.0\ntzdata==2023.3\nurl-normalize==1.4.3\nurllib3==2.1.0\nwrapt==1.16.0\nxarray==2024.7.0\nxftsim==0.2.0\nzarr==2.18.2\nzict==3.0.0\nzipp==3.20.2\nzstandard==0.23.0\n```\n\u003c/details\u003e\n\n## Getting started\n\nTo get started, [check out the documentation](https://xftsim.readthedocs.io)!\n\nFor a minimal test simulation you can run one of the built in demos (runtime \u003c 1min):\n```python3\nimport warnings\nwarnings.simplefilter(action='ignore', category=FutureWarning)\n\nimport xftsim as xft\n\ndemo = xft.sim.DemoSimulation('BGRM')\ndemo.run(3)\n\nxft.utils.print_tree(demo.results)\n```\n\n## Notice\n\n`xftsim` is under active development. Please let us know if there are features missing or bugs!\n\n\u003c!-- \n## Quickstart: simulating bivariate cross-assortative mating\n\nHere we simulate \n\n\n```python\n\nimport xftsim as xft\nimport numpy as np\n\nN = 8000\nM = 4000\npnames = ['height', 'wealth', 'eduyears']\nh2 = np.array([.6,.0,.0])\n\n\nfounder_haplotypes = xft.founders.founder_haplotypes_uniform_AFs(n = N, \n                                                                 m = M)\n\ngenetic_effects = xft.effect.AdditiveEffects(beta = np.hstack(list(map(lambda x: np.random.normal(0, x, (M,1)), np.sqrt(h2)))),\n                                             phenotype_name = pnames,\n                                             vid = founder_haplotypes.vid,\n                                             AF = founder_haplotypes.xft.af_empirical,\n                                             standardized=True,\n                                             scaled=True,\n                                             m_causal=M)\n\narch_genetic = xft.arch.AdditiveGeneticComponent(beta = genetic_effects)\narch_noise = xft.arch.AdditiveNoiseComponent(variances=[.4, 1/3, 1/3], \n                                             phenotype_name=pnames)\narch_sum = xft.arch.SumComponent(pnames, sum_components=['additiveGenetic', 'additiveNoise'])\n\n\n\n\namr = xft.mate.LinearAssortativeMatingRegime(r = .3, \n                                             component_index = xft.index.ComponentIndex_from_product(pnames,\n                                              ['phenotype'],\n                                              [-1]),\n                                             offspring_per_pair=xft.utils.ZeroTruncatedPoissonCount(2))\n\nrmap = xft.reproduce.RecombinationMap(p=.25,\n                                      vid=founder_haplotypes.vid,\n                                      chrom=founder_haplotypes.chrom)\n\nsim = xft.sim.Simulation(founder_haplotypes = founder_haplotypes,\n                         mating_regime = amr,\n                         recombination_map = rmap,\n                         architecture=xft.arch.Architecture([arch_genetic, arch_noise, arch_sum]),\n                         statistics = [xft.stats.MatingStatistics(),\n                                       xft.stats.SampleStatistics(),\n                                       xft.stats.HasemanElstonEstimator(),\n                                       ],  \n                         post_processors = [lambda sim: print(sim.results['mating_statistics']),\n                                            xft.proc.LimitMemory(n_haplotype_generations=2)],\n                         reproduction_method=xft.reproduce.Meiosis)\n\n```\n\n\n\n\n\n --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborder-lab%2Fxftsim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborder-lab%2Fxftsim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborder-lab%2Fxftsim/lists"}