<commit_before>======
htsget
======

.. image:: https://img.shields.io/travis/jeromekelleher/htsget/master.svg
    :target: https://travis-ci.org/jeromekelleher/htsget

.. image:: https://ci.appveyor.com/api/projects/status/n68yw9qklvdham82/branch/master?svg=true
    :target: https://ci.appveyor.com/project/jeromekelleher/htsget/branch/master

.. image:: https://img.shields.io/codecov/c/github/jeromekelleher/htsget.svg
    :target: https://codecov.io/gh/jeromekelleher/htsget

.. image:: https://readthedocs.org/projects/htsget/badge/?version=latest
    :target: http://htsget.readthedocs.io/en/latest/?badge=latest

``htsget`` is a pure-Python API and command line interface for the GA4GH Streaming API. It
provides a simple and reliable way to retrieve high-throughput sequencing data from
servers supporting the protocol. Full documentation is available on
`read the docs <https://htsget.readthedocs.io/en/stable/>`_.

************
Installation
************

To install ``htsget``, simply run::

    $ pip install htsget

If you wish to install ``htsget`` into a your local Python installation, use::

    $ pip install htsget --user

However, you will need to ensure that the local binary directory (usually something
like ``$HOME/.local/bin``) is in your PATH.

*********
CLI Usage
*********

The ``htsget`` command line downloads data from a URL as follows::

    $ htsget http://htsnexus.rnd.dnanex.us/v1/reads/BroadHiSeqX_b37/NA12878 \
        --reference-name=2 --start=1000 --end=20000 -O NA12878_2.bam

Full documentation on the command line options is available via ``htsget --help`` or
`online <https://htsget.readthedocs.io/en/stable/cli.html>`_.

*********
API Usage
*********

The Python API provides a single function ``get``, which supports all of the
arguments provided in the protocol. For example, we might have::

    import htsget

    with open("NA12878_2.bam", "wb") as output:
        htsget.get(
            "http://htsnexus.rnd.dnanex.us/v1/reads/BroadHiSeqX_b37/NA12878", output,
            reference_name="2", start=1000, end=20000)

 Full API documentation is available on
`read the docs <https://htsget.readthedocs.io/en/stable/api.html>`_.<commit_msg>Another attempt to appease PyPI.<commit_after>======
htsget
======

.. image:: https://img.shields.io/travis/jeromekelleher/htsget/master.svg
    :target: https://travis-ci.org/jeromekelleher/htsget

.. image:: https://ci.appveyor.com/api/projects/status/n68yw9qklvdham82/branch/master?svg=true
    :target: https://ci.appveyor.com/project/jeromekelleher/htsget/branch/master

.. image:: https://img.shields.io/codecov/c/github/jeromekelleher/htsget.svg
    :target: https://codecov.io/gh/jeromekelleher/htsget

.. image:: https://readthedocs.org/projects/htsget/badge/?version=latest
    :target: http://htsget.readthedocs.io/en/latest/?badge=latest

``htsget`` is a pure-Python API and command line interface for the GA4GH Streaming API. It
provides a simple and reliable way to retrieve high-throughput sequencing data from
servers supporting the protocol. Full documentation is available at
https://htsget.readthedocs.io/en/stable/

************
Installation
************

To install ``htsget``, simply run::

    $ pip install htsget

If you wish to install ``htsget`` into a your local Python installation, use::

    $ pip install htsget --user

However, you will need to ensure that the local binary directory (usually something
like ``$HOME/.local/bin``) is in your PATH.

*********
CLI Usage
*********

The ``htsget`` command line downloads data from a URL as follows::

    $ htsget http://htsnexus.rnd.dnanex.us/v1/reads/BroadHiSeqX_b37/NA12878 \
        --reference-name=2 --start=1000 --end=20000 -O NA12878_2.bam

Full documentation on the command line options is available via ``htsget --help`` or
https://htsget.readthedocs.io/en/stable/cli.html

*********
API Usage
*********

The Python API provides a single function ``get``, which supports all of the
arguments provided in the protocol. For example, we might have::

    import htsget

    with open("NA12878_2.bam", "wb") as output:
        htsget.get(
            "http://htsnexus.rnd.dnanex.us/v1/reads/BroadHiSeqX_b37/NA12878", output,
            reference_name="2", start=1000, end=20000)

 Full API documentation is available on
https://htsget.readthedocs.io/en/stable/api.html
{'fraction_non_alphanumeric': 0.1505524861878453, 'fraction_numerical': 0.024861878453038673, 'mean_word_length': 3.9827981651376145, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 20, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6733622', 'n_tokens_mistral': 1551, 'n_tokens_neox': 1443, 'n_words': 368}