From ab2fc1a2cf90d2eb7927f8887ada561c7f4afb90 Mon Sep 17 00:00:00 2001 From: "Tim Maier (Ubuntu Desktop)" Date: Thu, 9 Nov 2023 10:11:46 +0100 Subject: [PATCH] renamed module to simplify rebase --- {pyims => imspy}/README.md | 0 .../examples/simulation/run_example_simulation.py | 0 {pyims/pyims => imspy/imspy}/__init__.py | 0 {pyims/pyims => imspy/imspy}/chemistry.py | 0 imspy/imspy/data/__init__.py | 4 ++++ {pyims/pyims => imspy/imspy}/data/frame.py | 6 +++--- {pyims/pyims => imspy/imspy}/data/handle.py | 6 +++--- {pyims/pyims => imspy/imspy}/data/slice.py | 8 ++++---- {pyims/pyims => imspy/imspy}/data/spectrum.py | 2 +- {pyims/pyims => imspy/imspy}/feature.py | 6 +++--- {pyims/pyims => imspy/imspy}/isotopes.py | 6 +++--- {pyims/pyims => imspy/imspy}/mixture.py | 0 {pyims/pyims => imspy/imspy}/noise.py | 4 ++-- {pyims/pyims => imspy/imspy}/proteome.py | 8 ++++---- {pyims/pyims => imspy/imspy}/simulation/experiment.py | 8 ++++---- .../imspy}/simulation/hardware_models.py | 10 +++++----- {pyims/pyims => imspy/imspy}/utilities.py | 0 {pyims/pyims => imspy/imspy}/utility.py | 4 ++-- {pyims => imspy}/pyproject.toml | 2 +- {pyims => imspy}/tests/__init__.py | 0 pyims/pyims/data/__init__.py | 4 ---- pyims_connector/Cargo.toml | 4 ++-- pyims_connector/pyproject.toml | 2 +- pyims_connector/src/lib.rs | 2 +- 24 files changed, 43 insertions(+), 43 deletions(-) rename {pyims => imspy}/README.md (100%) rename {pyims => imspy}/examples/simulation/run_example_simulation.py (100%) rename {pyims/pyims => imspy/imspy}/__init__.py (100%) rename {pyims/pyims => imspy/imspy}/chemistry.py (100%) create mode 100644 imspy/imspy/data/__init__.py rename {pyims/pyims => imspy/imspy}/data/frame.py (98%) rename {pyims/pyims => imspy/imspy}/data/handle.py (97%) rename {pyims/pyims => imspy/imspy}/data/slice.py (98%) rename {pyims/pyims => imspy/imspy}/data/spectrum.py (99%) rename {pyims/pyims => imspy/imspy}/feature.py (98%) rename {pyims/pyims => imspy/imspy}/isotopes.py (98%) rename {pyims/pyims => imspy/imspy}/mixture.py (100%) rename {pyims/pyims => imspy/imspy}/noise.py (98%) rename {pyims/pyims => imspy/imspy}/proteome.py (98%) rename {pyims/pyims => imspy/imspy}/simulation/experiment.py (97%) rename {pyims/pyims => imspy/imspy}/simulation/hardware_models.py (98%) rename {pyims/pyims => imspy/imspy}/utilities.py (100%) rename {pyims/pyims => imspy/imspy}/utility.py (99%) rename {pyims => imspy}/pyproject.toml (96%) rename {pyims => imspy}/tests/__init__.py (100%) delete mode 100644 pyims/pyims/data/__init__.py diff --git a/pyims/README.md b/imspy/README.md similarity index 100% rename from pyims/README.md rename to imspy/README.md diff --git a/pyims/examples/simulation/run_example_simulation.py b/imspy/examples/simulation/run_example_simulation.py similarity index 100% rename from pyims/examples/simulation/run_example_simulation.py rename to imspy/examples/simulation/run_example_simulation.py diff --git a/pyims/pyims/__init__.py b/imspy/imspy/__init__.py similarity index 100% rename from pyims/pyims/__init__.py rename to imspy/imspy/__init__.py diff --git a/pyims/pyims/chemistry.py b/imspy/imspy/chemistry.py similarity index 100% rename from pyims/pyims/chemistry.py rename to imspy/imspy/chemistry.py diff --git a/imspy/imspy/data/__init__.py b/imspy/imspy/data/__init__.py new file mode 100644 index 00000000..75c253f3 --- /dev/null +++ b/imspy/imspy/data/__init__.py @@ -0,0 +1,4 @@ +from imspy.data.frame import TimsFrame +from imspy.data.spectrum import TimsSpectrum, MzSpectrum +from imspy.data.handle import TimsDataset, TimsDatasetDDA, TimsDatasetDIA +from imspy.data.slice import TimsSlice diff --git a/pyims/pyims/data/frame.py b/imspy/imspy/data/frame.py similarity index 98% rename from pyims/pyims/data/frame.py rename to imspy/imspy/data/frame.py index 186aadf2..bbfa2e28 100644 --- a/pyims/pyims/data/frame.py +++ b/imspy/imspy/data/frame.py @@ -6,10 +6,10 @@ from tensorflow import sparse as sp import numpy as np -import pyims_connector as pims -from pyims.data.spectrum import MzSpectrum, TimsSpectrum +import imspy_connector as pims +from imspy.data.spectrum import MzSpectrum, TimsSpectrum -from pyims.utilities import re_index_indices +from imspy.utilities import re_index_indices class TimsFrame: diff --git a/pyims/pyims/data/handle.py b/imspy/imspy/data/handle.py similarity index 97% rename from pyims/pyims/data/handle.py rename to imspy/imspy/data/handle.py index 1d63edf8..e1e87c7c 100644 --- a/pyims/pyims/data/handle.py +++ b/imspy/imspy/data/handle.py @@ -5,13 +5,13 @@ import sqlite3 from numpy.typing import NDArray -import pyims_connector as pims +import imspy_connector as pims import opentims_bruker_bridge as obb from abc import ABC -from pyims.data.frame import TimsFrame -from pyims.data.slice import TimsSlice +from imspy.data.frame import TimsFrame +from imspy.data.slice import TimsSlice diff --git a/pyims/pyims/data/slice.py b/imspy/imspy/data/slice.py similarity index 98% rename from pyims/pyims/data/slice.py rename to imspy/imspy/data/slice.py index 65ef60b7..5068d6c4 100644 --- a/pyims/pyims/data/slice.py +++ b/imspy/imspy/data/slice.py @@ -4,11 +4,11 @@ from tensorflow import sparse as sp -from pyims.utilities import re_index_indices +from imspy.utilities import re_index_indices -import pyims_connector as pims -from pyims.data.frame import TimsFrame, TimsFrameVectorized -from pyims.data.spectrum import MzSpectrum +import imspy_connector as pims +from imspy.data.frame import TimsFrame, TimsFrameVectorized +from imspy.data.spectrum import MzSpectrum class TimsSlice: diff --git a/pyims/pyims/data/spectrum.py b/imspy/imspy/data/spectrum.py similarity index 99% rename from pyims/pyims/data/spectrum.py rename to imspy/imspy/data/spectrum.py index da1ce48e..2ca0d9b5 100644 --- a/pyims/pyims/data/spectrum.py +++ b/imspy/imspy/data/spectrum.py @@ -5,7 +5,7 @@ import pandas as pd from numpy.typing import NDArray -import pyims_connector as pims +import imspy_connector as pims class MzSpectrum: diff --git a/pyims/pyims/feature.py b/imspy/imspy/feature.py similarity index 98% rename from pyims/pyims/feature.py rename to imspy/imspy/feature.py index eb30dddd..53ab596f 100644 --- a/pyims/pyims/feature.py +++ b/imspy/imspy/feature.py @@ -4,9 +4,9 @@ import json -from pyims.data import TimsSlice, TimsFrame -from pyims.utility import gaussian, exp_gaussian -from pyims.isotopes import IsotopePatternGenerator, create_initial_feature_distribution +from imspy.data import TimsSlice, TimsFrame +from imspy.utility import gaussian, exp_gaussian +from imspy.isotopes import IsotopePatternGenerator, create_initial_feature_distribution from abc import ABC, abstractmethod from typing import Optional, Dict class Profile: diff --git a/pyims/pyims/isotopes.py b/imspy/imspy/isotopes.py similarity index 98% rename from pyims/pyims/isotopes.py rename to imspy/imspy/isotopes.py index 458e94fb..da75dae2 100644 --- a/pyims/pyims/isotopes.py +++ b/imspy/imspy/isotopes.py @@ -6,12 +6,12 @@ from abc import ABC, abstractmethod from scipy.signal import argrelextrema -from pyims.data import MzSpectrum -from pyims.utility import gaussian, exp_gaussian, normal_pdf +from imspy.data import MzSpectrum +from imspy.utility import gaussian, exp_gaussian, normal_pdf import numba import pyopenms -from pyims.noise import detection_noise +from imspy.noise import detection_noise MASS_PROTON = 1.007276466621 MASS_NEUTRON = 1.00866491595 diff --git a/pyims/pyims/mixture.py b/imspy/imspy/mixture.py similarity index 100% rename from pyims/pyims/mixture.py rename to imspy/imspy/mixture.py diff --git a/pyims/pyims/noise.py b/imspy/imspy/noise.py similarity index 98% rename from pyims/pyims/noise.py rename to imspy/imspy/noise.py index daef5073..c2cf163b 100644 --- a/pyims/pyims/noise.py +++ b/imspy/imspy/noise.py @@ -5,8 +5,8 @@ import numba from typing import Callable, Optional, Tuple from numpy.typing import ArrayLike -from pyims.data import MzSpectrum -from pyims.utility import normal_pdf +from imspy.data import MzSpectrum +from imspy.utility import normal_pdf @numba.jit(nopython=True) def mu_function_normal_default(intensity: ArrayLike) -> ArrayLike: diff --git a/pyims/pyims/proteome.py b/imspy/imspy/proteome.py similarity index 98% rename from pyims/pyims/proteome.py rename to imspy/imspy/proteome.py index 5a601e64..85103430 100644 --- a/pyims/pyims/proteome.py +++ b/imspy/imspy/proteome.py @@ -5,11 +5,11 @@ from numpy.typing import ArrayLike import pandas as pd import sqlite3 -from pyims.data import MzSpectrum -from pyims.chemistry import get_mono_isotopic_weight, MASS_PROTON +from imspy.data import MzSpectrum +from imspy.chemistry import get_mono_isotopic_weight, MASS_PROTON -from pyims.feature import RTProfile, ScanProfile, ChargeProfile -from pyims.utility import tokenize_proforma_sequence, TokenSequence, get_aa_num_proforma_sequence +from imspy.feature import RTProfile, ScanProfile, ChargeProfile +from imspy.utility import tokenize_proforma_sequence, TokenSequence, get_aa_num_proforma_sequence from enum import Enum from abc import ABC, abstractmethod diff --git a/pyims/pyims/simulation/experiment.py b/imspy/imspy/simulation/experiment.py similarity index 97% rename from pyims/pyims/simulation/experiment.py rename to imspy/imspy/simulation/experiment.py index 2b4846d4..0f53cd20 100644 --- a/pyims/pyims/simulation/experiment.py +++ b/imspy/imspy/simulation/experiment.py @@ -8,10 +8,10 @@ import pyarrow as pa import pyarrow.parquet as pq from tqdm import tqdm -from pyims.data import MzSpectrum, TimsFrame -from pyims.proteome import PeptideDigest, ProteomicsExperimentSampleSlice, ProteomicsExperimentDatabaseHandle -from pyims.isotopes import AveragineGenerator -import pyims.simulation.hardware_models as hardware +from imspy.data import MzSpectrum, TimsFrame +from imspy.proteome import PeptideDigest, ProteomicsExperimentSampleSlice, ProteomicsExperimentDatabaseHandle +from imspy.isotopes import AveragineGenerator +import imspy.simulation.hardware_models as hardware class ProteomicsExperiment(ABC): def __init__(self, path: str): diff --git a/pyims/pyims/simulation/hardware_models.py b/imspy/imspy/simulation/hardware_models.py similarity index 98% rename from pyims/pyims/simulation/hardware_models.py rename to imspy/imspy/simulation/hardware_models.py index 84a82c3f..a4d24e3e 100644 --- a/pyims/pyims/simulation/hardware_models.py +++ b/imspy/imspy/simulation/hardware_models.py @@ -9,11 +9,11 @@ import pandas as pd from scipy.stats import exponnorm, norm, binom, gamma -from pyims.chemistry import STANDARD_TEMPERATURE, STANDARD_PRESSURE, CCS_K0_CONVERSION_CONSTANT, BufferGas, get_num_protonizable_sites -from pyims.proteome import ProteomicsExperimentSampleSlice -from pyims.feature import RTProfile, ScanProfile, ChargeProfile -from pyims.isotopes import AveragineGenerator -from pyims.utility import tokenizer_from_json +from imspy.chemistry import STANDARD_TEMPERATURE, STANDARD_PRESSURE, CCS_K0_CONVERSION_CONSTANT, BufferGas, get_num_protonizable_sites +from imspy.proteome import ProteomicsExperimentSampleSlice +from imspy.feature import RTProfile, ScanProfile, ChargeProfile +from imspy.isotopes import AveragineGenerator +from imspy.utility import tokenizer_from_json class Device(ABC): def __init__(self, name:str): diff --git a/pyims/pyims/utilities.py b/imspy/imspy/utilities.py similarity index 100% rename from pyims/pyims/utilities.py rename to imspy/imspy/utilities.py diff --git a/pyims/pyims/utility.py b/imspy/imspy/utility.py similarity index 99% rename from pyims/pyims/utility.py rename to imspy/imspy/utility.py index ea47e70b..dd504b39 100644 --- a/pyims/pyims/utility.py +++ b/imspy/imspy/utility.py @@ -10,8 +10,8 @@ import pandas as pd from tqdm import tqdm -from pyims.data import MzSpectrum -# TODO bring to pyims +from imspy.data import MzSpectrum +# TODO bring to imspy #from proteolizardalgo.hashing import ReferencePattern diff --git a/pyims/pyproject.toml b/imspy/pyproject.toml similarity index 96% rename from pyims/pyproject.toml rename to imspy/pyproject.toml index 33c003c7..f8bfea2a 100644 --- a/pyims/pyproject.toml +++ b/imspy/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "pyims" +name = "imspy" version = "0.1.0" description = "" authors = ["theGreatHerrLebert "] diff --git a/pyims/tests/__init__.py b/imspy/tests/__init__.py similarity index 100% rename from pyims/tests/__init__.py rename to imspy/tests/__init__.py diff --git a/pyims/pyims/data/__init__.py b/pyims/pyims/data/__init__.py deleted file mode 100644 index 1809a4f5..00000000 --- a/pyims/pyims/data/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from pyims.data.frame import TimsFrame -from pyims.data.spectrum import TimsSpectrum, MzSpectrum -from pyims.data.handle import TimsDataset, TimsDatasetDDA, TimsDatasetDIA -from pyims.data.slice import TimsSlice diff --git a/pyims_connector/Cargo.toml b/pyims_connector/Cargo.toml index a35915dc..03acc030 100644 --- a/pyims_connector/Cargo.toml +++ b/pyims_connector/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "pyims_connector" +name = "imspy_connector" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] -name = "pyims_connector" +name = "imspy_connector" crate-type = ["cdylib"] [dependencies] diff --git a/pyims_connector/pyproject.toml b/pyims_connector/pyproject.toml index 9f6a3dcd..2be28ca1 100644 --- a/pyims_connector/pyproject.toml +++ b/pyims_connector/pyproject.toml @@ -3,7 +3,7 @@ requires = ["maturin>=1.2,<2.0"] build-backend = "maturin" [project] -name = "pyims_connector" +name = "imspy_connector" dependencies = [ "opentims-bruker-bridge>=1.1.0", ] diff --git a/pyims_connector/src/lib.rs b/pyims_connector/src/lib.rs index f3bf75fb..fdbf48bf 100644 --- a/pyims_connector/src/lib.rs +++ b/pyims_connector/src/lib.rs @@ -10,7 +10,7 @@ use crate::py_tims_frame::{PyTimsFrame, PyTimsFrameVectorized}; use crate::py_tims_slice::{PyTimsPlane, PyTimsSlice, PyTimsSliceVectorized}; #[pymodule] -fn pyims_connector(_py: Python, m: &PyModule) -> PyResult<()> { +fn imspy_connector(_py: Python, m: &PyModule) -> PyResult<()> { m.add_class::()?; m.add_class::()?; m.add_class::()?;