SpectronauttoMSstatsPTMFormat {MSstatsPTM} | R Documentation

## Converts raw PTM MS data from Spectronautt into the format needed for MSstatsPTM.

### Description

Takes as as input both raw PTM and global protein outputs from Spectronaut.

### Usage

    SpectronauttoMSstatsPTMFormat(
      PTM.data,
      fasta,
      Protein.data = NULL,
      annotation = NULL,
      intensity = "PeakArea",
      filter_with_Qvalue = TRUE,
      qvalue_cutoff = 0.01,
      useUniquePeptide = TRUE,
      removeFewMeasurements = TRUE,
      removeProtein_with1Feature = FALSE,
      removeNonUniqueProteins = TRUE,
      modificationLabel = "Phospho",
      removeiRT = TRUE,
      summaryforMultipleRows = max,
      which.Conditions = "all"
    )

### Arguments

`PTM.data` | name of PTM Spectronaut output, which is long-format.
`fasta` | A string of path to a FASTA file, used to match PTM peptides.
`Protein.data` | name of Global Protein Spectronaut output, which is long-format.
`annotation` | name of 'annotation.txt' data which includes Condition, BioReplicate, Run. If annotation is already complete in Spectronaut, use annotation=NULL (default). It will use the annotation information from input.
`intensity` | 'PeakArea'(default) uses not normalized peak area. 'NormalizedPeakArea' uses peak area normalized by Spectronaut
`filter_with_Qvalue` | TRUE(default) will filter out the intensities that have greater than qvalue_cutoff in EG.Qvalue column. Those intensities will be replaced with zero and will be considered as censored missing values for imputation purpose.
`qvalue_cutoff` | Cutoff for EG.Qvalue. default is 0.01.
`useUniquePeptide` | TRUE(default) removes peptides that are assigned for more than one proteins. We assume to use unique peptide for each protein.
`removeFewMeasurements` | TRUE (default) will remove the features that have 1 or 2 measurements across runs.
`removeProtein_with1Feature` | TRUE will remove the proteins which have only 1 feature, which is the combination of peptide, precursor charge, fragment and charge. FALSE is default.
`removeNonUniqueProteins` | TRUE will remove proteins that were not uniquely identified. IE if the protein column contains multiple proteins seperated by ";". TRUE is default
`modificationLabel` | String of modification name. Default is 'Phospho'.
`removeiRT` | TRUE will remove proteins that contain iRT. True is default
`summaryforMultipleRows` | max(default) or sum - when there are multiple measurements for certain feature and certain run, use highest or sum of multiple intensities.
`which.Conditions` | list of conditions to format into MSstatsPTM format. If "all" all conditions will be used. Default is "all".

### Value

a list of two data.tables named 'PTM' and 'PROTEIN' in the format required by MSstatsPTM.

### Examples

    # The output should be in the following format.
    head(raw.input$PTM)
    head(raw.input$PROTEIN)

[Package MSstatsPTM version 1.2.4 Index]