Skip to content
Snippets Groups Projects
Commit abb1e512 authored by Melvin Alappat's avatar Melvin Alappat
Browse files

feat:logging added

parent 4c591824
No related branches found
No related tags found
1 merge request!16Issue_4
Pipeline #13898 passed
"""Command-line interface client."""
import argparse
import logging
import os
from pathlib import Path
import sys
from src.primingprob.priming_prob import Probability as Pbt # type: ignore
def parse_args():
def parse_args(): # Input arguments
"""Parse CLI arguments.
Returns:
......@@ -47,11 +48,15 @@ def main():
args = parse_args()
if os.path.exists(args.input_file) and os.path.exists(args.fasta_file): # pragma: no cover
logging.basicConfig(level=logging.INFO, format='%(message)s')
logging.info("Starting calculating the priming probabilities...")
paradata = Pbt.inter_para(args.input_file)
Pbt.inter_prob(paradata, args.fasta_file, args.output_file)
logging.info("Calculations are done...")
logging.info(f"Potential Priming Sites are saved in {args.output_file}")
if not os.path.exists(args.input_file) and os.path.exists(args.fasta_file): # pragma: no cover
sys.exit("Path to input-file does not exist")
sys.exit("Path to input-files does not exist")
def init():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment