writeMethodXmls {topdownr} | R Documentation

## Create Orbitrap Fusion method.xml files.

### Description

This function is used to create Orbitrap Fusion method files from all combinations of a user-given set of MS1 and MS2 settings.

### Usage

    writeMethodXmls(ms1Settings, ms2Settings, groupBy = c("replication",
      "ETDReactionTime"), replications = 2, mz, massLabeling = TRUE,
      nMs2perMs1 = 10, duration = 0.5, randomise = TRUE,
      pattern = "method_%s.xml", verbose = interactive())

### Arguments

`ms1Settings` | `list`, named list of MS1 settings, see e.g. `defaultMs1Settings()`.
`ms2Settings` | `list`, named list of MS2 settings, see e.g. `defaultMs2Settings()`.
`groupBy` | `character`, split files by `groupBy` entries.
`replications` | `integer`, number of replications of experiments.
`mz` | `matrix`, two columns (column 1: mass, column 2: z).
`massLabeling` | `logical`, should mz values used for ID labeling?
`nMs2perMs1` | `integer`, how many MS2 scans should be run after a MS1 scan?
`duration` | `double`, how long should the scan be?
`randomise` | `logical`, should the MS2 scan settings randomised?
`pattern` | `character`, file name pattern for the method.xml files.
`verbose` | `logical`, verbose output?

### Details

- `ms1Settings`: A `list` of MS1 settings. This has to be a named `list`. Valid MS1 settings are: `c("FirstMass", "LastMass", "Microscans", "MaxITTimeInMS", "AgcTarget")`

- `ms2Settings`: A `list` of MS2 settings. This has to be a named `list`. Valid MS2 settings are: `c("ActivationType", "IsolationWindow", "EnableMultiplexIons", "EnableMSXIds", "MaxNoOfMultiplexIons", "OrbitrapResolution", "AgcTarget", "MinAgcTarget", "MaxITTimeInMS", "Microscans", "ETDReactionTime", "ETDReagentTarget", "MaximumETDReagentInjectionTime", "UseInternalCalibratedETD", "ETDSupplementalActivationEnergy", "ETDSupplementalActivation")`

- `groupBy`: The `groupBy` parameter is used to split methods into different files. Valid entries are all settings that could be used in `ms2Settings` and `"replication"`.

- `massLabeling`: The Orbitrap Fusion devices seems not to respect the start and end times of the runs given in the method.xml files. That's why it is nearly impossible to identify the run with its conditions based on the timings. If `massLabeling` is `TRUE` (default) the mass values given in `mz` are rounded to the first decimal place and the second to fourth decimal place is used as numeric identifier.

- `pattern`: The file name pattern used to name different method files. It must contain a `"%s"` that is replaced by the conditions defined in `groupBy`.

### Value

An invisivble `list` with the MS1, MS2, runtimes and mz.

### Author(s)

Sebastian Gibb mail@sebastiangibb.de, Pavel V. Shliaha pavels@bmb.sdu.dk

### See Also

`defaultMs1Settings()`, `defaultMs2Settings()`

### Examples

    writeMethodXmls(defaultMs1Settings(FirstMass=400),
                    defaultMs2Settings(),
                    mz=cbind(mass=c(609.21, 700.45, 823.95), z=10),
                    groupBy="ETDReactionTime",
                    replications=1,
                    pattern="method_firstmass_400_%s.xml")

[Package topdownr version 1.2.0 Index]