if (!require(devtools)) {
install.packages('devtools')
}
devtools::install_github('eugloh/drawProteins')
This package has been created to allow the visualisation of protein schematics based on the data obtained from the Uniprot Protein Database.
-
to provide one or more Uniprot IDs
-
get a list of features from the Uniprot API
-
draw the basic chains of these proteins
-
add features as desired
drawProteins uses the package httr to interact with the Uniprot API
and extract a JSON object into R. The JSON object is used to create a
data.table.
The graphing package ggplot2 is then used to create the protein
schematic.
The Vignette gives a good overview of the package.
UniProt CHAIN annotations can describe a mature processed product rather
than the complete translated sequence. To plot observations in full precursor
coordinates, opt into a precursor backbone and add the processing annotations:
features <- feature_to_dataframe(get_features("O14672"))
p <- draw_canvas(features)
p <- draw_chains(p, features, extent = "precursor")
p <- draw_domains(p, features, type = "SIGNAL", label_domains = FALSE)
p <- draw_domains(p, features, type = "PROPEP", label_domains = FALSE)
p <- draw_domains(p, features, type = "DOMAIN", label_domains = FALSE)Precursor mode changes only the visual backbone. All UniProt feature
coordinates—including CHAIN, SIGNAL, and PROPEP—remain unchanged.
SIGNAL and PROPEP annotations can therefore explain observations before the
mature CHAIN. Separate calls retain description-based fills, so their styling
can be distinguished with the resulting ggplot2 fill scale.
Sample script on R for Biochemists blog
The master version of this package is available through
Bioconductor.
The development version is currently available here through GitHub.
This package is available through Bioconductor. Installation instructions and documentation are available.
To install from Github:
if (!require(devtools)) {
install.packages('devtools')
}
dev_mode(on=TRUE)
devtools::install_github('brennanpincardiff/drawProteins')
Please cite the following article when using drawProteins:
Brennan P. drawProteins: a Bioconductor/R package for reproducible and programmatic generation of protein schematics [version 1; referees: 2 approved]. F1000Research 2018, 7:1105
Feedback is very welcome. Please raise Github issues to provide bug reports, give feedback or request features.
