## ----设置,包括= false -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.width=8, fig.height=8 ) ## ----消息= false,警告= false ---------------------------------------------------------------------------------------- 库(msstatsptm)## -------------------------------------------------------------------------------------------------------------------------------------------------------------------#if(!sireseenamespace(“ biocmanager”,悄悄= true))#install.packages(“ biocmanager”)##Biocmanager :: install(“ MSSTATSPTM”)## ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#antotation <-data.frame('条件'= C('控制','控制','控制',#'处理','处理','处理'),#'bioreplate'= c(1,2,3,4,5,6),#'run'= c('prot_run_1','prot_run_2','prot_run_3',#'phos_run_1','phos_run_2','phos_run_3'),#'type'= c(“蛋白质”,“蛋白质”,“蛋白质”,“ ptm”,#“ ptm”,“ ptm”,“ ptm”))#####run msstatsptm Converter带有修改和未修改的数据集。 # raw.input <- ProgenesistoMSstatsPTMFormat(raw_ptm_df, annotation, # raw_protein_df, fasta_path) ## ----raw_data, eval = FALSE--------------------------------------------------- # # Add site into ProteinName column # raw_ptm_df$ProteinName <- paste(raw_ptm_df$ProteinName, # raw_ptm_df$Site, sep = "_") # # # Run MSstats Converters # PTM.data <- ProgenesistoMSstatsFormat(raw_ptm_df, annotation) # PROTEIN.data <- ProgenesistoMSstatsFormat(raw_protein_df, annotation) # # # Combine into one list # raw.input <- list(PTM = PTM.data, # PROTEIN = PROTEIN.data) ## ----------------------------------------------------------------------------- head(raw.input$PTM) head(raw.input$PROTEIN) ## ----summarize, message=FALSE, warning=FALSE---------------------------------- MSstatsPTM.summary <- dataSummarizationPTM(raw.input, verbose = FALSE) head(MSstatsPTM.summary$PTM$ProteinLevelData) head(MSstatsPTM.summary$PROTEIN$ProteinLevelData) ## ----qcplot, message=FALSE, warning=FALSE------------------------------------- dataProcessPlotsPTM(MSstatsPTM.summary, type = 'QCPLOT', which.PTM = "allonly", address = FALSE) ## ----profileplot, message=FALSE, warning=FALSE-------------------------------- dataProcessPlotsPTM(MSstatsPTM.summary, type = 'ProfilePlot', which.Protein = "Q9Y6C9", address = FALSE) ## ----model, message=FALSE, warning=FALSE-------------------------------------- # Specify contrast matrix comparison <- matrix(c(-1,0,1,0),nrow=1) row.names(comparison) <- "CCCP-Ctrl" colnames(comparison) <- c("CCCP", "Combo", "Ctrl", "USP30_OE") MSstatsPTM.model <- groupComparisonPTM(MSstatsPTM.summary, data.type = "LabelFree", contrast.matrix = comparison, verbose = FALSE) head(MSstatsPTM.model$PTM.Model) head(MSstatsPTM.model$PROTEIN.Model) head(MSstatsPTM.model$ADJUSTED.Model) ## ----volcano, message=FALSE, warning=FALSE------------------------------------ groupComparisonPlotsPTM(data = MSstatsPTM.model, type = "VolcanoPlot", FCcutoff= 2, logBase.pvalue = 2, address=FALSE) ## ----heatmap, message=FALSE, warning=FALSE------------------------------------ groupComparisonPlotsPTM(data = MSstatsPTM.model, type = "Heatmap", which.PTM = 1:30, address=FALSE)