Skip to content

Commit 3bb7571

Browse files
committed
add tqdm for merging
1 parent 0b52374 commit 3bb7571

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ms2query/database/spectra_merging.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import numpy as np
66
from matchms import Spectrum
77
from matchms.similarity import CosineGreedy
8+
from tqdm import tqdm
89

910
from ms2query.spectral_processing import cluster_block, get_merged_spectra
1011
from ms2query.spectral_processing.merging_utils import METADATA_FIELDS_FROM_FIRST, METADATA_FIELDS_SUM
@@ -193,7 +194,7 @@ def cluster_and_merge_to_sqlite(
193194
inserted = 0
194195
processed = 0
195196

196-
for comp_id in comp_ids:
197+
for comp_id in tqdm(comp_ids, desc="Merging spectra per compound..."):
197198
if skip_if_comp_done:
198199
cur.execute("SELECT 1 FROM merged_spectra WHERE comp_id=? LIMIT 1;", (comp_id,))
199200
if cur.fetchone():

0 commit comments

Comments
 (0)