---
title: "PyRanges documentation"
author: "Endre Bakken Stovner and Marco Mariotti"
date: "`r Sys.Date()`"
site: "bookdown::bookdown_site"
output:
  bookdown::gitbook: default
documentclass: book
css: "pyranges.css"

---

# Introduction

## Installation

The preferred way to install pyranges is through the bioconda channel:

    conda install -c bioconda pyranges

You can also try pip:

    pip install pyranges

PyRanges has some dependencies that are optional. They need to be manually installed if you require their functionality:

    pyfaidx: fetch sequences from fasta # pip install pyfaidx
    ray: multicpu   # pip install -U ray
    pybigwig: write bigwigs # pip install pybigwig
                            # or conda install -c bioconda pybigwig
    bamread: read bam files # pip install bamread
                            # or conda install -c bioconda bamread
    fisher: fast fisher exact # pip install fisher
                              # or conda install -c bioconda fisher

Since these are not needed for 99.9% percent of the pyranges functionality, they are kept separate to prevent the possibility of the pyranges-install failing due to dependencies that fail installation or conflicting dependencies.

## Citation

http://dx.doi.org/10.1093/bioinformatics/btz615

## Documentation outline

The PyRanges documentation is structured in three parts:

1. The tutorial, on the next page, recommended for all new users
2. The how-to pages, further below, where functionalities are grouped by topic
3. The [API reference](https://pyranges.readthedocs.io/), where all methods are explained in detail

