Scatter plot based on a data frame. Data frame gives the list of proteins found in fractions. Points can additionally be colored based on the values of one of the given columns.

fracPlot(
  data,
  protein_column = "Accession",
  fraction_column = "Fraction_Number",
  color_column,
  list_of_proteins,
  fraction_position = "x",
  mark_size = 2,
  mark_shape = 18,
  protein_labels_size,
  fraction_labels_size,
  protein_name = "Protein",
  fraction_name = "Fraction number",
  color_name = color_column,
  order_proteins = TRUE
)

Arguments

data

Data frame with all proteins from all fractions listed in rows and with two required columns, "protein_column" and "fraction_column".

protein_column

Column used to identify the proteins. Default value is "Accession".

fraction_column

Column used to identify the fraction number. Default value is "Fraction_Number".

color_column

Column used to color the points of scatter plot. If it is missing, the plot will be in black.

list_of_proteins

List of proteins we want to plot. In case we want to plot only a subset of all proteins. If it is missing, all proteins in "data" are plotted.

fraction_position

Orientation of the plot. For "x", fractions are plotted on x-axis. For "y", fractions are plotted on y-axis. Deafult is "x".

mark_size

Size of point. Passed to "ggplot2". Defaults to 2.

mark_shape

Shape of points. Passed to "ggplot2". Defaults to 18, a diamond shape.

protein_labels_size

Size of axis labels for proteins. If missing, it is set automatically.

fraction_labels_size

Size of axis labels for fractions. If missing, it is set automatically.

protein_name

Name of axis. Default values is "Protein".

fraction_name

Name of axis. Default values is "Fraction number"

color_name

Name of color legend. By default, it is equal to "color_column"

order_proteins

Whether to preserve the given order of the proteins from the "list_of_proteins". If TRUE, proteins are ordered alphabetically based on the "protein_column". If FALSE, the order of the list is preserved. Defaults to TRUE.

Value

Returns "ggplot2" object, the scatter plot in which every point represents a protein found in a fraction. Points can be colored based on the values of "color_column" with the color scale shown in the legend. The plot can easily be saved using "ggsave" function.