README.md

MSPTM

R Package MSPTM

This is a RStudio project for R packages,that is use to visualize the quantification of post translational modifcation of protein in mass spectrometry.

Note: you can't push empty directories to your repository. Make sure youu keep at least one file in every directory that you want to keep during development.

Some useful keyboard shortcuts for package authoring:

Install

Load the package (outside of this project) with: devtools::install_github("faye-yang/MSPTM")

Dependencies

background information:

X!Tandem and mascot are the two most popular database enginge to search PTM rTandem interfaces the X!Tandem protein identification algorithm. mascot is a database search engine to search PTM and provide many other mass spectrometry information to perform PTM identification.

convert_data.R: reference the perl file from Protviz package and convert mascot data to rdata

msptm.R : It contains an R function that create a data frame for the rTandem engine input for plotting input( incomplete) plot.R: It contains an R function that can plot the peptide modification plot.

Pipeline workflow instructions

To execute the pipeline in sequence, follow these steps:


if (! require(protViz, quietly=TRUE)) {
  install.packages("protViz")
  library(protViz)
}
if (! require(ggplot2, quietly=TRUE)) {
  install.packages("ggplot2")
  library(ggplot2)
}
if (! require(rTANDEM, quietly=TRUE)) {
  install.packages("rTANDEM")
  library(rTANDEM)
}
if (! require(colourpicker, quietly=TRUE)) {
  install.packages("colourpicker")
  library(colourpicker)
}


# example 1: analysis PTM from mascot database search engine.
#makrer ion
HexNAc_MarkerIons <- c(126.05495, 138.05495, 144.06552, 168.06552, 186.07608, 204.08665)
Glykan_MarkerIons <- c(109.02841, 127.03897, 145.04954, 163.06010, 325.11292)
ADP_Ribose <- c(136.0618, 250.0935, 348.0704, 428.0367)
#data
data(HexNAc)
#post translatonal modification
ptm0 <- cbind(AA="-", mono=0.0, avg=0.0, desc="unmodified", unimodAccID=NA)
ptm1 <- cbind(AA='N', mono=317.122300, avg=NA, desc="HexNAc", unimodAccID=2)
ptm2 <- cbind(AA='M', mono=147.035400, avg=NA, desc="Oxidation", unimodAccID=1)
m <- as.data.frame(rbind(ptm0, ptm1, ptm2))

#ptm<-hepler(data=HexNAc,modification=m,mZmarker_ions=HexNAc_MarkerIons)
intensity_plot(data=HexNAc,modification = m,mZmarker_ions=HexNAc_MarkerIons,search_engine="Mascot")



#example 2: analysis PTM from mascot database search engine. 
#rTandem search for mouse: there are 150810 proteins so it will at most have 150810 plots 
#To make the program faster you can choose to see only a subset of the plots

modification<-data.frame("type"=c("Carbamidomethyl","Oxidation"),
                         "monomass"=c(57.022, 16.0), "AA"=c("C","M"))
result.file <- "./inst/extdata/output_mouse.2018_12_04_19_57_17.t.xml"
uids<-c(12,2,731)
result <- GetResultsFromXML(result.file)
data<-tandem_get_data(result,modification,uids)
write.csv(data,paste('./inst/extdata/data_tandem.csv', sep=""),row.names=FALSE)
intensity_plot(data,modification,mZmarker_ions, search_engine="Tandem")


faye-yang/MSPTM documentation built on May 21, 2019, 4:05 a.m.