Quickstart
Virus Assessment using Neural networks for Just-in-time Analysis and Rapid Identification
Vanjari is a tool for the classification of viruses using neural networks. It uses the ICTV taxonomy to hierarchically classify viruses.
Installation
Vanjari can be installed using pip:
pip install git+https://github.com/bloodhound-devs/vanjari.git
Usage
The main Vanjari app can be used as follows:
For more information see:
vanjari --input virus.fa --output-csv virus-predictions.csv
Note
The first time that Vanjari is run, it will download the model weights. These are large files and may take some time to download.
This outputs a CSV file with the predictions for each virus in the input file.
This will build embeddings for all sequences in the input file and then classify them using the neural network.
To save the embeddings to disk as a Numpy memmap array, provide a location for the file and the index listing:
vanjari --input virus.fa --output-csv virus-predictions.csv --memmap-array-path virus-embeddings.npy --memmap-index virus-index.txt
If the memmap and index exist already, then they will be used without recomputing the embeddings.
The input file can also be a directory of FASTA files.
Thresholds
You can set a threshold for the predictions using the --prediction-threshold
option. This must be a value between 0 and 1.
If the probability of a classification at any rank in the taxonomy is below this threshold, the classification will be set to “NA”.
The threshold can be increased later using the vanjari-tools increase-threshold
command:
Faster Inference
To use a Vanjari model without computing the embeddings, use the vanjari-fast
command which uses a simplier convolutional neural network:
vanjari-fast --input virus.fa --output-csv virus-predictions.csv
Advanced Usage
More documentation is coming with advanced usage. For now, please see the help:
vanjari --help
vanjari-tools --help
vanjari-fast --help
vanjari-fast-tools --help
Programmatic Usage
Vanjari can also be used programmatically. For example:
from vanjari import Vanjari
vanjari = Vanjari()
results = vanjari.predict("virus.fa")