Skip to main content

Read PLINK files into Pandas data frames

Project description

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

|Travis| |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/master.svg?style=flat-square
:target: https://travis-ci.org/limix/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.20.tar.gz (8.6 kB view details)

Uploaded Source

Supported by

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