gtnet.predict module¶
- gtnet.predict.predict(argv=None)¶
Get network predictions for each sequence in Fasta file
- Parameters:
argv (Namespace, default=sys.argv) – The command-line arguments to use for running this command
- gtnet.predict.run_torchscript_inference(fastas, model, conf_models, window, step, vocab, seqs=False, n_chunks=10000, device=device(type='cpu'), logger=None)¶
Run Torchscript inference
- Parameters:
fastas (str) – The path to the Fasta file with sequences to do inference on
model (RecursiveScriptModule) – The Torchscript model to run inference with
conf_models (dict) – A dictionary with the confidence model for each taxonomic level. Each model should be a RecursiveScriptModule. The expected keys in this dict are ‘domain’, ‘phylum’, ‘class’, ‘order’, ‘family’, ‘genus’ and ‘species’.
window (int) – The length of the sliding window to use for doing inference
step (int) – The length of the step of the sliding window to use for doing inference
vocab (str) – The vocabulary used for training model
n_chunks (int, default=10000) – The length of the step of the sliding window to use for doing inference
device (device, default=torch.device('cpu')) – The Pytorch device to run inference on
logger (Logger) – The Python logger to use when running inference