pyonsite 0.0.1__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.
pyonsite-0.0.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 BigBio Stack
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,337 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyonsite
3
+ Version: 0.0.1
4
+ Summary: onsite: mass spectrometry post-translational localization tool
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Keywords: mass-spectrometry,proteomics,phosphorylation,ptm,ascore,phosphors
8
+ Author: BigBio Stack
9
+ Requires-Python: >=3.11
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
18
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
19
+ Requires-Dist: click (>=8.0.0)
20
+ Requires-Dist: numpy (>=2.3.2)
21
+ Requires-Dist: pyopenms (>=3.4.0)
22
+ Requires-Dist: scipy (>=1.16.1)
23
+ Project-URL: Documentation, https://github.com/bigbio/onsite
24
+ Project-URL: Homepage, https://github.com/bigbio/onsite
25
+ Project-URL: Repository, https://github.com/bigbio/onsite
26
+ Description-Content-Type: text/markdown
27
+
28
+ # onsite
29
+
30
+ [![Python application](https://github.com/bigbio/onsite/actions/workflows/python-app.yml/badge.svg?branch=main)](https://github.com/bigbio/onsite/actions/workflows/python-app.yml)
31
+ ![PyPI - Version](https://img.shields.io/pypi/v/onsite?style=flat)
32
+ ![PyPI - Downloads](https://img.shields.io/pypi/dm/onsite)
33
+ ![Pepy Total Downloads](https://img.shields.io/pepy/dt/onsite)
34
+ ![GitHub Repo stars](https://img.shields.io/github/stars/bigbio/onsite)
35
+
36
+ ## What is onsite?
37
+
38
+ **onsite** is a comprehensive Python package for mass spectrometry post-translational modification (PTM) localization. It provides algorithms for confident phosphorylation site localization and scoring, including implementations of AScore, PhosphoRS, and LucXor (LuciPHOr2).
39
+
40
+ ### Key Features
41
+
42
+ - **Multiple Algorithms**: AScore, PhosphoRS, and LucXor implementations
43
+ - **Statistical Validation**: Probability-based scoring with FLR estimation
44
+ - **Unified CLI**: Single command-line interface for all algorithms
45
+ - **Multi-threading**: Parallel processing for improved performance
46
+ - **PyOpenMS Integration**: Seamless integration with the OpenMS ecosystem
47
+ - **High Accuracy**: Confident site localization with statistical validation
48
+ - **Flexible API**: Both command-line and Python API support
49
+
50
+ ## Supported Algorithms
51
+
52
+ onsite provides three complementary algorithms for PTM localization:
53
+
54
+ ### 1. **AScore Algorithm**
55
+ - **Method**: Probability-based approach using binomial statistics
56
+ - **Features**: Site-determining ion analysis, fast processing
57
+ - **Output**: AScore values indicating localization confidence
58
+ - **Citation**: Beausoleil et al. (2006) *Nature Biotechnology*
59
+
60
+ ### 2. **PhosphoRS Algorithm**
61
+ - **Method**: Compomics-style scoring with isomer analysis
62
+ - **Features**: Site-specific probabilities, detailed isomer analysis
63
+ - **Output**: Site probability scores and isomer details
64
+ - **Citation**: Taus et al. (2011) *Journal of Proteome Research*
65
+
66
+ ### 3. **LucXor (LuciPHOr2) Algorithm**
67
+ - **Method**: Two-stage processing with FLR estimation
68
+ - **Features**: False localization rate calculation, decoy-based validation
69
+ - **Output**: Delta scores, peptide scores, global and local FLR
70
+ - **Citation**: Fermin et al. (2013, 2015) *MCP* and *Bioinformatics*
71
+
72
+ ## Installation
73
+
74
+ ### Prerequisites
75
+
76
+ - Python 3.11+
77
+ - PyOpenMS 3.4.0+
78
+ - NumPy 2.3.2+
79
+ - SciPy 1.16.1+
80
+
81
+ ### Using Poetry (Recommended)
82
+
83
+ ```bash
84
+ # Clone the repository
85
+ git clone https://github.com/bigbio/onsite.git
86
+ cd onsite
87
+
88
+ # Install with Poetry
89
+ poetry install
90
+
91
+ # Activate the virtual environment
92
+ poetry shell
93
+ ```
94
+
95
+ ### Using pip
96
+
97
+ ```bash
98
+ # Install from PyPI (note: PyPI package name is 'pyonsite')
99
+ pip install pyonsite
100
+
101
+ # Or install from source
102
+ git clone https://github.com/bigbio/onsite.git
103
+ cd onsite
104
+ pip install -e .
105
+ ```
106
+
107
+ **Note:** The package is published on PyPI as `pyonsite` due to a naming conflict, but the module is still imported as `onsite`.
108
+
109
+ ### Development Installation
110
+
111
+ ```bash
112
+ # Clone the repository
113
+ git clone https://github.com/bigbio/onsite.git
114
+ cd onsite
115
+
116
+ # Install with development dependencies
117
+ poetry install --with dev
118
+
119
+ # Or with pip
120
+ pip install -e ".[dev]"
121
+ ```
122
+
123
+ ## Usage
124
+
125
+ ### Command Line Interface
126
+
127
+ onsite provides a unified command-line interface for all algorithms:
128
+
129
+ #### Unified onsite CLI
130
+
131
+ ```bash
132
+ # AScore algorithm
133
+ onsite ascore -in spectra.mzML -id identifications.idXML -out results.idXML
134
+
135
+ # PhosphoRS algorithm
136
+ onsite phosphors -in spectra.mzML -id identifications.idXML -out results.idXML
137
+
138
+ # LucXor algorithm
139
+ onsite lucxor -in spectra.mzML -id identifications.idXML -out results.idXML
140
+ ```
141
+
142
+ #### Individual Pipeline Tools
143
+
144
+ ##### AScore Pipeline
145
+
146
+ ```bash
147
+ # Basic usage
148
+ python -m onsite.ascore.cli -in spectra.mzML -id identifications.idXML -out results.idXML
149
+
150
+ # With custom parameters
151
+ python -m onsite.ascore.cli -in spectra.mzML -id identifications.idXML -out results.idXML \
152
+ --fragment-mass-tolerance 0.05 \
153
+ --fragment-mass-unit Da \
154
+ --threads 4 \
155
+ --add-decoys
156
+ ```
157
+
158
+ ##### PhosphoRS Pipeline
159
+
160
+ ```bash
161
+ # Basic usage
162
+ python -m onsite.phosphors.cli -in spectra.mzML -id identifications.idXML -out results.idXML
163
+
164
+ # With custom parameters
165
+ python -m onsite.phosphors.cli -in spectra.mzML -id identifications.idXML -out results.idXML \
166
+ --fragment-mass-tolerance 0.05 \
167
+ --fragment-mass-unit Da \
168
+ --threads 1 \
169
+ --add-decoys
170
+ ```
171
+
172
+ ##### LucXor Pipeline
173
+
174
+ ```bash
175
+ # Basic usage
176
+ python -m onsite.lucxor.cli -in spectra.mzML -id identifications.idXML -out results.idXML
177
+
178
+ # With custom parameters
179
+ python -m onsite.lucxor.cli -in spectra.mzML -id identifications.idXML -out results.idXML \
180
+ --fragment-method HCD \
181
+ --fragment-mass-tolerance 0.5 \
182
+ --fragment-error-units Da \
183
+ --threads 8 \
184
+ --debug
185
+ ```
186
+
187
+ ### Command-line Options
188
+
189
+ #### AScore Options
190
+
191
+ | Option | Default | Description |
192
+ |---|---|---|
193
+ | `-in` | - | Input mzML file with spectra |
194
+ | `-id` | - | Input idXML file with identifications |
195
+ | `-out` | - | Output idXML file with scores |
196
+ | `--fragment-mass-tolerance` | 0.05 | Fragment mass tolerance |
197
+ | `--fragment-mass-unit` | Da | Tolerance unit (Da or ppm) |
198
+ | `--threads` | 1 | Number of threads for parallel processing |
199
+ | `--add-decoys` | False | Include decoy sites for validation |
200
+ | `--debug` | False | Enable debug logging |
201
+
202
+ #### PhosphoRS Options
203
+
204
+ | Option | Default | Description |
205
+ |---|---|---|
206
+ | `-in` | - | Input mzML file with spectra |
207
+ | `-id` | - | Input idXML file with identifications |
208
+ | `-out` | - | Output idXML file with scores |
209
+ | `--fragment-mass-tolerance` | 0.05 | Fragment mass tolerance |
210
+ | `--fragment-mass-unit` | Da | Tolerance unit (Da or ppm) |
211
+ | `--threads` | 1 | Number of threads for parallel processing |
212
+ | `--add-decoys` | False | Include decoy sites for validation |
213
+ | `--debug` | False | Enable debug logging |
214
+
215
+ #### LucXor Options
216
+
217
+ | Option | Default | Description |
218
+ |---|---|---|
219
+ | `-in` | - | Input mzML file with spectra |
220
+ | `-id` | - | Input idXML file with identifications |
221
+ | `-out` | - | Output idXML file with scores |
222
+ | `--fragment-method` | CID | Fragmentation method (CID or HCD) |
223
+ | `--fragment-mass-tolerance` | 0.5 | Fragment mass tolerance |
224
+ | `--fragment-error-units` | Da | Tolerance units (Da or ppm) |
225
+ | `--min-mz` | 150.0 | Minimum m/z value to consider |
226
+ | `--target-modifications` | Phospho (S/T/Y) | List of target PTM definitions |
227
+ | `--neutral-losses` | sty -H3PO4 -97.97690 | Neutral loss definitions applied during scoring |
228
+ | `--decoy-mass` | 79.966331 | Mass offset used when generating decoy permutations |
229
+ | `--decoy-neutral-losses` | X -H3PO4 -97.97690 | Neutral loss patterns for decoy permutations |
230
+ | `--max-charge-state` | 5 | Maximum charge state |
231
+ | `--max-peptide-length` | 40 | Maximum peptide length |
232
+ | `--max-num-perm` | 16384 | Maximum permutations |
233
+ | `--modeling-score-threshold` | 0.95 | Minimum score for selecting PSMs during model building |
234
+ | `--scoring-threshold` | 0.0 | Minimum LucXor score to report |
235
+ | `--min-num-psms-model` | 50 | Minimum number of high-scoring PSMs required for modeling |
236
+ | `--threads` | 1 | Number of threads for parallel processing |
237
+ | `--rt-tolerance` | 0.01 | RT tolerance used when matching spectra by retention time |
238
+ | `--debug` | False | Enable debug logging |
239
+
240
+ ## Algorithm Details
241
+
242
+ ### AScore Algorithm
243
+
244
+ The AScore algorithm provides phosphorylation site localization by analyzing MS/MS fragment ions to identify site-determining ions and computing localization probabilities based on fragment evidence.
245
+
246
+ **Output Metrics:**
247
+
248
+ - `AScore_pep_score`: Overall peptide score
249
+ - `AScore_1, AScore_2, ...`: Individual site scores
250
+ - `ProForma`: Standardized sequence notation with confidence scores
251
+
252
+ ### PhosphoRS Algorithm
253
+
254
+ The PhosphoRS algorithm implements a comprehensive approach using isomer generation, theoretical spectrum matching, and probability scoring for confident phosphorylation site assignment.
255
+
256
+ **Output Metrics:**
257
+ - Site-specific probability scores (0-100%)
258
+ - Isomer details with sequence and score
259
+ - Detailed confidence metrics
260
+
261
+ ### LucXor (LuciPHOr2) Algorithm
262
+
263
+ LucXor implements the complete LuciPHOr2 algorithm with two-stage processing for accurate PTM localization with false localization rate (FLR) estimation.
264
+
265
+ **Output Metrics:**
266
+ - `Luciphor_delta_score`: Main localization score
267
+ - `Luciphor_pep_score`: Peptide identification score
268
+ - `Luciphor_global_flr`: Global false localization rate
269
+ - `Luciphor_local_flr`: Local false localization rate
270
+
271
+ ## Example Results
272
+
273
+ You can find example result files in the `data` directory. Here are the direct links to different algorithm result files:
274
+
275
+ | Algorithm | Description | Result File |
276
+ |---|---|---|
277
+ | AScore | AScore phosphorylation site localization results | [AScore Example](data/1_ascore_result.idXML) |
278
+ | PhosphoRS | PhosphoRS phosphorylation site localization results | [PhosphoRS Example](data/1_phosphors_result.idXML) |
279
+ | LucXor | LucXor (LuciPHOr2) PTM localization results with FLR | [LucXor Example](data/1_lucxor_result.idXML) |
280
+
281
+ ## Documentation
282
+
283
+ For more detailed information:
284
+
285
+ - [AScore Algorithm Documentation](docs/algorithms/ascore.md)
286
+ - [PhosphoRS Algorithm Documentation](docs/algorithms/phosphors.md)
287
+ - [LucXor Algorithm Documentation](docs/algorithms/lucxor.md)
288
+ - [Citations and References](docs/citations.md)
289
+
290
+ ## Contributing
291
+
292
+ To contribute to onsite:
293
+
294
+ 1. Fork the repository
295
+ 2. Clone your fork: `git clone https://github.com/YOUR-USERNAME/onsite`
296
+ 3. Create a feature branch: `git checkout -b new-feature`
297
+ 4. Make your changes
298
+ 5. Install in development mode: `pip install -e .`
299
+ 6. Test your changes: `poetry run pytest`
300
+ 7. Commit your changes: `git commit -am 'Add new feature'`
301
+ 8. Push to the branch: `git push origin new-feature`
302
+ 9. Submit a pull request
303
+
304
+ ## License
305
+
306
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
307
+
308
+ ## Citation
309
+
310
+ If you use onsite in your research, please cite:
311
+
312
+ ```text
313
+ onsite: Mass spectrometry post-translational modification localization tool.
314
+ https://github.com/bigbio/onsite
315
+ ```
316
+
317
+ ## Related Tools
318
+
319
+ - [PyOpenMS](https://pyopenms.readthedocs.io/) - Python bindings for OpenMS
320
+ - [OpenMS](https://www.openms.de/) - Open-source tools for mass spectrometry
321
+ - [nf-core/quantms](https://nf-co.re/quantms) - Quantitative mass spectrometry workflow
322
+
323
+ ## Need Help?
324
+
325
+ If you have questions or need assistance:
326
+ - [Open an issue](https://github.com/bigbio/onsite/issues) on GitHub
327
+ - Check [existing issues](https://github.com/bigbio/onsite/issues?q=is%3Aissue) for solutions
328
+
329
+ ## Acknowledgments
330
+
331
+ onsite builds upon the excellent work of the original algorithm developers and the OpenMS community. We thank all contributors and users for their feedback and support.
332
+
333
+ ---
334
+
335
+
336
+
337
+
@@ -0,0 +1,309 @@
1
+ # onsite
2
+
3
+ [![Python application](https://github.com/bigbio/onsite/actions/workflows/python-app.yml/badge.svg?branch=main)](https://github.com/bigbio/onsite/actions/workflows/python-app.yml)
4
+ ![PyPI - Version](https://img.shields.io/pypi/v/onsite?style=flat)
5
+ ![PyPI - Downloads](https://img.shields.io/pypi/dm/onsite)
6
+ ![Pepy Total Downloads](https://img.shields.io/pepy/dt/onsite)
7
+ ![GitHub Repo stars](https://img.shields.io/github/stars/bigbio/onsite)
8
+
9
+ ## What is onsite?
10
+
11
+ **onsite** is a comprehensive Python package for mass spectrometry post-translational modification (PTM) localization. It provides algorithms for confident phosphorylation site localization and scoring, including implementations of AScore, PhosphoRS, and LucXor (LuciPHOr2).
12
+
13
+ ### Key Features
14
+
15
+ - **Multiple Algorithms**: AScore, PhosphoRS, and LucXor implementations
16
+ - **Statistical Validation**: Probability-based scoring with FLR estimation
17
+ - **Unified CLI**: Single command-line interface for all algorithms
18
+ - **Multi-threading**: Parallel processing for improved performance
19
+ - **PyOpenMS Integration**: Seamless integration with the OpenMS ecosystem
20
+ - **High Accuracy**: Confident site localization with statistical validation
21
+ - **Flexible API**: Both command-line and Python API support
22
+
23
+ ## Supported Algorithms
24
+
25
+ onsite provides three complementary algorithms for PTM localization:
26
+
27
+ ### 1. **AScore Algorithm**
28
+ - **Method**: Probability-based approach using binomial statistics
29
+ - **Features**: Site-determining ion analysis, fast processing
30
+ - **Output**: AScore values indicating localization confidence
31
+ - **Citation**: Beausoleil et al. (2006) *Nature Biotechnology*
32
+
33
+ ### 2. **PhosphoRS Algorithm**
34
+ - **Method**: Compomics-style scoring with isomer analysis
35
+ - **Features**: Site-specific probabilities, detailed isomer analysis
36
+ - **Output**: Site probability scores and isomer details
37
+ - **Citation**: Taus et al. (2011) *Journal of Proteome Research*
38
+
39
+ ### 3. **LucXor (LuciPHOr2) Algorithm**
40
+ - **Method**: Two-stage processing with FLR estimation
41
+ - **Features**: False localization rate calculation, decoy-based validation
42
+ - **Output**: Delta scores, peptide scores, global and local FLR
43
+ - **Citation**: Fermin et al. (2013, 2015) *MCP* and *Bioinformatics*
44
+
45
+ ## Installation
46
+
47
+ ### Prerequisites
48
+
49
+ - Python 3.11+
50
+ - PyOpenMS 3.4.0+
51
+ - NumPy 2.3.2+
52
+ - SciPy 1.16.1+
53
+
54
+ ### Using Poetry (Recommended)
55
+
56
+ ```bash
57
+ # Clone the repository
58
+ git clone https://github.com/bigbio/onsite.git
59
+ cd onsite
60
+
61
+ # Install with Poetry
62
+ poetry install
63
+
64
+ # Activate the virtual environment
65
+ poetry shell
66
+ ```
67
+
68
+ ### Using pip
69
+
70
+ ```bash
71
+ # Install from PyPI (note: PyPI package name is 'pyonsite')
72
+ pip install pyonsite
73
+
74
+ # Or install from source
75
+ git clone https://github.com/bigbio/onsite.git
76
+ cd onsite
77
+ pip install -e .
78
+ ```
79
+
80
+ **Note:** The package is published on PyPI as `pyonsite` due to a naming conflict, but the module is still imported as `onsite`.
81
+
82
+ ### Development Installation
83
+
84
+ ```bash
85
+ # Clone the repository
86
+ git clone https://github.com/bigbio/onsite.git
87
+ cd onsite
88
+
89
+ # Install with development dependencies
90
+ poetry install --with dev
91
+
92
+ # Or with pip
93
+ pip install -e ".[dev]"
94
+ ```
95
+
96
+ ## Usage
97
+
98
+ ### Command Line Interface
99
+
100
+ onsite provides a unified command-line interface for all algorithms:
101
+
102
+ #### Unified onsite CLI
103
+
104
+ ```bash
105
+ # AScore algorithm
106
+ onsite ascore -in spectra.mzML -id identifications.idXML -out results.idXML
107
+
108
+ # PhosphoRS algorithm
109
+ onsite phosphors -in spectra.mzML -id identifications.idXML -out results.idXML
110
+
111
+ # LucXor algorithm
112
+ onsite lucxor -in spectra.mzML -id identifications.idXML -out results.idXML
113
+ ```
114
+
115
+ #### Individual Pipeline Tools
116
+
117
+ ##### AScore Pipeline
118
+
119
+ ```bash
120
+ # Basic usage
121
+ python -m onsite.ascore.cli -in spectra.mzML -id identifications.idXML -out results.idXML
122
+
123
+ # With custom parameters
124
+ python -m onsite.ascore.cli -in spectra.mzML -id identifications.idXML -out results.idXML \
125
+ --fragment-mass-tolerance 0.05 \
126
+ --fragment-mass-unit Da \
127
+ --threads 4 \
128
+ --add-decoys
129
+ ```
130
+
131
+ ##### PhosphoRS Pipeline
132
+
133
+ ```bash
134
+ # Basic usage
135
+ python -m onsite.phosphors.cli -in spectra.mzML -id identifications.idXML -out results.idXML
136
+
137
+ # With custom parameters
138
+ python -m onsite.phosphors.cli -in spectra.mzML -id identifications.idXML -out results.idXML \
139
+ --fragment-mass-tolerance 0.05 \
140
+ --fragment-mass-unit Da \
141
+ --threads 1 \
142
+ --add-decoys
143
+ ```
144
+
145
+ ##### LucXor Pipeline
146
+
147
+ ```bash
148
+ # Basic usage
149
+ python -m onsite.lucxor.cli -in spectra.mzML -id identifications.idXML -out results.idXML
150
+
151
+ # With custom parameters
152
+ python -m onsite.lucxor.cli -in spectra.mzML -id identifications.idXML -out results.idXML \
153
+ --fragment-method HCD \
154
+ --fragment-mass-tolerance 0.5 \
155
+ --fragment-error-units Da \
156
+ --threads 8 \
157
+ --debug
158
+ ```
159
+
160
+ ### Command-line Options
161
+
162
+ #### AScore Options
163
+
164
+ | Option | Default | Description |
165
+ |---|---|---|
166
+ | `-in` | - | Input mzML file with spectra |
167
+ | `-id` | - | Input idXML file with identifications |
168
+ | `-out` | - | Output idXML file with scores |
169
+ | `--fragment-mass-tolerance` | 0.05 | Fragment mass tolerance |
170
+ | `--fragment-mass-unit` | Da | Tolerance unit (Da or ppm) |
171
+ | `--threads` | 1 | Number of threads for parallel processing |
172
+ | `--add-decoys` | False | Include decoy sites for validation |
173
+ | `--debug` | False | Enable debug logging |
174
+
175
+ #### PhosphoRS Options
176
+
177
+ | Option | Default | Description |
178
+ |---|---|---|
179
+ | `-in` | - | Input mzML file with spectra |
180
+ | `-id` | - | Input idXML file with identifications |
181
+ | `-out` | - | Output idXML file with scores |
182
+ | `--fragment-mass-tolerance` | 0.05 | Fragment mass tolerance |
183
+ | `--fragment-mass-unit` | Da | Tolerance unit (Da or ppm) |
184
+ | `--threads` | 1 | Number of threads for parallel processing |
185
+ | `--add-decoys` | False | Include decoy sites for validation |
186
+ | `--debug` | False | Enable debug logging |
187
+
188
+ #### LucXor Options
189
+
190
+ | Option | Default | Description |
191
+ |---|---|---|
192
+ | `-in` | - | Input mzML file with spectra |
193
+ | `-id` | - | Input idXML file with identifications |
194
+ | `-out` | - | Output idXML file with scores |
195
+ | `--fragment-method` | CID | Fragmentation method (CID or HCD) |
196
+ | `--fragment-mass-tolerance` | 0.5 | Fragment mass tolerance |
197
+ | `--fragment-error-units` | Da | Tolerance units (Da or ppm) |
198
+ | `--min-mz` | 150.0 | Minimum m/z value to consider |
199
+ | `--target-modifications` | Phospho (S/T/Y) | List of target PTM definitions |
200
+ | `--neutral-losses` | sty -H3PO4 -97.97690 | Neutral loss definitions applied during scoring |
201
+ | `--decoy-mass` | 79.966331 | Mass offset used when generating decoy permutations |
202
+ | `--decoy-neutral-losses` | X -H3PO4 -97.97690 | Neutral loss patterns for decoy permutations |
203
+ | `--max-charge-state` | 5 | Maximum charge state |
204
+ | `--max-peptide-length` | 40 | Maximum peptide length |
205
+ | `--max-num-perm` | 16384 | Maximum permutations |
206
+ | `--modeling-score-threshold` | 0.95 | Minimum score for selecting PSMs during model building |
207
+ | `--scoring-threshold` | 0.0 | Minimum LucXor score to report |
208
+ | `--min-num-psms-model` | 50 | Minimum number of high-scoring PSMs required for modeling |
209
+ | `--threads` | 1 | Number of threads for parallel processing |
210
+ | `--rt-tolerance` | 0.01 | RT tolerance used when matching spectra by retention time |
211
+ | `--debug` | False | Enable debug logging |
212
+
213
+ ## Algorithm Details
214
+
215
+ ### AScore Algorithm
216
+
217
+ The AScore algorithm provides phosphorylation site localization by analyzing MS/MS fragment ions to identify site-determining ions and computing localization probabilities based on fragment evidence.
218
+
219
+ **Output Metrics:**
220
+
221
+ - `AScore_pep_score`: Overall peptide score
222
+ - `AScore_1, AScore_2, ...`: Individual site scores
223
+ - `ProForma`: Standardized sequence notation with confidence scores
224
+
225
+ ### PhosphoRS Algorithm
226
+
227
+ The PhosphoRS algorithm implements a comprehensive approach using isomer generation, theoretical spectrum matching, and probability scoring for confident phosphorylation site assignment.
228
+
229
+ **Output Metrics:**
230
+ - Site-specific probability scores (0-100%)
231
+ - Isomer details with sequence and score
232
+ - Detailed confidence metrics
233
+
234
+ ### LucXor (LuciPHOr2) Algorithm
235
+
236
+ LucXor implements the complete LuciPHOr2 algorithm with two-stage processing for accurate PTM localization with false localization rate (FLR) estimation.
237
+
238
+ **Output Metrics:**
239
+ - `Luciphor_delta_score`: Main localization score
240
+ - `Luciphor_pep_score`: Peptide identification score
241
+ - `Luciphor_global_flr`: Global false localization rate
242
+ - `Luciphor_local_flr`: Local false localization rate
243
+
244
+ ## Example Results
245
+
246
+ You can find example result files in the `data` directory. Here are the direct links to different algorithm result files:
247
+
248
+ | Algorithm | Description | Result File |
249
+ |---|---|---|
250
+ | AScore | AScore phosphorylation site localization results | [AScore Example](data/1_ascore_result.idXML) |
251
+ | PhosphoRS | PhosphoRS phosphorylation site localization results | [PhosphoRS Example](data/1_phosphors_result.idXML) |
252
+ | LucXor | LucXor (LuciPHOr2) PTM localization results with FLR | [LucXor Example](data/1_lucxor_result.idXML) |
253
+
254
+ ## Documentation
255
+
256
+ For more detailed information:
257
+
258
+ - [AScore Algorithm Documentation](docs/algorithms/ascore.md)
259
+ - [PhosphoRS Algorithm Documentation](docs/algorithms/phosphors.md)
260
+ - [LucXor Algorithm Documentation](docs/algorithms/lucxor.md)
261
+ - [Citations and References](docs/citations.md)
262
+
263
+ ## Contributing
264
+
265
+ To contribute to onsite:
266
+
267
+ 1. Fork the repository
268
+ 2. Clone your fork: `git clone https://github.com/YOUR-USERNAME/onsite`
269
+ 3. Create a feature branch: `git checkout -b new-feature`
270
+ 4. Make your changes
271
+ 5. Install in development mode: `pip install -e .`
272
+ 6. Test your changes: `poetry run pytest`
273
+ 7. Commit your changes: `git commit -am 'Add new feature'`
274
+ 8. Push to the branch: `git push origin new-feature`
275
+ 9. Submit a pull request
276
+
277
+ ## License
278
+
279
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
280
+
281
+ ## Citation
282
+
283
+ If you use onsite in your research, please cite:
284
+
285
+ ```text
286
+ onsite: Mass spectrometry post-translational modification localization tool.
287
+ https://github.com/bigbio/onsite
288
+ ```
289
+
290
+ ## Related Tools
291
+
292
+ - [PyOpenMS](https://pyopenms.readthedocs.io/) - Python bindings for OpenMS
293
+ - [OpenMS](https://www.openms.de/) - Open-source tools for mass spectrometry
294
+ - [nf-core/quantms](https://nf-co.re/quantms) - Quantitative mass spectrometry workflow
295
+
296
+ ## Need Help?
297
+
298
+ If you have questions or need assistance:
299
+ - [Open an issue](https://github.com/bigbio/onsite/issues) on GitHub
300
+ - Check [existing issues](https://github.com/bigbio/onsite/issues?q=is%3Aissue) for solutions
301
+
302
+ ## Acknowledgments
303
+
304
+ onsite builds upon the excellent work of the original algorithm developers and the OpenMS community. We thank all contributors and users for their feedback and support.
305
+
306
+ ---
307
+
308
+
309
+
@@ -0,0 +1,27 @@
1
+ """
2
+ OnSite: Mass spectrometry post-translational modification localization tool.
3
+
4
+ This package provides tools for phosphorylation site localization and scoring
5
+ using various algorithms including AScore, PhosphoRS, and LucXor.
6
+ """
7
+
8
+ __version__ = "0.0.1"
9
+ __author__ = "BigBio Stack"
10
+ __license__ = "MIT"
11
+
12
+ # Import main modules
13
+ from .ascore import AScore
14
+ from .phosphors import calculate_phospho_localization_compomics_style
15
+
16
+ # Import LucXor components
17
+ try:
18
+ from . import lucxor
19
+
20
+ LUCXOR_AVAILABLE = True
21
+ except ImportError:
22
+ LUCXOR_AVAILABLE = False
23
+
24
+ __all__ = ["AScore", "calculate_phospho_localization_compomics_style"]
25
+
26
+ if LUCXOR_AVAILABLE:
27
+ __all__.extend(["lucxor"])
@@ -0,0 +1,10 @@
1
+ """
2
+ AScore package for phosphorylation site localization.
3
+
4
+ This package provides the AScore algorithm implementation for mass spectrometry
5
+ post-translational modification localization.
6
+ """
7
+
8
+ from .ascore import AScore
9
+
10
+ __all__ = ["AScore"]