Skip to content

Commit

Permalink
prospector
Browse files Browse the repository at this point in the history
  • Loading branch information
niekdejonge committed Nov 26, 2023
1 parent 47ce4f5 commit 39f9273
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 2 additions & 5 deletions ms2query/create_new_library/library_files_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@

import os
from pathlib import Path
from typing import Dict, List, Union
from typing import List, Union
import matchms.filtering as msfilters
import numpy as np
import pandas as pd
from gensim.models import Word2Vec
from matchms import Spectrum
from matchms.Spectrum import Spectrum
from ms2deepscore import MS2DeepScore
from ms2deepscore.models import load_model as load_ms2ds_model
Expand All @@ -22,7 +21,6 @@
from ms2query.create_new_library.create_sqlite_database import (
add_dataframe_to_sqlite, fill_inchikeys_table, fill_spectrum_data_table,
initialize_tables)
from ms2query.utils import return_non_existing_file_name


class LibraryFilesCreator:
Expand Down Expand Up @@ -75,8 +73,7 @@ def __init__(self,
# pylint: disable=too-many-arguments
if os.path.exists(sqlite_file_name):
raise FileExistsError("The sqlite file already exists")
else:
self.sqlite_file_name = sqlite_file_name
self.sqlite_file_name = sqlite_file_name

# Load in spec2vec model
if os.path.exists(s2v_model_file_name):
Expand Down
4 changes: 1 addition & 3 deletions ms2query/ms2library.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from ms2query.query_from_sqlite_database import SqliteLibrary
from ms2query.results_table import ResultsTable
from ms2query.utils import (SettingsRunMS2Query, column_names_for_output,
load_ms2query_model, load_pickled_file,
load_ms2query_model,
predict_onnx_model, return_non_existing_file_name,
select_files_in_directory)

Expand Down Expand Up @@ -58,8 +58,6 @@ def __init__(self,
ms2query_model_file_name:
File location of ms2query model with .hdf5 extension.
"""
# pylint: disable=too-many-arguments

# Load models and set file locations
assert os.path.isfile(sqlite_file_name), f"The given sqlite file does not exist: {sqlite_file_name}"
self.sqlite_library = SqliteLibrary(sqlite_file_name)
Expand Down

0 comments on commit 39f9273

Please sign in to comment.