Skip to main content

sourmash_plugin_commonhash

If you have sketched many samples and you want to remove "rare" k-mers (present in 1, or only a few samples), this plugin is for you! This procedure helps reduce noise in Jaccard comparisons between samples.

See sourmash#2383 for an extended discussion!

Thanks to Taylor Reiter and Jessica Lumian for all their work on this!

Installation

pip install sourmash_plugin_commonhash

Usage

sourmash scripts commonhash <multiple sketches> -o commonhashes.zip

commonhash will output one filtered sketch for each input sketch. You can then use the various sourmash sig commands to union these sketches, extract individual ones, etc.

Example

sourmash scripts commonhash examples/*.sig.gz -o commonhash.zip

should yield:

...

Selecting k=31, DNA
Loaded 10587 hashes from 3 sketches in 3 files.
Of 10587 hashes, keeping 2529 that are in 2 or more samples.
Saved 3 signatures to 'commonhash.zip'

Support

We suggest filing issues in the main sourmash issue tracker as that receives more attention!

Dev docs

commonhash is developed at https://github.com/ctb/sourmash_plugin_commonhash.

Generating a release

Bump version number in pyproject.toml and push.

Make a new release on github.

Then pull, and:

python -m build

followed by twine upload dist/....

Metadata

Release files for sourmash-plugin-commonhash 0.4

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

Source distribution (sdist)

Source distribution for sourmash-plugin-commonhash 0.4
File Size Uploaded
sourmash_plugin_commonhash-0.4.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sourmash-plugin-commonhash 0.4
File Interpreter ABI Platform
sourmash_plugin_commonhash-0.4-py3-none-any.whl Python 3 none any Details

Total release size: 9.7 kB

Release files / sourmash_plugin_commonhash-0.4.tar.gz

Download URL sourmash_plugin_commonhash-0.4.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5ee0f62692fb41824bcb3141fafd381dd172e94ef60ee2bb0214f6f16b6e7d2e
BLAKE2b-256 checksum
How to use checksums
2c89d46d65f6e4fdb68f81dea08dbd092c097765031f367bb1a86bdad3b497b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.13

Release files / sourmash_plugin_commonhash-0.4-py3-none-any.whl

Download URL sourmash_plugin_commonhash-0.4-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96d0d983a3c3719961bb5b15f9f0d33eb6ad12c4ea3da34b1e949c05d1d58a0a
BLAKE2b-256 checksum
How to use checksums
3bcd6f5df111fddd12eba899fd18acc940e951e26978fd510525286f0d94d07b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.13

Release history Release notifications | RSS feed

This release

0.4 This release

2 release files

0.3

2 release files

0.2.1

2 release files

0.2

2 release files

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