Getting started with BioNumPy

BioNumPy is a Python library for easy and efficient representation and analysis of biological data. Since BioNumPy builds on the interface of NumPy, people already used to NumPy or array programming should find BioNumPy very easy to get started with.

Getting started with BioNumpy takes only a minute:

  1. Install:

pip install bionumpy
  1. Read your data:

    >>> import numpy as np
    >>> import bionumpy as bnp
    >>> reads = bnp.open("example_data/small.fa").read()
    >>> reads
    SequenceEntry with 3 entries
                         name                 sequence
                        read1  ACACATCACAGCTACGACGA...
                        read2  AACACTTGGGGGGGGGGGGG...
                        read3  AACTGGACTAGCGACGTACT...
    
  2. Analyse it like you would do with NumPy:

    >>> gc_content = np.mean((reads.sequence == "C") | (reads.sequence == "G"))
    >>> gc_content
    0.5526315789473685
    

BioNumpy can be used to analyse a wide range of data. Follow one of the guides below:

What can you do with BioNumpy?

Sequence analysis

Reading and analysing DNA and protein sequences

Kmers

Analysing sequence patterns such as kmers, minimzers and motifs

Genomic Data

Analysing genomic data on a genome (Intervals, variants, annotations, etc)

Multiomics

Combining data-sets from multiple sources/domains