# param-medic

## Usage:

`crux param-medic [options] <spectrum-file>`

## Description:

Examine the spectra in a file to estimate the best precursor and fragment error tolerances for database search and to infer the presence of various types of modifications, including stable-isotope labeling, isobaric labeling, tandem mass tags, and enrichment of phosphorylated peptides. For details on how param-medic works, see these publications:

> Damon H. May, Kaipo Tamura, William Stafford Noble. "Param-Medic: A tool for improving MS/MS database search yield by optimizing parameter settings." Journal of Proteome Research. 16(4):1817-1824, 2017.
> Damon May, Kaipo Tamura, William Stafford Noble. "Detecting modifications in proteomics experiments with Param-Medic." Journal of Proteome Research. 18(4):1902-1906, 2019.

Note that you can access some of the functionality of Param-Medic by using the `--auto-precursor-window` and `--auto-mz-bin-width` options in `tide-search`.

## Input:

- `spectrum-file` – File from which to parse fragmentation spectra.

## Output:

The program writes files to the folder `crux-output` by default. The name of the output folder can be set by the user using the `--output-dir` option. The following files will be created:

- `param-medic.txt` – a tab-delimited text file containing the estimated parameter values for precursor mass tolerance (and corresponding standard deviation), fragment bin size (and standard deviation), as well as the presence or absence of various modification types (4Da, 6Da, 8Da and 10Da SILAC, 4plex and 8plex iTRAQ, 2plex, 6plex and 10plex TMT, and phosphorylation). For each modification type, a Boolean is reported along with a statistic indicating how confident the inference is.
- `param-medic.params.txt` – a file containing the name and value of all parameters/options for the current operation. Not all parameters in the file may have been used in the operation. The resulting file can be used with the --parameter-file option for other Crux programs.
- `param-medic.log.txt` – a log file containing a copy of all messages that were printed to the screen during execution.

## Options:

- ### param-medic options

  - `--pm-min-precursor-mz <float>` – Minimum precursor m/z value to use in measurement error estimation. Default = `400`.
  - `--pm-max-precursor-mz <float>` – Minimum precursor m/z value to use in measurement error estimation. Default = `1800`.
  - `--pm-min-frag-mz <float>` – Minimum fragment m/z value to use in measurement error estimation. Default = `150`.
  - `--pm-max-frag-mz <float>` – Maximum fragment m/z value to use in measurement error estimation. Default = `1800`.
  - `--pm-min-scan-frag-peaks <integer>` – Minimum fragment peaks an MS/MS scan must contain to be used in measurement error estimation. Default = `40`.
  - `--pm-max-precursor-delta-ppm <float>` – Maximum ppm distance between precursor m/z values to consider two scans potentially generated by the same peptide for measurement error estimation. Default = `50`.
  - `--pm-charges <string>` – Precursor charge states to consider MS/MS spectra from, in measurement error estimation, provided as comma-separated values. Default = `0,2,3,4`.
  - `--pm-top-n-frag-peaks <integer>` – Number of most-intense fragment peaks to consider for measurement error estimation, per MS/MS spectrum. Default = `30`.
  - `--pm-pair-top-n-frag-peaks <integer>` – Number of fragment peaks per spectrum pair to be used in fragment error estimation. Default = `5`.
  - `--pm-min-common-frag-peaks <integer>` – Number of the most-intense peaks that two spectra must share in order to potentially be generated by the same peptide, for measurement error estimation. Default = `20`.
  - `--pm-max-scan-separation <integer>` – Maximum number of scans two spectra can be separated by in order to be considered potentially generated by the same peptide, for measurement error estimation. Default = `1000`.
  - `--pm-min-peak-pairs <integer>` – Minimum number of peak pairs (for precursor or fragment) that must be successfully paired in order to attempt to estimate measurement error distribution. Default = `200`.

- ### Input and output

  - `--spectrum-parser pwiz|mstoolkit` – Specify the parser to use for reading in MS/MS spectra. The default, ProteoWizard parser can read the MS/MS file formats listed here. The alternative is MSToolkit parser. If the ProteoWizard parser fails to read your files properly, you may want to try the MSToolkit parser instead. Default = `pwiz`.
  - `--verbosity <integer>` – Specify the verbosity of the current processes. Each level prints the following messages, including all those at lower verbosity levels: 0-fatal errors, 10-non-fatal errors, 20-warnings, 30-information on the progress of execution, 40-more progress information, 50-debug info, 60-detailed debug info. Default = `30`.
  - `--fileroot <string>` – The fileroot string will be added as a prefix to all output file names. Default = `<empty>`.
  - `--output-dir <string>` – The name of the directory where output files will be created. Default = `crux-output`.
  - `--overwrite T|F` – Replace existing files if true or fail when trying to overwrite a file if false. Default = `false`.
  - `--parameter-file <string>` – A file containing parameters. See the parameter documentation page for details. Default = `<empty>`.