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

53 docs init pattern #65

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
03eab61
ADD docs for mzml.py and sciex.py
jalew188 Jun 13, 2024
9a5d52d
FIX pre-commit run --all-files
jalew188 Jun 13, 2024
f153caf
#53 ADD docs for match_utils.py and spec_finder.py
jalew188 Jun 13, 2024
117d046
#53 FIX pre-commit run --all-files
jalew188 Jun 13, 2024
1e1b10b
#53 ADD docs for psm_match.py
jalew188 Jun 13, 2024
c34f545
#53 ADD docs for utils modules
jalew188 Jun 13, 2024
29d6d35
#53 ADD docs for viz.df_utils.py
jalew188 Jun 14, 2024
12cf6eb
#53 ADD docs for viz
jalew188 Jun 15, 2024
1e61737
#53 ADD docs for xic_plot.py
jalew188 Jun 15, 2024
7e1a478
#53 FIX mass_tols are always Da
jalew188 Jun 15, 2024
65b1d36
#53 ADD docs viz.xic_plot.py
jalew188 Jun 15, 2024
113fba5
#53 FIX pre-commit run --all-files
jalew188 Jun 15, 2024
640622d
#53 FIX docs
jalew188 Jun 17, 2024
6a9e13c
#53 FIX docs
jalew188 Jun 17, 2024
e221cb9
#53 FIX typos in docs
jalew188 Jun 17, 2024
d10fa5e
#53 FIX docs for psm_match.py
jalew188 Jun 17, 2024
d243b64
#53 FIX pre-commit
jalew188 Jun 17, 2024
bd34af7
#53 FIX docs: use init pattern
jalew188 Jun 17, 2024
6089737
#53 FIX docs: use init pattern
jalew188 Jun 17, 2024
5a9ce6b
#53 FIX add more docs in psm_match.py
jalew188 Jun 18, 2024
e12ed10
Merge pull request #56 from MannLabs/53-docs-wiff-mzml
jalew188 Jun 18, 2024
9974ca7
Merge pull request #57 from MannLabs/53-match-i
jalew188 Jun 18, 2024
80df53c
Merge pull request #58 from MannLabs/53-doc-match-ii
jalew188 Jun 18, 2024
4ab74b5
define sister peaks
jalew188 Jun 18, 2024
ef806b0
FIX rename peak_intens to peak_intensities
jalew188 Jun 18, 2024
dd104d0
FIX docs with more details
jalew188 Jun 18, 2024
938c13d
Merge pull request #60 from MannLabs/53-docs-viz
jalew188 Jun 18, 2024
dd785ae
FIX docs with more details
jalew188 Jun 18, 2024
257d96a
xic_plot_tims.py deprecation
jalew188 Jun 18, 2024
42a86c8
Merge pull request #59 from MannLabs/53-docs-utils
jalew188 Jun 18, 2024
39fed08
Merge pull request #61 from MannLabs/53-docs-viz-i
jalew188 Jun 18, 2024
8d6534c
Merge pull request #62 from MannLabs/53-docs-viz-ii
jalew188 Jun 18, 2024
e355845
Merge branch '53-add-sphinx' into 53-docs-init-pattern
jalew188 Jun 20, 2024
f1c8679
#53 put parameters docs into __init__ in class def
jalew188 Jun 20, 2024
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
8 changes: 8 additions & 0 deletions alpharaw/match/mass_calibration.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import warnings

import numpy as np
import pandas as pd
from sklearn.neighbors import KNeighborsRegressor

warnings.warn(
"This module will be removed in the future as "
"mass calibration has already been implemented in alphaDIA.",
category=DeprecationWarning,
)


def get_fragment_median(start_end_idxes: tuple, frag_df: pd.DataFrame):
start_idx, end_idx = start_end_idxes
Expand Down
30 changes: 28 additions & 2 deletions alpharaw/match/match_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,33 @@ def match_batch_spec(
peak_stop_idxes: np.ndarray,
query_mzs: np.ndarray,
query_mz_tols: np.ndarray,
):
) -> Tuple[np.ndarray, np.ndarray]:
"""
Extract matched mzs and intensities for query m/z values against the given batch spectra.

Parameters
----------
spec_idxes : np.ndarray
The batch spectra, given as spectrum indexes.
peak_mzs : np.ndarray
The peak m/z values in the whole raw data.
peak_intens : np.ndarray
The peak intensities in the whole raw data.
peak_start_idxes : np.ndarray
The batch spectra, given as the start indexes in peak m/z and intensities.
peak_stop_idxes : np.ndarray
The batch spectra, given as the stop indexes in peak m/z and intensities.
query_mzs : np.ndarray
The query m/z values, these can be from fragments of a precursor.
query_mz_tols : np.ndarray
The query tolerance values of query_mzs.

Returns
-------
Tuple[ndarray, ndarray]
ndarray with shape (spectrum num, query num): matched m/z values. 0.0 if not matched.
ndarray with shape (spectrum num, query num): matched intensity values. 0.0 if not matched.
"""
matched_mzs = np.zeros((len(spec_idxes), len(query_mzs)), dtype=peak_mzs.dtype)
matched_intens = np.zeros(
(len(spec_idxes), len(query_mzs)), dtype=peak_intens.dtype
Expand Down Expand Up @@ -63,7 +89,7 @@ def match_closest_peaks(
query_mzs: np.ndarray,
query_mz_tols: np.ndarray,
) -> np.ndarray:
"""Matching query mz values against sorted MS2/spec masses,
"""Matching query mz values against sorted MS2/spec m/z values,
only closest (minimal abs mass error) peaks are returned.

Parameters
Expand Down
Loading
Loading