Skip to content

Commit

Permalink
Update zenodo version and ms2deepscore model type.
Browse files Browse the repository at this point in the history
  • Loading branch information
niekdejonge committed Jul 2, 2024
1 parent f42213a commit f211a27
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ms2query/run_ms2query.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

def zenodo_dois(ionisation_mode):
"Returns the most up to date url for Zenodo"
zenodo_DOIs = {"positive": 10527997,
"negative": 10528030}
zenodo_DOIs = {"positive": 12622446,
"negative": 12606475}
assert ionisation_mode in zenodo_DOIs, "Expected 'positive' or 'negative' as input"
zenodo_doi = zenodo_DOIs[ionisation_mode]
zenodo_metadata_url = "https://zenodo.org/api/records/" + str(zenodo_doi)
Expand All @@ -25,12 +25,11 @@ def available_zenodo_files(zenodo_metadata_url,
with urlopen(zenodo_metadata_url) as zenodo_metadata_file:
file_names_metadata_json: dict = json.loads(zenodo_metadata_file.read())
files = file_names_metadata_json["files"]

file_names_and_sizes = {}
for file in files:
file_name = file["key"]
if only_models:
model_extensions = [".model", ".hdf5", ".onnx", ".npy"]
model_extensions = [".model", ".pt", ".onnx", ".npy"]
if any(file_name.endswith(e) for e in model_extensions):
file_names_and_sizes[file_name] = file["size"]
else:
Expand Down

0 comments on commit f211a27

Please sign in to comment.