Skip to content

Commit 7990fbf

Browse files
committed
Added printing the number of matches.
1 parent d82726d commit 7990fbf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

main.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
import json
2-
2+
import hashlib
3+
import subprocess
34
import os.path
45
import sys
56

67
from Bio import SeqIO
78
from Bio.Seq import Seq
89
from Bio.SeqRecord import SeqRecord
9-
import subprocess
1010

1111
from docx import Document
1212
from docx.shared import Pt, Inches
1313
from docx.enum.text import WD_COLOR_INDEX
1414
from docx.oxml.ns import qn
1515

16-
import hashlib
17-
1816

1917
def prepare_seq(seqs: dict, output_file_name: str):
2018
if "." in output_file_name:
@@ -260,6 +258,9 @@ def num_sequences():
260258
# compute markings for DNA sequence
261259
matches = mark_sequences(text, search_word, skip_spaces, separate_marking_colors)
262260

261+
matches_num = len(matches)
262+
print(f"{matches_num if matches_num != 0 else "No"} matches of \"{search_word}\" found.")
263+
263264
# create word document with markings
264265
create_word_document_and_mark(word_filename, text, marks=matches)
265266

0 commit comments

Comments
 (0)