Skip to main content

Read PLINK files into Pandas data frames

Project description

pandas-plink
============

|Travis| |AppVeyor| |Documentation| |Gitter|

| Pandas-plink is a Python package for reading `PLINK binary file
format <https://www.cog-genomics.org/plink2/formats>`__.
| The file reading is taken place via `lazy
loading <https://en.wikipedia.org/wiki/Lazy_loading>`__, meaning that it
saves up memory by actually reading only the genotypes that are actually
accessed by the user.

Install
-------

We recommend installing it via
`conda <http://conda.pydata.org/docs/index.html>`__:

.. code:: bash

conda install -c conda-forge pandas-plink

The above method is preferable because it does not require building
tools, which makes the installation less prone to errors.

Alternatively, pandas-plink can also be installed using
`pip <https://pypi.python.org/pypi/pip>`__:

.. code:: bash

pip install pandas-plink

| The above method will perform some compilation and the installation is
very likely to be successful, as we test every release under Windows,
Linux, and macOS platforms.
| If by any change it fails, please, consider submitting a `new
issue <https://github.com/limix/pandas-plink/issues/new>`__.

Usage
-----

It is as simple as

.. code:: python

from pandas_plink import read_plink
(bim, fam, G) = read_plink('/path/to/files_prefix')

| for which ``files_prefix.bed``, ``files_prefix.bim``, and
``files_prefix.fam`` contain the data.
| Portions of the genotype will be read as the user access them. Please,
refer to the `documentation <https://pandas-plink.readthedocs.io/>`__
for more information.

Authors
-------

- `Danilo Horta <https://github.com/horta>`__

License
-------

This project is licensed under the `MIT
License <https://raw.githubusercontent.com/limix/pandas-plink/master/LICENSE.md>`__.

.. |Travis| image:: https://img.shields.io/travis/limix/pandas-plink.svg?style=flat-square&label=linux%20%2F%20macos%20build
:target: https://travis-ci.org/limix/pandas-plink
.. |AppVeyor| image:: https://img.shields.io/appveyor/ci/Horta/pandas-plink.svg?style=flat-square&label=windows%20build
:target: https://ci.appveyor.com/project/Horta/pandas-plink
.. |Documentation| image:: https://img.shields.io/readthedocs/pandas-plink.svg?style=flat-square&version=stable
:target: https://pandas-plink.readthedocs.io/
.. |Gitter| image:: https://img.shields.io/gitter/room/limix/pandas-plink.js.svg?style=flat-square
:target: https://gitter.im/pandas-plink/Lobby

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pandas_plink-1.2.21.tar.gz (8.7 kB view details)

Uploaded Source

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page