mms2plot: mms2plot

Description Usage Arguments Value Note Author(s) Examples

View source: R/mms2plot.R

Description

Visualization of multiple MS/MS spectra for groups of modified and non-modified peptides

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
mms2plot(
  id_table_path,
  mod_xml_path,
  par_filepath,
  output_path,
  min_intensity_ratio = 0.01,
  pdf_width = 3.35,
  pdf_height = pdf_width/2.4,
  xmai = 0.15 * pdf_width/3.35,
  ymai = 0.3 * pdf_width/3.35,
  ppm = 20,
  y_ion_col = "red",
  b_ion_col = "blue",
  peaks_col = "grey",
  ymax = 1.6,
  info_height = 1.5,
  peptide_height = 1.3,
  mod_height = 0.07,
  len_annoSpace = 0.1,
  lwd = 1 * pdf_width/3.35,
  cex = 1 * pdf_width/3.35
)

Arguments

id_table_path

File path of the table that contains the information of peptide-spectrum matches (PSMs) and number labels. The PSM information is referred to as the output file msms.txt from Maxquant.

mod_xml_path

File path of the modification file. The Maxquant mdification xml file modifications.xml can be directly used.

par_filepath

File path of of the parameter batch table that includes the parameter xml file and the fragment mass tolerance (ppm). The parameter file format is referred to as par.xml in Maxquant.

output_path

Folder Path that stores the output image files.

min_intensity_ratio

minimal percentage threshold of MS2 intensity, compared with the highest intensity. (default=0.01).

pdf_width

The width of a single PSM figure area in inches. The area includes both plot region and outer margin area. The default is 3.35 for a single column. The width is 7 for double-column.

pdf_height

The height of a single PSM figure area in inches. The default is pdf_width/2.4.

xmai

Margin of the figure in number of inches for x axis. (default=pdf_width*0.15/3.35).

ymai

Margin of the figure in number of inches for y axis. (default=pdf_width*0.15/3.35).

ppm

The threshold of mass error in parts per million(ppm): (exactMass-accurateMass)/exactMass*1E6. (default=20).

y_ion_col

y ion color. The default is red.

b_ion_col

b ion color. The default is blue.

peaks_col

color of all M/Z peaks. The default is grey.

ymax

The height of the plot region relative to the default. (default=1.6).

info_height

The height of MS2 annotation. (default=1.5)

peptide_height

The height of peptide sequence annotation in the plot region, relative to the default. (default=1.3)

mod_height

The height of modification annotation relative to the location where peptide sequence is annotation. (default=0.07).

len_annoSpace

The length of b/y ion annotation segments.(default=0.1).

lwd

line width relative to the default. (default=pdf_width/3.35).

cex

A numerical value giving the amount by which plotting text and symbols is magnified relative to the default.(default=pdf_width/3.35).

Value

No value is returned.

Note

See vignettes for more details

Author(s)

Lei Li, Liya Ming

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
###
general_path = system.file( package = "mms2plot",dir = "extdata" )
setwd( general_path )
###################################
# Generate a mirrored-spectra pdf file for label-free data
lf_path = system.file( package = "mms2plot",dir = "extdata/label_free" )
# id_table_path expands the Maxqaunt output msms.txt by adding "label" column
id_table_path = dir( lf_path, "msms_labelfree.txt", full.names = TRUE )
mod_xml_path = dir( general_path, "modifications.xml", full.names = TRUE )
# par_filepath contains par.xml with full file path and PPM cutoff
par_filepath = dir( general_path, "par_batch.txt", full.names = TRUE )
output_path = general_path
#mms2plot( id_table_path, mod_xml_path, par_filepath, output_path) # Only run for testing

###################################
# Generate an aligned-spectra plot pdf file for TMT labelling
TMT_path = system.file( package = "mms2plot",dir = "extdata/TMT" )
# id_table_path expands the Maxqaunt output msms.txt by adding "label" column
id_table_path = dir( TMT_path, "msms_TMT.txt", full.names = TRUE )
mod_xml_path = dir( general_path, "modifications.xml", full.names = TRUE )
# par_filepath contains par.xml with full file path and PPM cutoff
par_filepath = dir( general_path, "par_batch.txt", full.names = TRUE )
output_path = general_path
#mms2plot( id_table_path, mod_xml_path, par_filepath, output_path) # Only run for testing

#####################################
# Generate a mirrored-spectra pdf file for SILAC labelling
SILAC_path = system.file( package = "mms2plot",dir = "extdata/silac" )
id_table_path = dir( SILAC_path, "msms_SILAC.txt", full.names = TRUE )
mod_xml_path = dir( general_path, "modifications.xml", full.names = TRUE )
par_filepath = dir( general_path, "par_batch.txt", full.names = TRUE )
output_path = general_path
#mms2plot( id_table_path, mod_xml_path,par_filepath,output_path ) # Only run for testing

#####################################
# Generate a couple of spectra pdf files for dimethyl labelling
dim_path = system.file(package="mms2plot",dir="extdata/Dimethyl_Labelling")
id_table_path = dir( dim_path, "msms_dim.txt", full.names = TRUE )
mod_xml_path = dir( general_path, "modifications.xml", full.names = TRUE )
par_filepath = dir( general_path, "par_batch.txt", full.names = TRUE )
output_path = general_path
#mms2plot(id_table_path, mod_xml_path, par_filepath, output_path) # Only run for testing

#####################################
# Generate a couple of spectra pdf files for ETD (ie. c/z ions)
dim_path = system.file(package="mms2plot",dir="extdata/label_free_ETD")
id_table_path = dir( dim_path, "msms_lf_ETD.txt", full.names = TRUE )
mod_xml_path = dir( general_path, "modifications.xml", full.names = TRUE )
par_filepath = dir( general_path, "par_batch.txt", full.names = TRUE )
output_path = general_path
#mms2plot(id_table_path, mod_xml_path, par_filepath, output_path) # Only run for testing

#####################################
# an example for showing neutral loss (e.g. phosphorylation)
dim_path = system.file(package="mms2plot",dir="extdata/phospho")
id_table_path = dir( dim_path, "msms_phospho.txt", full.names = TRUE )
mod_xml_path = dir( general_path, "modifications.xml", full.names = TRUE )
par_filepath = dir( general_path, "par_batch.txt", full.names = TRUE )
output_path = general_path
#mms2plot(id_table_path, mod_xml_path, par_filepath, output_path) # Only run for testing

lileir/mms2plot documentation built on June 17, 2020, 9:16 a.m.