Skip to content

Commit 695c56d

Browse files
update
1 parent a3d9b7c commit 695c56d

8 files changed

Lines changed: 684 additions & 620 deletions

File tree

.github/workflows/pylint.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

CHANGLOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ All notable changes to this project will be documented in this file.
77
- mgf file
88
- cli
99
- more args
10+
- readme
11+
- updated ms2 args
12+
- rm linting action
13+
- formatted with black
1014

1115
## [0.1.3]
1216
### Added

README.md

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,74 @@
11
# tdfextractor
22

3-
a python package to extract ms files from Bruker's raw files
3+
A Python package to extract MS/MS spectra from Bruker TimsTOF .D folders and convert them to standard formats (MS2 and MGF).
4+
5+
## Installation
6+
7+
```bash
8+
pip install tdfextractor
9+
```
10+
11+
## Usage
12+
13+
tdfextractor provides two command-line tools for extracting spectra:
14+
15+
### MS2 Extraction
16+
Extract MS2 format files (compatible with MS-GF+, Comet, etc.):
17+
18+
```bash
19+
ms2-extractor /path/to/sample.d
20+
ms2-extractor /path/to/sample.d --output custom_output.ms2 --min-intensity 100 --min-charge 2
21+
```
22+
23+
### MGF Extraction
24+
Extract MGF format files (compatible with Mascot, MaxQuant, etc.):
25+
26+
```bash
27+
mgf-extractor /path/to/sample.d
28+
mgf-extractor /path/to/sample.d --casanovo # Optimized for Casanovo de novo sequencing
29+
```
30+
31+
## Command Line Arguments
32+
33+
### MS2 Extractor Arguments
34+
35+
| Argument | Type | Default | Description |
36+
|----------|------|---------|-------------|
37+
| `analysis_dir` | str | - | Path to the .D analysis directory |
38+
| `-o, --output` | str | `<analysis_dir_name>.ms2` | Output MS2 file path |
39+
| `--remove-precursor` | flag | False | Remove precursor peaks from MS/MS spectra |
40+
| `--precursor-peak-width` | float | 2.0 | Width around precursor m/z to remove (Da) |
41+
| `--batch-size` | int | 100 | Batch size for processing spectra |
42+
| `--top-n-spectra` | int | None | Keep only top N most intense peaks per spectrum |
43+
| `--min-intensity` | float | 0.0 | Minimum intensity threshold for peaks |
44+
| `--min-charge` | int | None | Minimum charge state filter |
45+
| `--max-charge` | int | None | Maximum charge state filter |
46+
| `--min-mz` | float | None | Minimum m/z filter |
47+
| `--max-mz` | float | None | Maximum m/z filter |
48+
| `--min-rt` | float | None | Minimum retention time filter (seconds) |
49+
| `--max-rt` | float | None | Maximum retention time filter (seconds) |
50+
| `--min-ccs` | float | None | Minimum CCS filter |
51+
| `--max-ccs` | float | None | Maximum CCS filter |
52+
| `-v, --verbose` | flag | False | Enable verbose logging |
53+
54+
### MGF Extractor Arguments
55+
56+
| Argument | Type | Default | Description |
57+
|----------|------|---------|-------------|
58+
| `analysis_dir` | str | - | Path to the .D analysis directory |
59+
| `-o, --output` | str | `<analysis_dir_name>.mgf` | Output MGF file path |
60+
| `--remove-precursor` | flag | False | Remove precursor peaks from MS/MS spectra |
61+
| `--precursor-peak-width` | float | 2.0 | Width around precursor m/z to remove (Da) |
62+
| `--batch-size` | int | 100 | Batch size for processing spectra |
63+
| `--top-n-spectra` | int | None | Keep only top N most intense peaks per spectrum |
64+
| `--min-intensity` | float | 0.0 | Minimum intensity threshold for peaks |
65+
| `--min-charge` | int | None | Minimum charge state filter |
66+
| `--max-charge` | int | None | Maximum charge state filter |
67+
| `--min-mz` | float | None | Minimum m/z filter |
68+
| `--max-mz` | float | None | Maximum m/z filter |
69+
| `--min-rt` | float | None | Minimum retention time filter (seconds) |
70+
| `--max-rt` | float | None | Maximum retention time filter (seconds) |
71+
| `--min-ccs` | float | None | Minimum CCS filter |
72+
| `--max-ccs` | float | None | Maximum CCS filter |
73+
| `-v, --verbose` | flag | False | Enable verbose logging |
74+
| `--casanovo` | flag | False | Preset for Casanovo: enables precursor removal, top-150 peaks, min intensity 0.01, m/z 50-2500 |

pyproject.toml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,11 @@ license = {file = "LICENSE"}
2525

2626
[project.scripts]
2727
mgf-extractor = "tdfextractor.mgf_exctractor:main"
28+
ms2-extractor = "tdfextractor.ms2_extractor:main"
2829

2930

3031
[tool.setuptools]
3132
package-dir = {"" = "src"}
3233

3334
[tool.setuptools.dynamic]
34-
version = {attr = "tdfextractor.__version__"}
35-
36-
37-
[tool.pylint]
38-
max-line-length = 120
39-
fail-under = 9.0
40-
good-names = ["mz" ,"td", "ms", "tdf", "tdfpy", "tdfextra", "i"]
41-
disable = ["too-many-arguments", "too-many-locals", "too-many-statements"]
35+
version = {attr = "tdfextractor.__version__"}

0 commit comments

Comments
 (0)