How to use the pyranges.read_bam function in pyranges

To help you get started, we’ve selected a few pyranges examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github biocore-ntnu / pyranges / tests / test_read.py View on Github external
def test_read_bam():

    pr.read_bam("tests/test_data/test_sorted.bam")
github biocore-ntnu / pyranges / pyranges / data.py View on Github external
>>> # | chr1         | 994660    | 994685    | +            | 16         |
    >>> # | chr1         | 1770383   | 1770408   | +            | 16         |
    >>> # | chr1         | 1995141   | 1995166   | +            | 16         |
    >>> # | ...          | ...       | ...       | ...          | ...        |
    >>> # | chrY         | 57402214  | 57402239  | +            | 16         |
    >>> # | chrY         | 10643526  | 10643551  | -            | 0          |
    >>> # | chrY         | 11776321  | 11776346  | -            | 0          |
    >>> # | chrY         | 20557165  | 20557190  | -            | 0          |
    >>> # +--------------+-----------+-----------+--------------+------------+
    >>> # Stranded PyRanges object has 10,000 rows and 5 columns from 25 chromosomes.
    >>> # For printing, the PyRanges was sorted on Chromosome and Strand.
    """

    full_path = get_example_path("control.bam")

    return pr.read_bam(full_path)