geonomics


Namegeonomics JSON
Version 1.3.14 PyPI version JSON
download
home_pagehttps://github.com/drewhart/geonomics
SummaryA package for landscape genomic simulation
upload_time2024-03-06 02:08:46
maintainer
docs_urlNone
authorDrew Ellison Hart
requires_python>=3.6
license
keywords landscape genomics genetics ecology evolution simulation model environmental model agent-based
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            *********
Geonomics
*********

.. image:: ./img/gnx_mini_350dpi.png
   :width: 250
   :align: left

A Python package for simulation of genomic evolution on complex and dynamic landscapes 
         
 
**Geonomics** allows users to build and run arbitrarily complex, forward-time,
agent-based, and spatially explicit simulations for landscape genomics. It is
designed to allow even novice Python users to create sophisticated simulations with
minimal code, while also allowing advanced users a high level of extensibility
and customizability.

We will continue to expand and add functionality in future versions. Please
contact us with questions, suggestions, or requests!


Main Features
-------------
The following is a short list of highlights. For the full monty, please see
the `homepage <https://github.com/drewhart/geonomics>`_,
the `docs <https://geonomics.readthedocs.org>`_,
and the `original methods paper <PAPER_URL_HERE>`_.

    - a model object, which serves as the primary user interface and which
      contains all other model components
    - a landscape object consisting of an arbitrary number of environmental
      raster layers
    - a community object consisting of an arbitrary number of species objects,
      each consisting of an arbitrary number of individuals
    - an optional genomic-architecture object, upon which individuals' genomes
      are based
    - spatialized logistic growth regulating local population densities
    - the capability to model realistic movement and offspring dispersal
      across conductance surfaces
    - neutral and non-neutral evolution capabilities, with spatially contingent
      selection
    - demographic- and environmental-change capabilities
    - the capability to run an arbitrary number of iterations of a model
    - the capability to sample data and a variety of statistics at any desired
      timesteps during a model run
    - numerous visualization methods to aid in model design, exploration,
      analysis, and presentation


Installation
------------

Geonomics can be installed with `pip`:

.. code-block:: python

    pip install geonomics


Quickstart
----------
For impatient beginners, the following code will run Geonomics' default model::

  >>> import geonomics as gnx
  >>> mod = gnx.run_default_model(delete_params_file=False)

This will build and run **geonomics**' default model, return its `Model` object
as `mod`, and leave its parameters file in your current working directory under
the name 'GNX_default_model_params.py'.

For patient folks, the following diagrams should provide more insight, and the
`documentation <https://geonomics.readthedocs.org>`_
provides full details.


Details
-------

Procedural Diagram
~~~~~~~~~~~~~~~~~~

.. image:: ./img/procedural_diagram.jpg

Users can run Geonomics models in as few as three steps.

1. **Create and edit a parameters file**: After importing geonomics as `gnx`,
   users can run the function `gnx.make_parameters_file()` function, feeding in
   a series of arguments to indicate the desired number and type of landscape layers,
   number and parameterization of species, data and statistics to be recorded, and parameters
   file name. Users can then edit the default parameter values in the resulting file to parameterize
   their model. Within the parameters file, they have the option of referencing external files
   to be used by their model, including static raster files or directories of raster time series, as well
   as a CSV file defining a custom genomic architecture.

2. **Use the parameters file to create a model**: After setting up their parameters file, users can
   call the `gnx.make_model()` function, providing their parameters file's name as an argument. This
   will create a new `gnx.Model` object, containing a `gnx.Landscape` with the defined number of layers,
   and a `gnx.Community` with the defined number of species composed of starting individuals. The landscape,
   species, and individuals will all be described by a number of characteristics, in accordance with the values
   defined in the parameters file.

3. **Run the model**: Users can then call the model's `mod.run` or `mod.walk` methods, to either run their model
   to completion or run it manually for some number of time steps. Each time step will include, as applicable,
   movement, mating, mortality, environmental and demographic change, and data-writing operations. For more detail
   on these operations, see the conceptual diagram that follows.

Conceptual Diagram
~~~~~~~~~~~~~~~~~~

.. image:: ./img/conceptual_diagram.jpg

Operations during the main phase of a Geonomics model run. In the center is a
species on a multi-layer landscape that includes a selection layer (above) and
a movement and carrying capacity layer (below). Surrounding the landscape is a
flow-diagram of the major operations during a time step. Operations in dashed
boxes are optional.

- **movement**: During the movement stages (top-left), individuals move
  along movement vectors drawn from various distribution options.

- **mating**: During the mating stage (top-right), an individual (purple outline) randomly
  chooses a mate (green outline) from all potential mates within its mating radius
  (dashed circle). The resulting offspring (dashed outline)  disperses from its
  parents' midpoint along a randomly drawn dispersal vector.

- **mortality**: During the mortality stage (bottom-right), deaths are modeled as a Bernoulli
  process, with the probability of mortality being a product of density-dependence
  and selection on all traits.

- **changes**: During the changes stage (bottom-left), demographic change events
  (not pictured) and environmental change events (represented as a
  series of change rasters corresponding to scheduled time steps,
  t1, t2, …, tn), take place.

------------------------------------------------------------------

Attribution
***********

This package was written by Drew Ellison Terasaki Hart, as part of his PhD work.
It is available to freely distribute and modify, with proper
attribution, under the MIT License. Should you have any questons or
concerns, please feel free to get in touch! (drew <dot> hart <at> berkeley <dot> edu)

Should you use Geonomics for research, education, or any other purpose, please
cite as:

       Terasaki Hart, D.E., Bishop, A.P., Wang, I.J. 2021. Geonomics:
       forward-time, spatially explicit, and arbitrarily complex
       landscape genomic simulations. Manuscript submitted for publication.


   
.. code-block:: python
         
       .                  .   ::::::          :::    :: :::::::::::.           .
                    .::::::    ::::   :::      ::    :: :: ::::::::::: ::.                 .
    .      .     .:::::::::     ::            ::   :::::::::::::::::::::::::.        .   
               .::::::::::                      :::::::::: :::::: ::::::::  ::.
         .   .  : ::::  ::                    ::::  : ::    :::::::: : ::  :    .      .
            . 55555 :3333: 00000   44   44   00000   44   44 111111  66666 55555 .
           . 55     33    00   00  444  44  00   00  44   44   11   66     55     .         .
 .         . 55     33   00     00 44 4 44 00     00 444 444   11   66     555555 .
           . 55 555 3333 00     00 44  444 00     00 44 4 44   11   66         55 .
           . 55   5 33    00   00  44   44  00   00  44   44   11   66        555 .     .
            . 55555 :3333: 00000   44   44   00000   44   44 111111  66666 55555 .         .
      .      .    : ::::::::               :::::::::: ::              ::  :   : .
     .         .:    :::::                    :::::: :::             :::::::  .      .
  .              .    :::                      :::::  ::              ::::: .              . 
           .        .  ::                      ::::                      .
                          . ::                                     .                .


-------------------------------------------------------

Disclaimer
----------
**Geonomics** claims no affiliation with the philosophy and economic ideology
`Georgism <https://en.wikipedia.org/wiki/Georgism>`_, sometimes referred to as
'geonomics'.

Rather, it is a portmanteau of **geo**\graphy and ge\ **nomics**.
We thought it sounded neat, and found it delightfully confusing.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/drewhart/geonomics",
    "name": "geonomics",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "landscape genomics genetics ecology evolution simulation model environmental model agent-based",
    "author": "Drew Ellison Hart",
    "author_email": "drew.ellison.hart@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b6/fe/5e9f645c905e65405885bd1294bc8b4dd31643db62daa435185e081d2dc3/geonomics-1.3.14.tar.gz",
    "platform": null,
    "description": "*********\nGeonomics\n*********\n\n.. image:: ./img/gnx_mini_350dpi.png\n   :width: 250\n   :align: left\n\nA Python package for simulation of genomic evolution on complex and dynamic landscapes \n         \n \n**Geonomics** allows users to build and run arbitrarily complex, forward-time,\nagent-based, and spatially explicit simulations for landscape genomics. It is\ndesigned to allow even novice Python users to create sophisticated simulations with\nminimal code, while also allowing advanced users a high level of extensibility\nand customizability.\n\nWe will continue to expand and add functionality in future versions. Please\ncontact us with questions, suggestions, or requests!\n\n\nMain Features\n-------------\nThe following is a short list of highlights. For the full monty, please see\nthe `homepage <https://github.com/drewhart/geonomics>`_,\nthe `docs <https://geonomics.readthedocs.org>`_,\nand the `original methods paper <PAPER_URL_HERE>`_.\n\n    - a model object, which serves as the primary user interface and which\n      contains all other model components\n    - a landscape object consisting of an arbitrary number of environmental\n      raster layers\n    - a community object consisting of an arbitrary number of species objects,\n      each consisting of an arbitrary number of individuals\n    - an optional genomic-architecture object, upon which individuals' genomes\n      are based\n    - spatialized logistic growth regulating local population densities\n    - the capability to model realistic movement and offspring dispersal\n      across conductance surfaces\n    - neutral and non-neutral evolution capabilities, with spatially contingent\n      selection\n    - demographic- and environmental-change capabilities\n    - the capability to run an arbitrary number of iterations of a model\n    - the capability to sample data and a variety of statistics at any desired\n      timesteps during a model run\n    - numerous visualization methods to aid in model design, exploration,\n      analysis, and presentation\n\n\nInstallation\n------------\n\nGeonomics can be installed with `pip`:\n\n.. code-block:: python\n\n    pip install geonomics\n\n\nQuickstart\n----------\nFor impatient beginners, the following code will run Geonomics' default model::\n\n  >>> import geonomics as gnx\n  >>> mod = gnx.run_default_model(delete_params_file=False)\n\nThis will build and run **geonomics**' default model, return its `Model` object\nas `mod`, and leave its parameters file in your current working directory under\nthe name 'GNX_default_model_params.py'.\n\nFor patient folks, the following diagrams should provide more insight, and the\n`documentation <https://geonomics.readthedocs.org>`_\nprovides full details.\n\n\nDetails\n-------\n\nProcedural Diagram\n~~~~~~~~~~~~~~~~~~\n\n.. image:: ./img/procedural_diagram.jpg\n\nUsers can run Geonomics models in as few as three steps.\n\n1. **Create and edit a parameters file**: After importing geonomics as `gnx`,\n   users can run the function `gnx.make_parameters_file()` function, feeding in\n   a series of arguments to indicate the desired number and type of landscape layers,\n   number and parameterization of species, data and statistics to be recorded, and parameters\n   file name. Users can then edit the default parameter values in the resulting file to parameterize\n   their model. Within the parameters file, they have the option of referencing external files\n   to be used by their model, including static raster files or directories of raster time series, as well\n   as a CSV file defining a custom genomic architecture.\n\n2. **Use the parameters file to create a model**: After setting up their parameters file, users can\n   call the `gnx.make_model()` function, providing their parameters file's name as an argument. This\n   will create a new `gnx.Model` object, containing a `gnx.Landscape` with the defined number of layers,\n   and a `gnx.Community` with the defined number of species composed of starting individuals. The landscape,\n   species, and individuals will all be described by a number of characteristics, in accordance with the values\n   defined in the parameters file.\n\n3. **Run the model**: Users can then call the model's `mod.run` or `mod.walk` methods, to either run their model\n   to completion or run it manually for some number of time steps. Each time step will include, as applicable,\n   movement, mating, mortality, environmental and demographic change, and data-writing operations. For more detail\n   on these operations, see the conceptual diagram that follows.\n\nConceptual Diagram\n~~~~~~~~~~~~~~~~~~\n\n.. image:: ./img/conceptual_diagram.jpg\n\nOperations during the main phase of a Geonomics model run. In the center is a\nspecies on a multi-layer landscape that includes a selection layer (above) and\na movement and carrying capacity layer (below). Surrounding the landscape is a\nflow-diagram of the major operations during a time step. Operations in dashed\nboxes are optional.\n\n- **movement**: During the movement stages (top-left), individuals move\n  along movement vectors drawn from various distribution options.\n\n- **mating**: During the mating stage (top-right), an individual (purple outline) randomly\n  chooses a mate (green outline) from all potential mates within its mating radius\n  (dashed circle). The resulting offspring (dashed outline)  disperses from its\n  parents' midpoint along a randomly drawn dispersal vector.\n\n- **mortality**: During the mortality stage (bottom-right), deaths are modeled as a Bernoulli\n  process, with the probability of mortality being a product of density-dependence\n  and selection on all traits.\n\n- **changes**: During the changes stage (bottom-left), demographic change events\n  (not pictured) and environmental change events (represented as a\n  series of change rasters corresponding to scheduled time steps,\n  t1, t2, \u2026, tn), take place.\n\n------------------------------------------------------------------\n\nAttribution\n***********\n\nThis package was written by Drew Ellison Terasaki Hart, as part of his PhD work.\nIt is available to freely distribute and modify, with proper\nattribution, under the MIT License. Should you have any questons or\nconcerns, please feel free to get in touch! (drew <dot> hart <at> berkeley <dot> edu)\n\nShould you use Geonomics for research, education, or any other purpose, please\ncite as:\n\n       Terasaki Hart, D.E., Bishop, A.P., Wang, I.J. 2021. Geonomics:\n       forward-time, spatially explicit, and arbitrarily complex\n       landscape genomic simulations. Manuscript submitted for publication.\n\n\n   \n.. code-block:: python\n         \n       .                  .   ::::::          :::    :: :::::::::::.           .\n                    .::::::    ::::   :::      ::    :: :: ::::::::::: ::.                 .\n    .      .     .:::::::::     ::            ::   :::::::::::::::::::::::::.        .   \n               .::::::::::                      :::::::::: :::::: ::::::::  ::.\n         .   .  : ::::  ::                    ::::  : ::    :::::::: : ::  :    .      .\n            . 55555 :3333: 00000   44   44   00000   44   44 111111  66666 55555 .\n           . 55     33    00   00  444  44  00   00  44   44   11   66     55     .         .\n .         . 55     33   00     00 44 4 44 00     00 444 444   11   66     555555 .\n           . 55 555 3333 00     00 44  444 00     00 44 4 44   11   66         55 .\n           . 55   5 33    00   00  44   44  00   00  44   44   11   66        555 .     .\n            . 55555 :3333: 00000   44   44   00000   44   44 111111  66666 55555 .         .\n      .      .    : ::::::::               :::::::::: ::              ::  :   : .\n     .         .:    :::::                    :::::: :::             :::::::  .      .\n  .              .    :::                      :::::  ::              ::::: .              . \n           .        .  ::                      ::::                      .\n                          . ::                                     .                .\n\n\n-------------------------------------------------------\n\nDisclaimer\n----------\n**Geonomics** claims no affiliation with the philosophy and economic ideology\n`Georgism <https://en.wikipedia.org/wiki/Georgism>`_, sometimes referred to as\n'geonomics'.\n\nRather, it is a portmanteau of **geo**\\graphy and ge\\ **nomics**.\nWe thought it sounded neat, and found it delightfully confusing.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A package for landscape genomic simulation",
    "version": "1.3.14",
    "project_urls": {
        "Documentation": "https://htmlpreview.github.io/?https://github.com/drewhart/geonomics/blob/master/doc/built/doc.html",
        "Download": "https://github.com/drewhart/geonomics/archive/1.3.14.tar.gz",
        "Homepage": "https://github.com/drewhart/geonomics",
        "Source": "https://github.com/drewhart/geonomics"
    },
    "split_keywords": [
        "landscape",
        "genomics",
        "genetics",
        "ecology",
        "evolution",
        "simulation",
        "model",
        "environmental",
        "model",
        "agent-based"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5521923b784911dade6f9dfaaebdc34110d3d9f09e58822ef08b4ef9dd4a5ec0",
                "md5": "6838f9d20ebe48a9feaa436da1127ef0",
                "sha256": "97a64ca3179294fa0587c2c5f9265461e3185f74663f525c2c45e1bfbbe9710b"
            },
            "downloads": -1,
            "filename": "geonomics-1.3.14-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6838f9d20ebe48a9feaa436da1127ef0",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.6",
            "size": 3435310,
            "upload_time": "2024-03-06T02:08:41",
            "upload_time_iso_8601": "2024-03-06T02:08:41.028735Z",
            "url": "https://files.pythonhosted.org/packages/55/21/923b784911dade6f9dfaaebdc34110d3d9f09e58822ef08b4ef9dd4a5ec0/geonomics-1.3.14-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b6fe5e9f645c905e65405885bd1294bc8b4dd31643db62daa435185e081d2dc3",
                "md5": "b9ec95dc252d5b8e6eb0b4e851f711d9",
                "sha256": "ad9b31da01f884e8a59555e4585ba4921376d82521f17f691804ba7b10f25c27"
            },
            "downloads": -1,
            "filename": "geonomics-1.3.14.tar.gz",
            "has_sig": false,
            "md5_digest": "b9ec95dc252d5b8e6eb0b4e851f711d9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 3401252,
            "upload_time": "2024-03-06T02:08:46",
            "upload_time_iso_8601": "2024-03-06T02:08:46.738490Z",
            "url": "https://files.pythonhosted.org/packages/b6/fe/5e9f645c905e65405885bd1294bc8b4dd31643db62daa435185e081d2dc3/geonomics-1.3.14.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-06 02:08:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "drewhart",
    "github_project": "geonomics",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "geonomics"
}
        
Elapsed time: 0.25572s