Skip to main content

npysearch

npysearch implements an efficient BLAST-like sequence comparison algorithm, written in C++11 and using native Python datatypes and bindings. npysearch is light-weight, fast, and dependency-free. The code base of npysearch is adapted from nsearch.

Installation

from pypi

pip install npysearch

from conda-forge

Installing from the conda-forge channel can be achieved by adding conda-forge to your channes with:

conda config --add channels conda-forge
conda config --set channel_priority strict

You can skip the above step if conda-forge channel has been added already.

Once the conda-forge channel has been enabled, npysearch can be installed with:

conda install npysearch

from github

# Clone repository from github
git clone https://github.com/tamminenlab/npysearch.git

# Install package using pip
pip install ./npysearch

Examples

# Import npysearch package
import npysearch as npy

# Read query file into a dictionary
query = npy.read_fasta("npysearch/data/query.fasta")

# Read database file into a dictionary
database = npy.read_fasta("npysearch/data/db.fasta")

# BLAST the query against the database
results_dna = npy.blast(query, database)

# BLAST protein sequence file against itself using filenames as blast function arguments

results_prot = npy.blast(query = "npysearch/data/prot.fasta",
                   		 database = "npysearch/data/prot.fasta",
                     	 alphabet = "protein")

Caveats

  • The blast function automatically detects whether the query and database arguments were passed as string paths to fasta files or as dictionaries of sequences. Both of them need not be input as the same type.
  • Use help(npy) (assuming you've imported npysearch as npy) to get a list of the functions included and their docstrings. For docstrings of specific functions, for example blast, use help(npy.blast)

Metadata

Release files for npysearch 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for npysearch 1.3.1
File Size Uploaded Provenance
npysearch-1.3.1.tar.gz 38.0 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for npysearch 1.3.1
File
npysearch-1.3.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
npysearch-1.3.1-cp310-cp310-manylinux_2_24_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.24+ x86-64 Details
npysearch-1.3.1-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
npysearch-1.3.1-cp38-cp38-macosx_11_0_arm64.whl CPython 3.8 CPython 3.8 macOS 11.0+ ARM64 Details

Total release size: 627.2 kB

Release files / npysearch-1.3.1.tar.gz

Download URL npysearch-1.3.1.tar.gz
Size 38.0 kB
Tags Source
SHA-256 checksum
How to use checksums
03c4b7a3be80f5168e6df3f9dc57cdca71d822f09a3a5d90994c308334a53f46
BLAKE2b-256 checksum
How to use checksums
5cebb7a9c115c095361aaaea9457e60720a5b5c5bc5c0beea02d5c21a2b32ac8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.10

Release files / npysearch-1.3.1-cp310-cp310-win_amd64.whl

Download URL npysearch-1.3.1-cp310-cp310-win_amd64.whl
Size 137.4 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
6702a9a5fc1d419c0f2cbb52eb40b2cb6c782d1fa3da016f367ce43e157d5b55
BLAKE2b-256 checksum
How to use checksums
4618c9c9bd317d9ad73ef1641c84e412ec43f955e6f717d491627985fd0a86cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.10

Release files / npysearch-1.3.1-cp310-cp310-manylinux_2_24_x86_64.whl

Download URL npysearch-1.3.1-cp310-cp310-manylinux_2_24_x86_64.whl
Size 153.1 kB
Tags CPython 3.10 Linux glibc 2.24+ x86-64
SHA-256 checksum
How to use checksums
112dd98de079b8dae276ed32b009394597c082ef1569d4710f19b8cb0c2ac2c1
BLAKE2b-256 checksum
How to use checksums
a5f19f1a0892ee0a2d5fac68cda32451cd64e7d51e38f1785fd0283108ef3015
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.10

Release files / npysearch-1.3.1-cp39-cp39-win_amd64.whl

Download URL npysearch-1.3.1-cp39-cp39-win_amd64.whl
Size 137.4 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
47e7d0e8258808927ed7ab59dc11239141c17e652d871a356922949d34c9bc62
BLAKE2b-256 checksum
How to use checksums
50684bc3946b2f1b66089e3146c5f64e2f8782bb1eaf9324bed2548362aee27b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.10

Release files / npysearch-1.3.1-cp38-cp38-macosx_11_0_arm64.whl

Download URL npysearch-1.3.1-cp38-cp38-macosx_11_0_arm64.whl
Size 161.3 kB
Tags CPython 3.8 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e432f61da7c87d3293db72c6342ea3190fa0b477481684ec6080f2e6adf93248
BLAKE2b-256 checksum
How to use checksums
8ad3745912d25a79b92b0a8d8987797f6c7416787511dc1db9cb2c0c44901b7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.10

Security for npysearch 1.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page