pypop-genomics

PyPop: Python for Population Genomics

https://github.com/alexlancaster/pypop

Science Score: 77.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 12 DOI reference(s) in README
  • Academic publication links
    Links to: frontiersin.org, zenodo.org
  • Committers with academic emails
    6 of 18 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.1%) to scientific vocabulary

Keywords

bioinformatics evolutionary-biology free-software open-source population-genomics

Keywords from Contributors

energy-system-model meshes energy-system transformation parallel particle distributed hydrology quantum-circuits systematic-literature-review
Last synced: 6 months ago · JSON representation ·

Repository

PyPop: Python for Population Genomics

Basic Info
  • Host: GitHub
  • Owner: alexlancaster
  • License: gpl-2.0
  • Language: Python
  • Default Branch: main
  • Homepage: http://pypop.org/
  • Size: 70.7 MB
Statistics
  • Stars: 25
  • Watchers: 8
  • Forks: 14
  • Open Issues: 12
  • Releases: 0
Topics
bioinformatics evolutionary-biology free-software open-source population-genomics
Created over 12 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Security Authors

README.rst

|PyPI version shields.io| |Build status| |Pre-commit| |Website pypop.org| |GitHub license| |Citations| |DOI|

PyPop: Python for Population Genomics
=====================================

PyPop is a framework for processing genotype and allele data and
running population genetic analyses, including conformity to
Hardy-Weinberg expectations; tests for balancing or directional
selection; estimates of haplotype frequencies and measures and tests
of significance for linkage disequilibrium (LD). Full documentation is
available in the `PyPop User Guide `__.

How to cite PyPop
=================

.. _guide-include-pypop-cite-start:

If you write a paper that uses PyPop in your analysis, please cite
**both**:

* our `2024 article
  `__
  in *Frontiers in Immunology*:

      Lancaster AK, Single RM, Mack SJ, Sochat V, Mariani MP, Webster
      GD. (2024) "PyPop: A mature open-source software pipeline for
      population genomics."  *Front. Immunol.* **15**:1378512 doi:
      `10.3389/fimmu.2024.1378512
      `__

* **and** a citation to the `Zenodo record
  `__ which includes a DOI for
  the version of the software you used in your analyses. Citing this
  record and DOI supports reproducibility by allowing researchers to
  to determine the exact version of PyPop used in any particular
  analysis. In addition, it allows retrieval of long-term software
  source-code archives, independent of the original developers.

  Here's how to cite the correct version:

  * If you have PyPop version 1.1.2 or later, currently installed, you
    can run:

    .. code-block:: shell

       pypop --citation

    which outputs the Zenodo record citation in the simple "APA"
    format (you can also choose from BibTeX, EndNote, RIS and other
    formats, see the section on `command-line interfaces
    `_
    in the *User Guide* for more details).

  * If you do not have PyPop installed, have a release of PyPop
    earlier than 1.1.2, or otherwise want to obtain the DOI and
    citation for specific versions, follow these steps:

    1) First visit the DOI for the overall Zenodo record:
       `10.5281/zenodo.10080667
       `__. This DOI
       represents **all versions**, and will always resolve to the
       latest one.

    2) When you are viewing the record, look for the **Versions** box
       in the right-sidebar. Here are listed all versions (including
       older versions).

    3) Select and click the version-specific DOI that matches the
       specific version of PyPop that you used for your analysis.

    4) Once you are visiting the Zenodo record for the specific version,
       under the **Citation** box in the right-sidebar, select the
       citation format you wish to use and click to copy the citation.
       It will contain link to the version-specific DOI, and be of the
       form:

         Lancaster, AK et al. (YYYY) "PyPop: Python for Population
         Genomics" (Version X.Y.Z) [Computer
         software]. Zenodo. https://doi.org/10.5281/zenodo.XXXXX

  Note that citation metadata for the current Zenodo record is also
  stored in `CITATION.cff
  `__

.. _guide-include-pypop-cite-end:

.. _guide-include-start:

.. ATTENTION::

   The package name for installation purposes is |pkgname| - to avoid
   conflicting with an unrelated package with the name ``pypop``
   already on `PyPI `__.

Quickstart Guide
================

**Installing** |pkgname|

If you already have Python and ``pip`` installed, install using the following:

.. code-block:: shell

   pip install pypop-genomics

Otherwise, follow `these instructions `_ to install Python 3 and pip.

Once |pkgname| is installed, depending on your platform, you may also
need to `adjust `_ your ``PATH``
environment variable.

**Upgrading** |pkgname|

.. code-block:: shell

   pip install -U pypop-genomics

**Uninstalling** |pkgname|

.. code-block:: shell

   pip uninstall pypop-genomics

**For more, including handling common installation issues, see the** `detailed installation instructions`_ **.**

Once you have installed |pkgname|, you can move on to try some
`example runs `__.


.. _guide_readme_examples:

Examples
========

These are examples of how to check that the program is installed and
some minimal use cases.

Checking version and installation
---------------------------------

.. code-block:: shell

   pypop --version

This simply reports the version number and other information about
PyPop, and indirectly checks that the program is installed. If all is
well, you should see something like:

.. code-block:: text

   pypop 1.0.0
   [Python 3.10.9 | Linux.x86_64-x86_64 | x86_64]
   Copyright (C) 2003-2006 Regents of the University of California.
   Copyright (C) 2007-2023 PyPop team.
   This is free software.  There is NO warranty; not even for
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

You can also run ``pypop --help`` to see a full list and explanation
of all the options available.

Run a minimal dataset:
----------------------

Download test ``.ini`` and ``.pop`` files: `minimal.ini
`_
and `USAFEL-UchiTelle-small.pop
`_.
You can then run them

.. code-block:: shell

   pypop -c  minimal.ini USAFEL-UchiTelle-small.pop

If you have already cloned the git repository and it is your working
directory, you can simply run

.. code-block:: shell

   pypop -c  tests/data/minimal.ini tests/data/USAFEL-UchiTelle-small.pop


This will generate the following two files, an XML output file and a
plain text version:

::

   USAFEL-UchiTelle-small-out.xml
   USAFEL-UchiTelle-small-out.txt


Detailed installation instructions
==================================

There are three main steps:

1. install Python and ``pip``
2. install package from PyPI
3. adjusting your ``PATH`` variable after installation


Install Python 3 and ``pip``
----------------------------

A full description of installing Python and ``pip`` on your system is
beyond the scope of this guide, we recommend starting here:

   https://wiki.python.org/moin/BeginnersGuide/Download

Here are some additional platform-specific notes that may be helpful:

- Most Linux distributions come with Python 3 preinstalled. On most
  modern systems, ``pip`` and ``python`` will default to Python 3.

- MacOS 10.9 (Jaguar) up until 12.3 (Catalina), used to ship with
  Python 2 pre-installed, but it now has to be manually installed.
  See the `MacOS quick-start guide
  `__ in the official
  documentation for how to install Python 3. (Note that if Python is
  installed on Mac via the MacOS developer tools, it may include the
  version ``3`` suffix on commands, e.g. ``python3`` and ``pip3``, so
  modify the below, accordingly).

- For Windows, see also the `Windows quick-start guide
  `__ in the official
  documentation. Running ``python`` in the Windows command terminal
  in Windows 11 and later will launch the installer for the
  Microsoft-maintained Windows package of Python 3.

Install package from PyPI
-------------------------

Once you have both python and ``pip`` installed, you can use ``pip``
to install pre-compiled binary "wheels" of |pkgname|
directly from  `PyPI `__.

.. code-block:: shell

   pip install pypop-genomics

.. note::

   If, for whatever reason, you cannot use the these binaries
   (e.g. the pre-compiled binaries are not available for your
   platform), you may need to follow the `developer installation
   instructions `_ in the contributors
   guide.

**Upgrade an existing PyPop installation**

To update an existing installation to a newer version, use the same
command as above, but add the ``--upgrade`` (short version: ``-U``)
flag, i.e.

.. code-block:: shell

   pip install -U pypop-genomics

**Installing from Test PyPI**

From time to time, we may make available packages on the `Test PyPI
`__ instance, rather than the through the main
instance. The above installation and updating instructions can be
used, by appending the following:

.. code-block:: shell

   --extra-index-url https://test.pypi.org/simple/

to the above ``pip`` commands.

**Issues with installation permission**

By default, ``pip`` will attempt to install the |pkgname|
package wherever the current Python installation is installed.  This
location may be a user-specific virtual environment (like ``conda``,
see below), or a system-wide installation. On many Unix-based systems,
Python will generally already be pre-installed in a "system-wide"
location (e.g. under ``/usr/lib``) which is read-only for regular
users. (This can also be true for system-installed versions of Python
on Windows and MacOS.)

When ``pip install`` cannot install in a read-only system-wide
location , ``pip`` will gracefully "fall-back" to installing just for
you in your home directory (typically ``~/.local/lib/python``
where ```` is the version number of your current Python). In
general, this is what is wanted, so the above instructions are
normally sufficient.

However, you can also explicitly set installation to be in the user
directory, by adding the ``--user`` command-line option to the ``pip install``
command, i.e.:

.. code-block:: shell

   pip install pypop-genomics --user

This may be necessary in certain cases where ``pip install`` doesn't
install into the expected user directory.

.. admonition:: Installing within a ``conda`` environment

   In the special case that you installing from within an activated
   user-specific ``conda`` virtual environment that provides Python,
   then you should **not** add the ``--user`` because it will install
   it in ``~/.local/lib/`` rather than under the user-specific conda
   virtual environment in ``~/.conda/envs/``.

Post-install ``PATH`` adjustments
---------------------------------

You may need to adjust the ``PATH`` settings (especially on Windows)
for the ``pypop`` scripts to be visible when run from your console
application, without having to supply the full path to the ``pypop``
executable file.

.. warning::

   Pay close attention to the "WARNINGS" that are shown during the
   ``pip`` installation, they will often note which directories need to
   be added to the ``PATH``.

- On Linux and MacOS, systems this is normally fairly simple and only
  requires edit of the shell ``.profile``, or similar and addition of
  the ``$HOME/.local/bin`` to the ``PATH`` variable, followed by a
  restart of the terminal.

- For Windows, however, as noted in most online `instructions
  `_, this may need
  additional help from your system administrator if your user doesn't
  have the right permissions, and also require a system reboot.

Uninstalling PyPop
------------------

To uninstall the current version of |pkgname|:

.. code-block:: shell

   pip uninstall pypop-genomics



Support and development
=======================

Please submit any bug reports, feature requests or questions, via our
GitHub issue tracker (see our `bug reporting guidelines
`_
for more details on how to file a good bug report):

   https://github.com/alexlancaster/pypop/issues

**Please do not report bugs via private email to developers.**

The development of the code for PyPop is via our GitHub project:

   https://github.com/alexlancaster/pypop

.. _guide-include-end:

For a detailed description on bug reporting as well as how to
contribute to PyPop, please consult our `CONTRIBUTING.rst
`_
guide. For reporting security vulnerabilities visit `SECURITY.md
`__.

We also have additional notes and background relevant for developers
in `DEV_NOTES.md
`__. Source
for the website and the documentation is located in the `website
`__
subdirectory.

Copyright and License
=====================

PyPop is Copyright (C) 2003-2006. The Regents of the University of
California (Regents)

Copyright (C) 2007-2023 PyPop team.

PyPop is distributed under the terms of GPLv2


.. |pkgname| replace:: ``pypop-genomics``

.. |PyPI version fury.io| image:: https://badge.fury.io/py/pypop-genomics.svg
   :target: https://pypi.python.org/pypi/pypop-genomics/

.. |PyPI version shields.io| image:: https://img.shields.io/pypi/v/pypop-genomics.svg
   :target: https://pypi.python.org/pypi/pypop-genomics/

.. |PyPI pyversions| image:: https://img.shields.io/pypi/pyversions/pypop-genomics.svg
   :target: https://pypi.python.org/pypi/pypop-genomics/

.. |GitHub release| image:: https://img.shields.io/github/release/alexlancaster/pypop.svg
   :target: https://github.com/alexlancaster/pypop/releases/

.. |Build status| image:: https://github.com/alexlancaster/pypop/actions/workflows/build_wheels.yml/badge.svg?branch=main
   :target: https://github.com/alexlancaster/pypop/actions/workflows/build_wheels.yml

.. |GitHub license| image:: https://img.shields.io/github/license/alexlancaster/pypop.svg
   :target: https://github.com/alexlancaster/pypop/blob/main/LICENSE

.. |GitHub issues| image:: https://img.shields.io/github/issues/alexlancaster/pypop.svg
   :target: https://github.com/alexlancaster/pypop/issues

.. |Citations| image:: https://api.juleskreuer.eu/citation-badge.php?doi=10.1111/j.1399-0039.2006.00769.x
   :target: https://juleskreuer.eu/projekte/citation-badge/

.. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.10080667.svg
   :target: https://doi.org/10.5281/zenodo.10080667

.. |GitHub version| image:: https://badge.fury.io/gh/alexlancaster%2Fpypop.svg
   :target: https://github.com/alexlancaster/pypop/

.. |GitHub tag| image:: https://img.shields.io/github/tag/alexlancaster/pypop.svg
   :target: https://github.com/alexlancaster/pypop/tags/

.. |Website pypop.org| image:: https://img.shields.io/website-up-down-green-red/http/pypop.org.svg
   :target: http://pypop.org/

.. |Pre-commit| image:: https://results.pre-commit.ci/badge/github/alexlancaster/pypop/main.svg
   :target: https://results.pre-commit.ci/latest/github/alexlancaster/pypop/main
   :alt: pre-commit.ci status

Owner

  • Name: Alex Lancaster
  • Login: alexlancaster
  • Kind: user
  • Location: Boston
  • Company: @amberbiology

biology: evol, sys, comp // complex systems: agent-based models, netsci // open science // open research

Citation (CITATION.cff)

cff-version: 1.3.0
message: >-
  If you use this software, please cite both the software itself, as well as the
  article Lancaster AK et al. (2024) <a
  href="https://doi.org/10.3389/fimmu.2024.1378512">PyPop: A mature open-source
  software pipeline for population genomics</a>. <i>Front. Immunol.</i>
  <b>15</b>:1378512. doi: 10.3389/fimmu.2024.1378512
abstract: >-
  <p>PyPop for Population Genomics (<a href="http://pypop.org/">PyPop</a>) is a
  Python program for processing genotype and allele data and running population
  genetic analyses, including conformity to Hardy-Weinberg expectations; tests
  for balancing or directional selection; estimates of haplotype frequencies and
  measures and tests of significance for linkage disequilibrium
  (LD).&nbsp;Output of analyses are stored in XML format for maximum downstream
  flexibility. PyPop also has an internal facility for additionally aggregating
  the output XML and generating output tab-separated values (TSV) files, as well
  as default plain text files for each population. Although it can be run on any
  kind of genotype data, it has additional support for analyzing population
  genotype with allelic nomenclature from the human leukocyte antigen (HLA)
  region.</p>
authors:
  - family-names: Lancaster
    given-names: Alexander K.
    orcid: https://orcid.org/0000-0002-0002-9263
    affiliation:
      - Amber Biology LLC
      - name: Institute for Globally Distributed Open Research and Education
        ror: https://ror.org/01643wd06
  - family-names: Nelson
    given-names: Mark P.
    affiliation:
      - name: University of California, Berkeley
        ror: https://ror.org/01an7q238
  - family-names: Single
    given-names: Richard
    orcid: https://orcid.org/0000-0001-6054-6505
    affiliation:
      - name: University of Vermont
        ror: https://ror.org/0155zta11
  - family-names: Solberg
    given-names: Owen
    orcid: https://orcid.org/0000-0003-3060-9709
  - family-names: Tsai
    given-names: Yingsu
    affiliation:
      - name: University of California, Berkeley
        ror: https://ror.org/01an7q238
    orcid: https://orcid.org/0009-0006-0162-6066
  - family-names: Meyer
    given-names: Diogo
    orcid: https://orcid.org/0000-0002-7155-5674
    affiliation:
      - name: University of São Paulo
        ror: https://ror.org/036rp1748
  - family-names: Webster
    given-names: Gordon
    affiliation:
      - name: Amber Biology LLC
      - name: Ronin Institute
        ror: https://ror.org/04awze035
    orcid: https://orcid.org/0009-0009-2862-0467
  - family-names: Mariani
    given-names: Michael P.
    orcid: https://orcid.org/0000-0001-5852-0517
    affiliation:
      - name: Mariani Systems LLC
      - name: University of Vermont
        ror: https://ror.org/0155zta11
  - family-names: Sochat
    given-names: Vanessa
    orcid: https://orcid.org/0000-0002-4387-3819
    affiliation:
      - name: Lawrence Livermore National Laboratory
        ror: https://ror.org/041nk4h53
  - family-names: Kornel
    given-names: Karl
    orcid: https://orcid.org/0000-0001-5847-5330
    affiliation: Stanford Research Computing Center
  - family-names: Spaaks
    given-names: Jurriaan H.
    orcid: https://orcid.org/0000-0002-7064-4069
    affiliation:
      - name: Netherlands eScience Center
        ror: https://ror.org/00rbjv475
  - family-names: Mack
    given-names: Steven J.
    orcid: https://orcid.org/0000-0001-9820-9547
    affiliation:
      - name: University of California, San Francisco
        ror: https://ror.org/043mz5j54
  - family-names: Thomson
    given-names: Glenys
    orcid: https://orcid.org/0000-0001-5235-4159
    affiliation:
      - name: University of California, Berkeley
        ror: https://ror.org/01an7q238
title: 'PyPop: Python for Population Genomics'
repository-artifact: https://pypi.org/project/pypop-genomics/
repository-code: https://github.com/alexlancaster/pypop/
license: GPL-2.0-or-later
version: v1.2.2
type: software
url: http://pypop.org/
identifiers:
  - description: PyPop homepage
    type: url
    value: http://pypop.org/
    relation: IsSupplementedBy
  - description: PyPop documentation
    type: url
    value: http://pypop.org/docs
    relation: IsDocumentedBy
  - description: Previous Tissue Antigens (2007) publication
    type: doi
    value: 10.1111/j.1399-0039.2006.00769.x
    relation: Continues
  - description: Preprint version of TA (2007) publication
    type: url
    value: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4369784
    relation: Continues
  - description: GitHub tag for repository
    type: url
    value: https://github.com/alexlancaster/pypop/tree/v1.2.2
    relation: IsSupplementTo
  - description: PyPI package
    type: url
    value: https://pypi.org/project/pypop-genomics/1.2.2
    relation: IsSourceOf
  - description: DOI concept identifier for all versions of PyPop
    type: doi
    value: 10.5281/zenodo.10080667
    relation: IsVersionOf
keywords:
  - population genetics
  - population genomics
  - bioinformatics
  - computational biology
  - evolutionary biology
  - Human leukocyte antigen
  - Major histocompatibility complex
  - HLA
  - MHC
doi: 10.5281/zenodo.16555858

GitHub Events

Total
  • Create event: 94
  • Issues event: 5
  • Release event: 30
  • Watch event: 2
  • Delete event: 88
  • Issue comment event: 18
  • Push event: 987
  • Pull request review event: 44
  • Pull request event: 142
Last Year
  • Create event: 94
  • Issues event: 5
  • Release event: 30
  • Watch event: 2
  • Delete event: 88
  • Issue comment event: 18
  • Push event: 987
  • Pull request review event: 44
  • Pull request event: 142

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 2,607
  • Total Committers: 18
  • Avg Commits per committer: 144.833
  • Development Distribution Score (DDS): 0.153
Past Year
  • Commits: 123
  • Committers: 5
  • Avg Commits per committer: 24.6
  • Development Distribution Score (DDS): 0.447
Top Committers
Name Email Commits
Alex Lancaster a****l@b****u 2,209
Mark P. Nelson m****n@a****u 99
Owen Solberg o****g@g****m 60
dependabot[bot] 4****] 58
rsingle r****e@u****u 47
rsingle r****e@u****u 37
A. Karl Kornel a****l@s****u 29
pre-commit-ci[bot] 6****] 17
Yingsu Tsai y****i@g****m 13
Diogo Meyer d****o@i****r 9
ci-pypop u****e 8
zenodraft/action 8
Gordon Webster g****r@g****m 6
Michael P Mariani PhD 3****3 2
vsoch v****t@s****u 2
Steven Mack s****k@c****g 1
Kristie Mather k****r@e****t 1
Alex Lancaster a****t 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 44
  • Total pull requests: 307
  • Average time to close issues: about 2 years
  • Average time to close pull requests: 10 days
  • Total issue authors: 8
  • Total pull request authors: 8
  • Average comments per issue: 6.05
  • Average comments per pull request: 0.34
  • Merged pull requests: 277
  • Bot issues: 0
  • Bot pull requests: 155
Past Year
  • Issues: 3
  • Pull requests: 145
  • Average time to close issues: 3 days
  • Average time to close pull requests: about 19 hours
  • Issue authors: 2
  • Pull request authors: 3
  • Average comments per issue: 3.0
  • Average comments per pull request: 0.1
  • Merged pull requests: 131
  • Bot issues: 0
  • Bot pull requests: 95
Top Authors
Issue Authors
  • alexlancaster (21)
  • sjmack (12)
  • nabil161289 (4)
  • odoublewen (3)
  • LCreary (2)
  • vanihla5 (1)
  • afadda91 (1)
  • samuelkyobe (1)
Pull Request Authors
  • alexlancaster (146)
  • dependabot[bot] (117)
  • pre-commit-ci[bot] (48)
  • rsingle (7)
  • vsoch (1)
  • akkornel (1)
  • gwebster (1)
  • odoublewen (1)
Top Labels
Issue Labels
enhancement (19) bug (17) documentation (6) question (4) installation (3) obsolete (3) duplicate (1) github_actions (1) internal (1)
Pull Request Labels
dependencies (121) github_actions (79) python (63) documentation (50) skip-changelog (47) enhancement (42) bug (35) internal (28) installation (4)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 5,834 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 32
  • Total maintainers: 1
  • Total advisories: 1
pypi.org: pypop-genomics

PyPop: Python for Population Genomics

  • Versions: 32
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 5,834 Last month
Rankings
Dependent packages count: 7.4%
Forks count: 9.4%
Stargazers count: 14.2%
Average: 25.0%
Dependent repos count: 69.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/build_wheels.yml actions
  • actions/checkout v4 composite
  • actions/download-artifact v3 composite
  • actions/upload-artifact v3 composite
  • pypa/cibuildwheel v2.16.0 composite
  • pypa/gh-action-pypi-publish release/v1 composite
  • softprops/action-gh-release v1 composite
.github/workflows/documentation.yaml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
  • peaceiris/actions-gh-pages v3 composite
pyproject.toml pypi
setup.py pypi
  • importlib-resources *
  • numpy *