# spectrum-converter

## Usage:

`crux spectrum-converter [options] <tide spectra file>`

## Description:

This command converts spectrum files into the binary spectrumrecords format used by the tide-search command. Most people will not need to use this command at all, because tide-search will do the conversions automatically as needed. However, if you plan to run multiple searches using the same input file, then you can save some time by using this command to pre-convert the spectra into spectrumrecords format.

## Input:

- `tide spectra file` – The name of one or more files from which to parse the fragmentation spectra, in any of the file formats supported by ProteoWizard. Alternatively, the argument may be one or more binary spectrum files produced by a previous run of crux tide-search using the store-spectra parameter. Multiple files can be included on the command line (space delimited), prior to the name of the database.

## 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:

- `.spectrumrecords` – The spectra from the input file, written in spectrumrecords format. The is taken from the input file.
- `spectrum-converter.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.
- `spectrum-converter.log.txt` – a log file containing a copy of all messages that were printed to the screen during execution.

## Options:

- ### spectrum-converter options

  - `--spectrum-outdir <string>` – The name of the directory where the converted spectrum files will be stored. Default = `--output-dir value`.

- ### CPU threads

  - `--num-threads <integer>` – 0=poll CPU to set num threads; else specify num threads directly. Default = `1`.

- ### Input and output

  - `--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>`.
  - `--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`.