Skip to main content

Windows-compatible fork of npysearch: Python bindings for nsearch, an efficient BLAST-like sequence comparison algorithm written in C++

Project description

npysearch-win

npysearch-win is a Windows-compatible fork of npysearch by Aditya Jeevannavar (Tamminen Lab).

The original package does not compile correctly on Windows with Python 3.10+. This fork patches the build system so that pre-built wheels can be installed directly on Windows 10/11 (64-bit) without requiring a C++ compiler.


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. An implementation of nsearch for R is available at blaster.

Installation

from PyPI (this Windows fork)

pip install npysearch-win

from the original project (Linux / macOS)

pip install npysearch

from conda-forge (original)

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

from source

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

# Install package using pip
pip install ./npysearch

Examples

# Import npysearch-win package (installed as 'npysearch')
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)

Supported platforms

Platform Python versions Source
win_64 3.10 – 3.14 this fork (npysearch-win)
linux_64 >= 3.7 original npysearch
osx_64 >= 3.7 original npysearch

Details for the original package: https://anaconda.org/conda-forge/npysearch/files

License

BSD — same as the original npysearch project.

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

npysearch_win-1.3.1.tar.gz (39.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

npysearch_win-1.3.1-cp314-cp314-win_amd64.whl (144.3 kB view details)

Uploaded CPython 3.14Windows x86-64

npysearch_win-1.3.1-cp313-cp313-win_amd64.whl (140.9 kB view details)

Uploaded CPython 3.13Windows x86-64

npysearch_win-1.3.1-cp312-cp312-win_amd64.whl (141.0 kB view details)

Uploaded CPython 3.12Windows x86-64

npysearch_win-1.3.1-cp311-cp311-win_amd64.whl (140.3 kB view details)

Uploaded CPython 3.11Windows x86-64

npysearch_win-1.3.1-cp310-cp310-win_amd64.whl (139.1 kB view details)

Uploaded CPython 3.10Windows x86-64

File details

Details for the file npysearch_win-1.3.1.tar.gz.

File metadata

  • Download URL: npysearch_win-1.3.1.tar.gz
  • Upload date:
  • Size: 39.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for npysearch_win-1.3.1.tar.gz
Algorithm Hash digest
SHA256 8eb268daa06ae183b591aff671df6a6995c793ad8804a13fd8c237a0be6b5548
MD5 f3d4fec29f6fcbf74b7b3ce11a6ead8d
BLAKE2b-256 a1de9bfeb095912aa0719e1c942ec77084d3866570a14916328a0ae6cee3d4d6

See more details on using hashes here.

File details

Details for the file npysearch_win-1.3.1-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for npysearch_win-1.3.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 7e0ed4e48d40a94e527ee977aa208c7ae626021ee5d96881cb0e11d8d26b64dd
MD5 bc42a4b5a9277678108b2e05bcbdd3a6
BLAKE2b-256 1d69cb4e607f6cbf7e976730645467497d630c8f19f22ca91be0517d21003443

See more details on using hashes here.

File details

Details for the file npysearch_win-1.3.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for npysearch_win-1.3.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d28b40fd86b2b40012af04d47103c898d18003d248d2234de83fa4bf32992853
MD5 092c85079cd19863b64fe23dd5dc1edb
BLAKE2b-256 71bfdd90dd0cd50e7fa2770ff70e30b32f4c920747ba67bb2576bfc007505cb2

See more details on using hashes here.

File details

Details for the file npysearch_win-1.3.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for npysearch_win-1.3.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 11aec2c31a423c644be270d9a17115267cbf7694e0f171afdaf832e2709595e0
MD5 fecc3b3d22c48f3c38cbff13641db812
BLAKE2b-256 95211e562e16187c52a0537a5a2177e87e50e6b3e531aa811f7c25cabe23feb0

See more details on using hashes here.

File details

Details for the file npysearch_win-1.3.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for npysearch_win-1.3.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 54ab9e9b5419d5bfc58b2af60828d957b3b4e8be9bc11565c593e43de2b70c8b
MD5 a5be85b36305412580bdb3096deb6e82
BLAKE2b-256 c659f159f24165150337988cffef26b5b8f19222dd6d30783cf84a335fdc8704

See more details on using hashes here.

File details

Details for the file npysearch_win-1.3.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for npysearch_win-1.3.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 833f98e71986d0cc229f3d8cef23d91f3dcc678d09e1f75487077015f50571c2
MD5 0556ff5530f2048cc720642cb5b381d5
BLAKE2b-256 1cd29d68b025b954af80fd0a2b6191baf11867780d7d7114d5498e29dce86d27

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page