FastANI
This package has been developed to provide a Python interface to the FastANI tool.
Installation
Note: You must install the FastANI binaries yourself for this package to work.
This package only has standard dependencies and works for Python versions >=3.6.
pip install fastani
Basic Usage
Note: All features except for the matrix and visualization method have been implemented.
To use this package, simply call the fastani method, all parameters except for the
query and reference arguments are optional, and in this case the FastANI default values are used.
The query and reference arguments can either be a string, or collection of strings that point to the fasta file(s).
from fastani import fastani
result = fastani(query='query.fna', reference='reference.fna')
dict_results = result.as_dict()
# Accessing results
print(dict_results['query.fna']['reference.fna'].ani) # 89.1234
print(dict_results['query.fna']['reference.fna'].n_frag) # 50
print(dict_results['query.fna']['reference.fna'].total_frag) # 100
print(dict_results['query.fna']['reference.fna'].align_frac) # 0.5
# Writing results to disk
result.to_file('results.txt')
The FastANI default parameters can be overridden by passing the following arguments:
exe: The path to the FastANI binary.k: The kmer size to use.cpus: The number of CPUs to use.frag_len: Fragment length to use.min_frac: Minimum fraction of genome shared.min_frag: Minimum number of aligned fragments(version < 1.3).
Advanced Usage
There are two additional arguments that can be supplied to the fastani method:
single_execution: If set toTrue(default), FastANI will use the query and reference list parameters. If set toFalse, then each genome will be analysed individually.bidirectional: If set toFalse(default), FastANI will only perform aquery -> referencecomparison. If set toTrue, then areference -> querycomparison will also be performed.
Metadata
Release files for fastani 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fastani-1.1.0.tar.gz | 20.0 kB | Without provenance | Details for fastani-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fastani-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for fastani-1.1.0-py3-none-any.whl |
Total release size: 43.4 kB
Release files / fastani-1.1.0.tar.gz
| Download URL | fastani-1.1.0.tar.gz |
|---|---|
| Size | 20.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aabdd2ea6204232ba756570cd2477093c36c69ce90dbf652da6b858b8aad14b8
|
|
BLAKE2b-256 checksum How to use checksums |
f8d7dc853ef017388e6bca850da288c6356f110d60337f0b0dde20ba7400e63d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.15
|
Release files / fastani-1.1.0-py3-none-any.whl
| Download URL | fastani-1.1.0-py3-none-any.whl |
|---|---|
| Size | 23.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
803fb26b5cfe45ee37b4586c54a5fd0b0c2f765ce93257bccd495c25d827db00
|
|
BLAKE2b-256 checksum How to use checksums |
4eee687e5932cfc4d6508fc8e4ea7225e5b12f027583326b152c7e9fcadd8920
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.15
|
Security for fastani 1.1.0
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.