SpectronauttoMSstatsLiPFormat: Converts raw LiP MS data from Spectronautt into the format...

View source: R/SpectronauttoMSstatsLiPFormat.R

SpectronauttoMSstatsLiPFormatR Documentation

Converts raw LiP MS data from Spectronautt into the format needed for MSstatsLiP.

Description

Takes as as input both raw LiP and Trp outputs from Spectronautt.

Usage

SpectronauttoMSstatsLiPFormat(
  LiP.data,
  fasta,
  Trp.data = NULL,
  annotation = NULL,
  intensity = "PeakArea",
  filter_with_Qvalue = TRUE,
  qvalue_cutoff = 0.01,
  useUniquePeptide = TRUE,
  removeFewMeasurements = TRUE,
  removeProtein_with1Feature = FALSE,
  removeNonUniqueProteins = TRUE,
  removeModifications = TRUE,
  removeiRT = TRUE,
  summaryforMultipleRows = max,
  which.Conditions = "all",
  use_log_file = FALSE,
  append = FALSE,
  verbose = TRUE,
  log_file_path = NULL,
  base = "MSstatsLiP_log_"
)

Arguments

LiP.data

name of LiP Spectronaut output, which is long-format.

fasta

A string of path to a FASTA file, used to match LiP peptides.

Trp.data

name of TrP 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

removeModifications

TRUE will remove peptide that contain a modification. Modification must be indicated by "[". TRUE is default

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 MSstatsLiP format. If "all" all conditions will be used. Default is "all".

use_log_file

logical. If TRUE, information about data processing will be saved to a file.

append

logical. If TRUE, information about data processing will be added to an existing log file.

verbose

logical. If TRUE, information about data processing will be printed to the console.

log_file_path

character. Path to a file to which information about data processing will be saved. If not provided, such a file will be created automatically. If append = TRUE, has to be a valid path to a file.

base

start of the file name.

Value

a list of two data.frames in MSstatsLiP format

Examples

# Output datasets of Spectronaut
head(LiPRawData)
head(TrPRawData)

fasta_path <- system.file("extdata", "ExampleFastaFile.fasta", package="MSstatsLiP")

MSstatsLiP_data <- SpectronauttoMSstatsLiPFormat(LiPRawData,
                                                 fasta_path,
                                                 TrPRawData)
head(MSstatsLiP_data[["LiP"]])
head(MSstatsLiP_data[["TrP"]])

Vitek-Lab/MSstatsLiP documentation built on April 5, 2024, 3:25 a.m.