Learn R Programming

iPAC (version 1.16.0)

Plot.Protein.Linear: Plot.Protein.Linear

Description

Plot.Protein.Linear creates a visual representation of the protein reordering by showing the protein in linear form and setting the color based upon the remapped amino acid position.

Usage

Plot.Protein.Linear(path, colCount, cex=0.5, height = 1,width = 1, title = "Protein Reordering", color.palette = "heat")

Arguments

path
The remapped protein using only those amino acids for which mutational data is available.
colCount
How many columns you want in the plot
cex
How large you want the text to be. See R graphical parameters for more information.
height
The height of the resulting box that outlines the amino acid number.
width
The width of the resulting box that outlines the amino acid number.
title
The title that you want the graph to display.
color.palette
One of of the standard color palettes available in R. The options are "heat", "gray", "topo", and "cm".

Details

The terminal you are running this on must be able to create an R graphical device.

Examples

Run this code
#Extract the data from a CIF file and match it up with the canonical protein sequence.
#Here we use the 3GFT structure from the PDB, which corresponds to the KRAS protein.
CIF<-"http://www.pdb.org/pdb/files/3GFT.cif"
Fasta<-"http://www.uniprot.org/uniprot/P01116-2.fasta"
KRAS.Positions<-get.Positions(CIF,Fasta, "A")

#Load the mutational data for KRAS. Here the mutational data was obtained from the
#COSMIC database (version 58). 
data(KRAS.Mutations)

#Show the remapped order using the MDS remapper.
new.ordering<-get.Remapped.Order(KRAS.Mutations, KRAS.Positions$Positions)

#Create the Plots. Note that Amino Acid 61 is missing if get.AlignedPositions
#was used. Thus Amino Acid 61 is missing in the plots below.
Plot.Protein.Linear(new.ordering, 25, color.palette = "heat")
Plot.Protein.Linear(new.ordering, 25, color.palette = "gray")
												

Run the code above in your browser using DataLab