Skip to main content

Python interface to BRI (Bam Read Index)

Project description

Python package Python package build and publish

camembertpy

Cython wrapper for https://github.com/jts/bri with pysam integration.

Installation

From pip repository

pip install camembert-bri

From source

conda approach (recommended)

conda env create -f environment.yml
conda activate camembert
python setup.py install

pip approach

# optional virtualenv:
virtualenv camembert
source camembert/bin/activate

# Installation
pip install -r requirements.txt
python setup.py install

Examples

API

build read index

from camembert import Bri
b = Bri(bam_file)
b.create()

retrieve reads

from camembert import Bri
b = Bri(bam_file)
b.load()
for read in b.get(read_name):
    print(read.to_string())  # read is of type pysam.AligmentSegment

CLI

A command line interface is included and mimics the original bri CLI command. For usage, refer to

camembert --help
camembert <subcommand> --help

build read index

camembert index bam_file.bam

retrieve reads

camembert get bam_file.bam read_name

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

camembert-bri-0.0.2.tar.gz (58.3 kB view hashes)

Uploaded Source

Built Distributions

camembert_bri-0.0.2-cp38-cp38-manylinux2010_x86_64.whl (9.5 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

camembert_bri-0.0.2-cp37-cp37m-manylinux2010_x86_64.whl (8.5 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

camembert_bri-0.0.2-cp36-cp36m-manylinux2010_x86_64.whl (8.5 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

camembert_bri-0.0.2-cp27-cp27m-manylinux2010_x86_64.whl (7.8 MB view hashes)

Uploaded CPython 2.7m manylinux: glibc 2.12+ x86-64

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