Skip to content

Commit b878761

Browse files
authored
Merge pull request #253 from mwang87/revert-247-dependency-slimming
Revert "Dependency slimming"
2 parents d33d7cf + b270a50 commit b878761

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

massql/msql_fileloading.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
import numpy as np
66

77
from tqdm import tqdm
8+
from matchms.importing import load_from_mgf
89
import pymzml
9-
from pyteomics import mzxml, mzml, mgf
10+
from pyteomics import mzxml, mzml
1011

1112
import logging
1213
logger = logging.getLogger('msql_fileloading')
@@ -142,10 +143,10 @@ def load_data(input_filename, cache=None, cache_dir=None, cache_file=None):
142143
return ms1_df, ms2_df
143144

144145
def _load_data_mgf(input_filename):
145-
reader = mgf.read(input_filename)
146+
file = load_from_mgf(input_filename)
146147

147148
ms2mz_list = []
148-
for i, spectrum in reader:
149+
for i, spectrum in enumerate(file):
149150
if len(spectrum.peaks.mz) == 0:
150151
continue
151152

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
pymzml
12
lark>=1.0
23
pandas
34
pyarrow
45
tqdm
56
py_expression_eval
6-
pymzml
7+
matchms
78
pyteomics
89
psims
910
plotly

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@
2828
],
2929
packages=["massql"],
3030
install_requires=[
31+
"pymzml",
3132
"lark-parser",
3233
"pandas",
3334
"pyarrow",
3435
"tqdm",
3536
"py_expression_eval",
36-
"pymzml",
37+
"matchms",
3738
"pyteomics",
3839
"psims",
3940
"plotly",

tests/test_file_loading.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ def main():
9292
#test_waters_load()
9393
#test_cache_feather()
9494
#test_nocache()
95-
#test_cache_filename()
96-
test_mgf_load()
95+
test_cache_filename()
9796

9897

9998
if __name__ == "__main__":

0 commit comments

Comments
 (0)