You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+82-3Lines changed: 82 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,9 +28,87 @@ pip install mumble
28
28
```
29
29
30
30
31
-
### Basic Usage
31
+
## Usage
32
32
33
-
Here's a quick example of how to use the PSM Modification Handler for single PSMs:
33
+
### Command-Line Interface (CLI) Usage
34
+
35
+
Mumble provides a command-line interface to modify PSMs based on mass shifts, as well as several parameters for customization. You can use the `mumble` command to interact with the tool.
36
+
37
+
#### Basic Command Syntax
38
+
39
+
To run the CLI, use the following command:
40
+
41
+
```bash
42
+
mumble [OPTIONS] INPUT_FILE
43
+
```
44
+
45
+
Where `INPUT_FILE` is the path to the input file containing the PSM data.
46
+
47
+
#### Parameters:
48
+
49
+
Here are the available options you can pass when running the command:
50
+
51
+
-**`--psm-list`**: (required) Path to the input file containing the PSM data. Must be provided if not already set via arguments.
52
+
-**`--modification-file`**: Path to a restriction list of modifications to use from Unimod. Defaults to `default_ptm_list.tsv` included with the package.
53
+
-**`--psm-file-type`**: Type of the input file to read with PSM_utils (e.g., `mzid`, `tsv`). Default is "infer".
54
+
-**`--aa-combinations`**: Number of amino acid combinations to add as modification. Requires a `fasta_file`. Default is `0`.
55
+
-**`--fasta-file`**: Path to a fasta file (for use with `aa_combinations`).
56
+
-**`--mass-error`**: Mass error for the mass shift, default is `0.02`.
57
+
-**`--output-file`**: Path to the output file to write modified PSMs.
58
+
-**`--filetype-write`**: Type of the output file to write with PSM_utils (e.g., `tsv`, `csv`). Default is `tsv`.
59
+
-**`--include-decoy-psm`**: Flag to parse modifications for decoys in the modified PSM list.
60
+
-**`--include-original-psm`**: Flag to keep the original PSMs in the modified PSM list.
61
+
-**`--combination-length`**: Maximum number of modifications per combination. All lower numbers will be included as well. Default is `1`.
62
+
-**`--exclude-mutations`**: If set, modifications with the classification 'AA substitution' will be excluded.
63
+
-**`--config-file`**: Path to a config file for additional configuration parameters (e.g., custom modification sets, advanced settings).
64
+
-**`--log-level`**: Set the logging level. Options: `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`. Default is `INFO`.
65
+
-**`--clear-cache`**: Remove the modification cache file and exit early.
66
+
-**`--all-unimod-modifications`**: Use all available modifications from Unimod instead of a subset.
You can also use a configuration file to specify options that will be loaded automatically when running the command. This allows you to store commonly used parameters without needing to pass them every time.
93
+
94
+
Example configuration file (`config_file.json`):
95
+
96
+
```json
97
+
{"mass_error" : 0.05
98
+
"aa_combinations" : 2
99
+
"psm_file_type" : "mzid"
100
+
"output_file" : "output.tsv"
101
+
}
102
+
```
103
+
104
+
You can then specify the path to this file using the `--config-file` option:
105
+
106
+
```bash
107
+
mumble --config-file "path/to/config_file.toml"
108
+
```
109
+
110
+
### Python API
111
+
Here's a quick example of how to use the PSM Modification Handler through the python API for single PSMs:
34
112
35
113
```python
36
114
>>>from mumble import PSMHandler
@@ -59,7 +137,7 @@ Here's a quick example of how to use the PSM Modification Handler for single PSM
59
137
# )
60
138
# ]
61
139
```
62
-
Here's a quick example of how to use the PSM Modification Handler for PSM lists:
140
+
Here's a quick example of how to use the PSM Modification Handler through the python API for PSM lists:
63
141
```python
64
142
>>># Or load a PSM list (from a file or PSMList object)
0 commit comments