Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency slimming #247

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions massql/msql_fileloading.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
import numpy as np

from tqdm import tqdm
from matchms.importing import load_from_mgf
import pymzml
from pyteomics import mzxml, mzml
from pyteomics import mzxml, mzml, mgf

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

def _load_data_mgf(input_filename):
file = load_from_mgf(input_filename)
reader = mgf.read(input_filename)

ms2mz_list = []
for i, spectrum in enumerate(file):
for i, spectrum in reader:
if len(spectrum.peaks.mz) == 0:
continue

Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
pymzml
lark>=1.0
pandas
pyarrow
tqdm
py_expression_eval
matchms
pymzml
pyteomics
psims
plotly
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@
],
packages=["massql"],
install_requires=[
"pymzml",
"lark-parser",
"pandas",
"pyarrow",
"tqdm",
"py_expression_eval",
"matchms",
"pymzml",
"pyteomics",
"psims",
"plotly",
Expand Down
3 changes: 2 additions & 1 deletion tests/test_file_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ def main():
#test_waters_load()
#test_cache_feather()
#test_nocache()
test_cache_filename()
#test_cache_filename()
test_mgf_load()


if __name__ == "__main__":
Expand Down
Loading