|
1 | 1 | # tdfextractor |
2 | 2 |
|
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 | |
0 commit comments