Skip to content
Snippets Groups Projects
Commit bcd472ba authored by TheRiPtide's avatar TheRiPtide
Browse files

patch: cli for poly(A) classifier and coverage exclusions

parent 43303ee1
No related branches found
No related tags found
1 merge request!23feat: deep-leaning poly(A) classifier
Pipeline #13838 passed
[flake8] [flake8]
max-line-length = 120 max-line-length = 120
docstring-convention = google docstring-convention = google
\ No newline at end of file
[coverage:report]
exclude_lines =
if __name__ == '__main__':
[coverage:run]
omit =
*/cli.py
\ No newline at end of file
"""Module for classifying poly(A) sequences."""
"""Command-line interface for the poly(A) classifier."""
import sys
import argparse
from src.polyA_classifier.polyA_classifier import PolyAClassifier
parser = argparse.ArgumentParser()
parser.add_argument('data', action='store', help='str or list(str) of length 200 chars to classify.')
parser.add_argument('-p', '--path', action='store', help='Path to state-dict for Net-model.',
default='./models/internal_priming.pth')
if __name__ == '__main__':
args = parser.parse_args()
if args.data[0] == '[':
data = args.data[1:-1].replace(' ', '').split(',')
else:
data = args.data
classifier = PolyAClassifier(state_dict_path=args.path)
result = classifier.classify(data)
sys.stdout.write(str(result))
File moved
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
import pytest import pytest
import os import os
from src.poly_a import generate_poly_a from src.poly_a import generate_poly_a
from src.polyA_classifier import PolyAClassifier, Net from src.polyA_classifier.polyA_classifier import PolyAClassifier, Net
import linecache import linecache
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment