Description Usage Arguments Value Author(s) References Examples
Creates plot using input list of protein keys for uniprot entries. Will draw main chain then draw further features for the protein as specified within, should they be present. Can search for features by either exact match, or if description contains an input string. Can also further draw certain features above the structure, traditionally structural features
1 2 3 4 5 6 7 8 9 10 11 |
proteins |
A string, vector, list, or list with entry named "source" that is equal to a string, vector or list containing valid UniProt protein key_codes. This list can also contain an element called colors that can equal a rgb() value, string of a color, or the word in order "random" for a random color, to specify what color the protein in the same order will be |
types |
A string, vector, list, or list with entry named "type" that is equal to a string, vector or list containing valid matches to feature type names. This list can also contain an element called colors that can equal a rgb() value, string of a color, or the word in order "random" for a random color, to specify what color the element in the same order will be |
descriptionSearch |
A string, vector, list, or list with entry named "type" that is equal to a string, vector or list containing word searches that will then be used to find any entries description, and if it should contain the string, will be valid. This list can also contain an element called colors that can equal a rgb() value, string of a color, or the word in order "random" for a random color, to specify what color the element in the same order will be |
offSetFeatures |
A string, vector, list, or list with entry named "type" that is equal to a string, vector or list containing valid matches to feature description names. These entries will normally be rendered above the protein, though this can be chaged by specifiing the parameters btwnSpacingStart and btwnSpacing. This list can also contain an element called colors that can equal a rgb() value, string of a color, or the word in order "random" for a random color, to specify what color the element in the same order will be |
title |
The title that the plot will inherit |
saveGlobal |
If the function will save the protein XML data and feature dataframe data as global values, so that the user can use them as they wish |
btwnSpacingStart |
Where the elements specified in the structure parameter will start, by default they will be rendered above the protein |
btwnSpacing |
How tall the elements specified in the structure parameter will be |
showProgress |
If the consol should tell the user the current status in loading the proteins is |
Plotly figure
George Zorn, george.zorn@mail.utoronto.ca
Plotly R Open Source Graphing Library. Plotly. Website. Link
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 | #Example 1:
#This is the simplest usage of the function. Will draw the main chain with a random color
drawProtein("Q04206")
#Example 2:
#This will draw two proteins, with specified colors, showing various features drawn on
drawProtein(
proteins = list(type = c("Q04206", "Q9D270"), colors = c("green", "green")),
types = list(type = c("domain", "region of interest"), colors = c("red", "purple")),
descriptionSearch = list(type = "phos", colors = "blue"),
offSetFeatures = list(type = c("strand", "helix", "turn"),
colors = c("green", "orange", "purple"))
)
#Example 3:
#This will draw the first protein red, then 4 random mouse proteins random colors,
# then one more random mouse protein green.
#It will also draw the domains and regions of interest, black and pink, respectivly.
# Along with all elements that contain "phos" somewhere in there descriptions
drawProtein(proteins = list(type = c("Q04206", "random orgid:10090 number:5"),
colors = c("red", "random number:4", "green")),
types = list(type = c("domain", "region of interest"), colors = c("black", "pink")),
descriptionSearch = "phos"
)
#Example 4:
#This shows how to manually get the data and dataframe and use them directly to draw
xml <- uniprotProteinView::getProtein("Q04206", FALSE) #Get protein xml data
features <- uniprotProteinView::getFeaturesDataFrame(xml) #Get features dataframe
#Create matrix
matrix <- rbind(list(xml = xml[[1]], features = features[[1]], colors = "red"))
#Draw using the "preComputed" keyword
uniprotProteinView::drawProtein(proteins = list(preComputed = matrix))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.