alphabase 1.10.1__tar.gz → 1.10.3.dev0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {alphabase-1.10.1/alphabase.egg-info → alphabase-1.10.3.dev0}/PKG-INFO +2 -2
- alphabase-1.10.3.dev0/alphabase/__init__.py +1 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/spectral_library/annotate.py +10 -14
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/spectral_library/decoy.py +51 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0/alphabase.egg-info}/PKG-INFO +2 -2
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase.egg-info/requires.txt +1 -1
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/docs/conf.py +1 -1
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/requirements/requirements.txt +1 -1
- alphabase-1.10.1/alphabase/__init__.py +0 -1
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/LICENSE.txt +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/MANIFEST.in +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/README.md +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/__init__.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/_const.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/aa.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/atom.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/const_files/__emass_element.yaml +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/const_files/amino_acid.tsv +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/const_files/common_constants.yaml +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/const_files/contaminants.fasta +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/const_files/modification.tsv +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/const_files/nist_element.yaml +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/const_files/pg_reader.yaml +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/const_files/protease.yaml +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/const_files/psm_reader.yaml +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/element.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/isotope.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/modification.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/spectral_library.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/io/__init__.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/io/hdf.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/io/tempmmap.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/numba_wrapper.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/peptide/__init__.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/peptide/fragment.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/peptide/mass_calc.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/peptide/mobility.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/peptide/precursor.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/pg_reader/__init__.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/pg_reader/alphadia_pg_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/pg_reader/alphapept_pg_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/pg_reader/diann_pg_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/pg_reader/directlfq_pg_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/pg_reader/fragpipe_pg_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/pg_reader/keys.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/pg_reader/maxquant_pg_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/pg_reader/mztab_pg_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/pg_reader/pd_pg_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/pg_reader/pg_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/pg_reader/spectronaut_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/protein/__init__.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/protein/fasta.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/protein/inference.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/protein/lcp_digest.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/protein/protein_level_decoy.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/psm_reader/__init__.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/psm_reader/alphadia_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/psm_reader/alphapept_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/psm_reader/dia_psm_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/psm_reader/keys.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/psm_reader/maxquant_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/psm_reader/modification_mapper.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/psm_reader/msfragger_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/psm_reader/pfind_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/psm_reader/psm_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/psm_reader/sage_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/psm_reader/utils.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/smiles/__init__.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/smiles/adding_smiles.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/smiles/peptide.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/smiles/smiles.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/spectral_library/__init__.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/spectral_library/base.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/spectral_library/flat.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/spectral_library/metrics.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/spectral_library/peaks_reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/spectral_library/reader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/spectral_library/translate.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/spectral_library/translate_diann.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/spectral_library/validate.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/tools/__init__.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/tools/data_downloader.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/utils.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/yaml_utils.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase.egg-info/SOURCES.txt +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase.egg-info/dependency_links.txt +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase.egg-info/top_level.txt +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/nbs_tests/conftest.py +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/pyproject.toml +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/requirements/requirements_development.txt +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/requirements/requirements_docs.txt +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/requirements/requirements_hdf.txt +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/requirements/requirements_hdf_loose.txt +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/requirements/requirements_loose.txt +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/requirements/requirements_numba.txt +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/requirements/requirements_numba_loose.txt +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/requirements/requirements_rdkit.txt +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/requirements/requirements_rdkit_loose.txt +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/requirements/requirements_tests.txt +0 -0
- {alphabase-1.10.1 → alphabase-1.10.3.dev0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: alphabase
|
|
3
|
-
Version: 1.10.
|
|
3
|
+
Version: 1.10.3.dev0
|
|
4
4
|
Summary: An infrastructure Python package of the AlphaX ecosystem
|
|
5
5
|
Author-email: Mann Labs <jalew188@gmail.com>
|
|
6
6
|
License: Apache License
|
|
@@ -246,7 +246,7 @@ Requires-Dist: pyahocorasick==2.1.0; extra == "stable"
|
|
|
246
246
|
Requires-Dist: pyteomics==4.7.5; extra == "stable"
|
|
247
247
|
Requires-Dist: pyyaml==6.0.2; extra == "stable"
|
|
248
248
|
Requires-Dist: lxml==5.3.0; extra == "stable"
|
|
249
|
-
Requires-Dist: certifi==
|
|
249
|
+
Requires-Dist: certifi==2026.10.19; extra == "stable"
|
|
250
250
|
Provides-Extra: numba
|
|
251
251
|
Requires-Dist: numba; extra == "numba"
|
|
252
252
|
Provides-Extra: numba-stable
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.10.3-dev0"
|
|
@@ -169,14 +169,11 @@ def annotate_fragments_flat(
|
|
|
169
169
|
fragment_df_list = []
|
|
170
170
|
matched_precursor_df = speclib_flat.precursor_df.copy()
|
|
171
171
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
matched_precursor_df["flat_frag_start_idx"],
|
|
178
|
-
matched_precursor_df["flat_frag_stop_idx"],
|
|
179
|
-
)
|
|
172
|
+
for peak_start, peak_stop, flat_frag_start, flat_frag_stop in zip(
|
|
173
|
+
matched_precursor_df["peak_start_idx"],
|
|
174
|
+
matched_precursor_df["peak_stop_idx"],
|
|
175
|
+
matched_precursor_df["flat_frag_start_idx"],
|
|
176
|
+
matched_precursor_df["flat_frag_stop_idx"],
|
|
180
177
|
):
|
|
181
178
|
spectrum_peak_df = raw_data_peak_df.iloc[peak_start:peak_stop].copy()
|
|
182
179
|
fragment_df = speclib_flat.fragment_df.iloc[flat_frag_start:flat_frag_stop]
|
|
@@ -199,14 +196,13 @@ def annotate_fragments_flat(
|
|
|
199
196
|
mass_error_ppm=mass_error_ppm,
|
|
200
197
|
)
|
|
201
198
|
|
|
202
|
-
matched_precursor_df.loc[i, "flat_frag_start_idx"] = start_index
|
|
203
|
-
matched_precursor_df.loc[i, "flat_frag_stop_idx"] = start_index + len(
|
|
204
|
-
spectrum_peak_df
|
|
205
|
-
)
|
|
206
|
-
start_index += len(spectrum_peak_df)
|
|
207
|
-
|
|
208
199
|
fragment_df_list.append(spectrum_peak_df)
|
|
209
200
|
|
|
201
|
+
peak_counts = np.array([len(df) for df in fragment_df_list], dtype=np.int64)
|
|
202
|
+
flat_frag_stop_idx = np.cumsum(peak_counts)
|
|
203
|
+
matched_precursor_df["flat_frag_start_idx"] = flat_frag_stop_idx - peak_counts
|
|
204
|
+
matched_precursor_df["flat_frag_stop_idx"] = flat_frag_stop_idx
|
|
205
|
+
|
|
210
206
|
outlib_flat = SpecLibFlat()
|
|
211
207
|
outlib_flat.precursor_df = matched_precursor_df.drop(
|
|
212
208
|
columns=["peak_start_idx", "peak_stop_idx"]
|
|
@@ -65,6 +65,55 @@ class DIANNDecoyGenerator(BaseDecoyGenerator):
|
|
|
65
65
|
)
|
|
66
66
|
|
|
67
67
|
|
|
68
|
+
class DIANNKeepProlineDecoyGenerator(DIANNDecoyGenerator):
|
|
69
|
+
"""
|
|
70
|
+
Decoy of `DIANNDecoyGenerator` that keeps a proline before the C-terminal
|
|
71
|
+
residue and mutates the residue before it instead.
|
|
72
|
+
|
|
73
|
+
Sequences shorter than 5 residues get the parent's decoy, because
|
|
74
|
+
moving the mutation inwards would hit the N-terminal mutation.
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
def _decoy(self, sequence: str) -> str:
|
|
78
|
+
if len(sequence) < 5 or sequence[-2] != "P":
|
|
79
|
+
return super()._decoy(sequence)
|
|
80
|
+
return (
|
|
81
|
+
sequence[0]
|
|
82
|
+
+ self._mutate(sequence[1])
|
|
83
|
+
+ sequence[2:-3]
|
|
84
|
+
+ self._mutate(sequence[-3])
|
|
85
|
+
+ sequence[-2:]
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
def _mutate(self, amino_acid: str) -> str:
|
|
89
|
+
return self.mutated_AAs[self.raw_AAs.index(amino_acid)]
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
class DIANNInnerDecoyGenerator(DIANNKeepProlineDecoyGenerator):
|
|
93
|
+
"""
|
|
94
|
+
Decoy that applies the mutation map of `DIANNDecoyGenerator` to the third
|
|
95
|
+
and the third-to-last residue instead of the second and the second-to-last.
|
|
96
|
+
|
|
97
|
+
A proline at either mutated position moves that mutation one residue
|
|
98
|
+
inwards, so the decoy keeps the proline. Sequences shorter than 7 residues
|
|
99
|
+
get the parent's decoy, because the two mutations could fall on the same
|
|
100
|
+
residue.
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
def _decoy(self, sequence: str) -> str:
|
|
104
|
+
if len(sequence) < 7:
|
|
105
|
+
return super()._decoy(sequence)
|
|
106
|
+
first, second = 2, len(sequence) - 3
|
|
107
|
+
if sequence[second] == "P":
|
|
108
|
+
second -= 1
|
|
109
|
+
if sequence[first] == "P" and first + 1 < second:
|
|
110
|
+
first += 1
|
|
111
|
+
residues = list(sequence)
|
|
112
|
+
residues[first] = self._mutate(sequence[first])
|
|
113
|
+
residues[second] = self._mutate(sequence[second])
|
|
114
|
+
return "".join(residues)
|
|
115
|
+
|
|
116
|
+
|
|
68
117
|
class PseudoReverseDecoyGenerator(BaseDecoyGenerator):
|
|
69
118
|
def __init__(self, fix_C_term: bool = True):
|
|
70
119
|
"""
|
|
@@ -258,3 +307,5 @@ register and get different types of decoy methods.
|
|
|
258
307
|
|
|
259
308
|
decoy_lib_provider.register("pseudo_reverse", PseudoReverseDecoyGenerator)
|
|
260
309
|
decoy_lib_provider.register("diann", DIANNDecoyGenerator)
|
|
310
|
+
decoy_lib_provider.register("diann_keep_proline", DIANNKeepProlineDecoyGenerator)
|
|
311
|
+
decoy_lib_provider.register("diann_inner", DIANNInnerDecoyGenerator)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: alphabase
|
|
3
|
-
Version: 1.10.
|
|
3
|
+
Version: 1.10.3.dev0
|
|
4
4
|
Summary: An infrastructure Python package of the AlphaX ecosystem
|
|
5
5
|
Author-email: Mann Labs <jalew188@gmail.com>
|
|
6
6
|
License: Apache License
|
|
@@ -246,7 +246,7 @@ Requires-Dist: pyahocorasick==2.1.0; extra == "stable"
|
|
|
246
246
|
Requires-Dist: pyteomics==4.7.5; extra == "stable"
|
|
247
247
|
Requires-Dist: pyyaml==6.0.2; extra == "stable"
|
|
248
248
|
Requires-Dist: lxml==5.3.0; extra == "stable"
|
|
249
|
-
Requires-Dist: certifi==
|
|
249
|
+
Requires-Dist: certifi==2026.10.19; extra == "stable"
|
|
250
250
|
Provides-Extra: numba
|
|
251
251
|
Requires-Dist: numba; extra == "numba"
|
|
252
252
|
Provides-Extra: numba-stable
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.10.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/const_files/__emass_element.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/const_files/common_constants.yaml
RENAMED
|
File without changes
|
{alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/const_files/contaminants.fasta
RENAMED
|
File without changes
|
|
File without changes
|
{alphabase-1.10.1 → alphabase-1.10.3.dev0}/alphabase/constants/const_files/nist_element.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|