Skip to main content

Select non-redundant subset of DNA or protein-sequences, such that all pairwise sequence identities

Project description

hobohm: command line program for selecting representative subset of data, based on list of pairwise similarities (or distances) between items.

PyPI downloads


Note: The greedysub program implements a better algorithm (typically giving larger subsets), and should be used instead. The hobohm program works, but is no longer maintained).


The hobohm program aims to select a non-redundant subset of DNA- or protein-sequences, such that all pairwise sequence identities are below a given threshold.

The program takes as input (1) a text-file containing a list of pairwise similarities between sequences (name1 name2 similarity), and (2) a cutoff for deciding when two sequences are too similar (i.e., when they are "neighbors").

The output (written to file) is a list of names that should be kept in the subset. No retained items are neighbors, and the algorithm aims to pick the maximally sized such set, given the cutoff. (Note that this is a hard problem, and this heuristic is not optimal. See notes on computational intractibility of the problem and performance of heuristics in the greedysub README).

The "Hobohm" algorithm was originally created with the purpose of selecting homology-reduced sets of protein data from larger datasets. "Homology-reduced" here means that the resulting data set should contain no pairs of sequences with high sequence identity:

"Selection of representative protein data sets", Protein Sci. 1992. 1(3):409-17.

This command-line program implements algorithm 2 from that paper, and can be applied to any type of data for which pairwise similarities (or distances) can be defined.

Availability

The hobohm source code is available on GitHub: https://github.com/agormp/hobohm. The executable can be installed from PyPI: https://pypi.org/project/hobohm/

Installation

python3 -m pip install hobohm

Upgrading to latest version:

python3 -m pip install --upgrade hobohm

Dependencies

hobohm relies on the pandas package, which is automatically included when using pip to install.

Usage

usage: hobohm [-h] [--val VALUETYPE] [-c CUTOFF] [-k KEEPFILE] INFILE OUTFILE

Select non-redundant subset of DNA or protein-sequences, such that all pairwise
sequence identities are below threshold.

positional arguments:
  INFILE           input file containing similarity or distance for each pair of
                   items: name1 name2 value
  OUTFILE          output file contatining neighborless subset of items (one name per
                   line)

options:
  -h, --help       show this help message and exit
  --val VALUETYPE  specify whether values in INFILE are distances (--val dist) or
                   similarities (--val sim)
  -c CUTOFF        cutoff value for deciding which pairs are neighbors
  -k KEEPFILE      (optional) file with names of items that must be kept (one name per
                   line)

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

hobohm-2.0.1.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

hobohm-2.0.1-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file hobohm-2.0.1.tar.gz.

File metadata

  • Download URL: hobohm-2.0.1.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for hobohm-2.0.1.tar.gz
Algorithm Hash digest
SHA256 833d04d5469753385d033a61448af3c9b2386c1039b5272095c9f63e90a10099
MD5 d00dcac044147ef223058ea7342390f1
BLAKE2b-256 f4502fcad27b336e73b2ffffe31695fe7cb6411efbe79c89afcc5dfa4a95abeb

See more details on using hashes here.

File details

Details for the file hobohm-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: hobohm-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for hobohm-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 11b1741bcaf9ec6c9f3d45ca9d170fdf6e864bb76c4dd2ac9387f2b0005f8af6
MD5 a41bdca6bc2213935701feaf4daa8e5a
BLAKE2b-256 da8fe55ee6016664b672dca60e09cd16a96aff88b8f24e23c365321ff3c58587

See more details on using hashes here.

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