From e5f14762d4faf70b742dc5aba6e2fa528370815e Mon Sep 17 00:00:00 2001 From: Taylor Reiter Date: Fri, 23 Feb 2024 11:00:05 -0500 Subject: [PATCH] linting --- scripts/run_nlpprecursor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/run_nlpprecursor.py b/scripts/run_nlpprecursor.py index 289c029..bb49901 100644 --- a/scripts/run_nlpprecursor.py +++ b/scripts/run_nlpprecursor.py @@ -14,6 +14,7 @@ # This allows for backwards compatibility of the pickled models. sys.modules["protai"] = nlpprecursor + def robust_predict(predict_function, *args, max_attempts=2, sleep_time=1): """ Attempts to call the predict function up to a maximum number of attempts. @@ -49,7 +50,7 @@ def robust_predict(predict_function, *args, max_attempts=2, sleep_time=1): def predict_ripp_sequences(models_dir, input_fasta): """ Uses NLPPrecursor to predict the class and cleavage sites of sequences from an input FASTA file, - filtering out sequences classified as "NONRIPP". + filtering out sequences classified as "NONRIPP". Parameters: - models_dir (str): The directory path where the model files are stored. Available for download @@ -163,6 +164,7 @@ def extract_ripp_sequences(filtered_predictions, output_tsv, output_fasta): SeqIO.write(fasta_records, output_fasta, "fasta") + def main(models_dir, input_fasta, output_tsv, output_fasta): filtered_predictions = predict_ripp_sequences(models_dir, input_fasta) extract_ripp_sequences(filtered_predictions, output_tsv, output_fasta)