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

Release/0.4.0 #81

Merged
merged 5 commits into from
Dec 18, 2023
Merged
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
2 changes: 1 addition & 1 deletion .cookietemple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ full_name: Mario Picciani
email: [email protected]
project_name: spectrum_io
project_short_description: IO related functionalities for oktoberfest.
version: 0.3.4
version: 0.4.0
license: MIT
4 changes: 2 additions & 2 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name-template: "0.3.4 🌈" # <<COOKIETEMPLE_FORCE_BUMP>>
tag-template: 0.3.4 # <<COOKIETEMPLE_FORCE_BUMP>>
name-template: "0.4.0 🌈" # <<COOKIETEMPLE_FORCE_BUMP>>
tag-template: 0.4.0 # <<COOKIETEMPLE_FORCE_BUMP>>
exclude-labels:
- "skip-changelog"

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022, Mario Picciani
Copyright (c) 2023, Wilhelmlab at Technical University of Munich

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion cookietemple.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.3.4
current_version = 0.4.0

[bumpversion_files_whitelisted]
init_file = spectrum_io/__init__.py
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
# the built documents.
#
# The short X.Y version.
version = "0.3.4"
version = "0.4.0"
# The full version, including alpha/beta/rc tags.
release = "0.3.4"
release = "0.4.0"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[tool.poetry]
name = "spectrum_io"
version = "0.3.4" # <<COOKIETEMPLE_FORCE_BUMP>>
version = "0.4.0" # <<COOKIETEMPLE_FORCE_BUMP>>
description = "IO related functionalities for oktoberfest."
authors = ["Mario Picciani <[email protected]>"]
authors = ["Wilhelmlab at Technical University of Munich"]
license = "MIT"
readme = "README.rst"
homepage = "https://github.com/wilhelm-lab/spectrum_io"
Expand Down Expand Up @@ -30,7 +30,7 @@ pymzml = "^2.5.0"
pyteomics = "^4.3.3"
lxml= '^4.5.2'
tables = "^3.6.1"
spectrum-fundamentals = ">=0.4.4,<0.5.0"
spectrum-fundamentals = ">=0.5.0,<0.6.0"

[tool.poetry.dev-dependencies]
pytest = ">=6.2.3"
Expand Down
2 changes: 1 addition & 1 deletion spectrum_io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = "Mario Picciani"
__email__ = "[email protected]"
__version__ = "0.3.4"
__version__ = "0.4.0"

import logging
import logging.handlers
Expand Down
2 changes: 1 addition & 1 deletion spectrum_io/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


@click.command()
@click.version_option(version="0.3.4", message=click.style("spectrum_io Version: 0.3.4"))
@click.version_option(version="0.4.0", message=click.style("spectrum_io Version: 0.4.0"))
def main() -> None:
"""spectrum_io."""

Expand Down
4 changes: 4 additions & 0 deletions spectrum_io/raw/msraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def _read_mzml_pymzml(file_list: List[Path], scanidx: Optional[List] = None, *ar
file_name = file_path.stem
mass_analyzer = get_mass_analyzer(file_path)
namespace = "{http://psi.hupo.org/ms/mzml}"
instrument_name = data_iter.info["referenceable_param_group_list_element"][0][0].get("name")

if scanidx is None:
spectra = data_iter
Expand Down Expand Up @@ -204,6 +205,7 @@ def _read_mzml_pymzml(file_list: List[Path], scanidx: Optional[List] = None, *ar
mass_analyzer.get(instrument_configuration_ref, "unknown"),
fragmentation,
collision_energy,
instrument_name,
]
data_iter.close()
data = pd.DataFrame.from_dict(data_dict, orient="index", columns=MZML_DATA_COLUMNS)
Expand All @@ -217,6 +219,7 @@ def _read_mzml_pyteomics(file_list: List[Path], *args, **kwargs) -> pd.DataFrame
logger.info(f"Reading mzML file: {file_path}")
data_iter = mzml.read(source=str(file_path), *args, **kwargs)
file_name = file_path.stem
instrument_name = list(data_iter.get_by_id("commonInstrumentParams").keys())[1]
for spec in data_iter:
if spec["ms level"] != 2:
continue # filter out ms1 spectra if there are any
Expand Down Expand Up @@ -250,6 +253,7 @@ def _read_mzml_pyteomics(file_list: List[Path], *args, **kwargs) -> pd.DataFrame
mass_analyzer.get(instrument_configuration_ref, "unknown"),
fragmentation,
collision_energy,
instrument_name,
]
data_iter.close()
data = pd.DataFrame.from_dict(data_dict, orient="index", columns=MZML_DATA_COLUMNS)
Expand Down
3 changes: 2 additions & 1 deletion spectrum_io/spectral_library/spectronaut.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@
inter_df["iRT"] = irt.tolist()
if len(list(self.grpc_output)) > 2:
inter_df["proteotypicity"] = proteotypicity.tolist()
inter_df["intensities"], inter_df["fragment_mz"] = intensities.tolist(), fragment_mz.tolist()
inter_df["intensities"] = intensities.tolist()
inter_df["fragment_mz"] = fragment_mz.tolist()

Check warning on line 115 in spectrum_io/spectral_library/spectronaut.py

View check run for this annotation

Codecov / codecov/patch

spectrum_io/spectral_library/spectronaut.py#L114-L115

Added lines #L114 - L115 were not covered by tests
inter_df["fragment_types"] = fragment_types.tolist()
inter_df["fragment_numbers"] = fragment_numbers.tolist()
inter_df["fragment_charges"] = fragment_charges.tolist()
Expand Down
Binary file modified tests/unit_tests/data/testdf.pkl
Binary file not shown.
Loading