Skip to main content

seqCompare

A toolkit for nucleotide sequence similarity analysis

Installation

conda env create --name seqCompare --file environment.yaml --yes
pip install seqCompare

Upcoming...

conda install -c bioconda seqCompare --yes

Calculate percent similarity of sequences

seqCompare similarity --help

options:
  -h, --help            show this help message and exit
  --data, -d data       input text file (list of fasta files, alignment, or presence/absence table)
  --format, -f format   data format (default: tsv)
  --output, -o output   output percent similarity
  --length, -l length   k-mer length for --mash/-m or --fastani/-n (default: 31)
  --size, -s size       sketch size for MASH; use with --mash (default: 1000000)
  --mash, -m            calculate similarity using MASH
  --fastani, -n         calculate similarity using fastANI
  --blast, -b           calculate similarity using BLAST
  --matrix, -x          calculate similarity using a presence and absence matrix
  --blastani, -i        calculate blast ANI similarity
  --aln, -a             calculate similarity based on a given sequence alignment
  --fraction, -c fraction
                        minimum overlap fraction with shorter sequence for ANI calculation; use with --fastani or --blastani (default: 0.70)
  --fragment, -r fragment
                        fragment length for calculating ANI; use with --fastani (default: 500)
  --evalue, -e evalue   minimum evalue for hits; use with --blast (default: 0.001)
  --qcovperhsp, -p queryCovPercentHSP
                        minimum query coverage for each blast hsp (default: 10)
  --threads, -t threads
                        number of threads (default: 5)
seqCompare similarity --blast --data input.txt --output out.similarity.blast.tsv --threads 20 --length 28 
seqCompare similarity --blastani --data input.txt --output out.similarity.blastani.tsv --threads 20 --length 28 
seqCompare similarity --fastani --data input.txt --output out.similarity.fastani.tsv --threads 20 --length 15 
seqCompare similarity --matrix --data input.table.txt --output out.similarity.matrix.tsv --threads 20 --length 15 

Query or screen sequences against reference sequences

seqCompare query --help

options:
  -h, --help            show this help message and exit
  --reference, -r reference
                        input tabular text file containing reference sequences
  --query, -q query     input tabular text file containing query sequences
  --format, -f format   data format (default: tsv)
  --output, -o output   output percent similarity
  --length, -l length   k-mer length for --mash/-m or --fastani/-n (default: 31)
  --evalue, -e evalue   minimum evalue for hits; use with --blast (default: 0.001)
  --qcovperhsp, -p queryCovPercentHSP
                        minimum query coverage for each blast hsp (default: 10)
  --complete, -c        comparing full sequences
  --threads, -t threads
                        number of threads (default: 5)
seqCompare query --reference references.txt --query input.txt --output out.matching.blast.tsv --length 28 --threads 20

Cluster sequences based on sequence similarity values

seqCompare cluster --help

options:
  -h, --help            show this help message and exit
  --data, -d data       input tabular text file
  --format, -f format   data format (default: tsv)
  --output, -o output   output clusters
  --prefix, -p prefix   cluster label prefix
  --sep, -s separator   lineage label separator
  --thresholds, -t [thresholds ...]
                        cluster or lineage thresholds
seqCompare cluster -d out.similarity.blast.tsv -t 50 85 -o out.similarity.50.85.tsv

Order presence and absence data file

seqCompare order --help

options:
  -h, --help            show this help message and exit
  --data, -d data       input tabular text file
  --format, -f format   data format (default: tsv)
  --output, -o output   output ordered data file
  --rownames, -r rownames
                        order by item names in a given text file (one name per row)
  --threads, -t threads
                        number of threads (default: 5)

Rename rows and columns in a presence and absence file

seqCompare rename --help

options:
  -h, --help            show this help message and exit
  --data, -d data       input tabular text file
  --format, -f format   data format (default: tsv)
  --output, -o output   output ordered data file
  --columns, -c [columns ...]
                        selected column numbers (e.g., --columns 1 2 3 4)
  --newdata, -n newdata
                        order by item names in a given text file (one name per row)

Filter rows and columns in a presence and absence file

seqCompare filter --help

options:
  -h, --help            show this help message and exit
  --data, -d data       input tabular text file
  --format, -f format   data format (default: tsv)
  --output, -o output   output percent similarity
  --min, -a minCutoff   select with frequency ≥minCutoff percent (overrides --columns/-c and --rows/-r)
  --max, -b maxCutoff   select with frequency ≤maxCutoff percent (overrides --columns/-c and --rows/-r)
  --columns, -c columns
                        select only columns present in a given text file (one column value per row)
  --rows, -r rows       select only rows present in a given text file (one column value per row)
  --threads, -t threads
                        number of threads (default: 5)

Sample rows and columns in a presence and absence file

seqCompare sample --help

options:
  -h, --help           show this help message and exit
  --data, -d data      input tabular text file
  --format, -f format  data format (default: tsv)
  --output, -o output  output file
  --cf, -c colfreq     randomly select ≥colfreq percent of the columns
  --rf, -r rowfreq     randomly select ≥rowfreq percent of the rows

Transpose rows and columns in a presence and absence file

seqCompare transpose --help

options:
  -h, --help           show this help message and exit
  --data, -d data      input tabular text file
  --format, -f format  data format (default: tsv)
  --output, -o output  output percent similarity

Create a k-mer presence and absence table or matrix given a list of sequences

seqCompare table --help

options:
  -h, --help            show this help message and exit
  --data, -d data       input text files containing fasta sequence file names
  --output, -o output   output percent similarity
  --length, -l length   k-mer length (default: 31)
  --min, -m minabundance
                        minimum k-mer abundance (default: 1)
  --maxmem, -x maxmemory
                        maximum memory (default: 5000)
  --dsk, -s             DSK to identify k-mers
  --bifrost, -b         bifrost to identify variable length k-mers or unitigs
  --kmers, -k kmers     only query input sequence against a given k-mer database
  --approx, -a          search inexact k-mers (default: False)
  --threads, -t threads
                        number of threads (default: 5)

Show software version

seqCompare version --help

options:
  -h, --help     show this help message and exit
  --version, -v  show software version

Show citation information

seqCompare citation --help

options:
  -h, --help      show this help message and exit
  --citation, -c  show software citation information

Citation

Chaguza et al. seqCompare: A toolkit for nucleotide sequence similarity analysis. 2026. [https://github.com/ChrispinChaguza/seqCompare](https://github.com/ChrispinChaguza/seqCompare)

Metadata

Release files for seqCompare 1.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 seqCompare 1.0.4
File Size Uploaded Provenance Actions
seqcompare-1.0.4.tar.gz 17.3 kB Without provenance Details for seqcompare-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for seqCompare 1.0.4
File Interpreter ABI Platform Actions
seqcompare-1.0.4-py3-none-any.whl Python 3 none any Details for seqcompare-1.0.4-py3-none-any.whl

Total release size: 33.5 kB

Release files / seqcompare-1.0.4.tar.gz

Download URL seqcompare-1.0.4.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6d266ba61fc2624b8a5d4f60c20e403fd0eb8f84a237a1218e566720d75b186c
BLAKE2b-256 checksum
How to use checksums
5d500f3a25161841ab294eee0b141fbff2d334cc05527075a1fcf7538f5b990c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / seqcompare-1.0.4-py3-none-any.whl

Download URL seqcompare-1.0.4-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
04ac4b301571a02245ba137f551159e5d44fc28e9bfe2f07e61173b28b5f6992
BLAKE2b-256 checksum
How to use checksums
8021de0b46f2e9f54b6880ede462040dcb75dc5c82055eb33adf320a77c10cd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for seqCompare 1.0.4

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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