AmpGram identifies antimicrobial peptides using n-gram encoding and random forests. It can be also accessed as a web-based service http://www.smorfland.uni.wroc.pl/shiny/AmpGram/.
You can install the latest development version of the package:
source("https://raw.githubusercontent.com/r-lib/remotes/master/install-github.R")$value("michbur/AmpGram")
After installation GUI can be accessed locally:
library(AmpGram)
AmpGram_gui()
To be able to use AmpGram properly, you should have installed the ‘AmpGramModel’ package available via GitHub. AmpGramModel contains stacked random forest model and informative n-grams required for prediction of antimicrobial peptides. Due to the large size of a model, it needs to be stored in the external repository, as CRAN do not allow upload of files larger than 5 MB.
You can install AmpGramModel using the install_AmpGramModel function:
install_AmpGramModel()
Antimicrobial peptides might be also identified in the batch mode:
library(AmpGram)
library(AmpGramModel)
# if you do not have AmpGramModel use:
# install_AmpGramModel()
<- read_txt(system.file("AmpGram/prots.txt", package = "AmpGram"))
sequences predict(AmpGram_model, sequences)
The curl library is one of the dependencies of the AmpGram package and requires additional, non-R software. If you encounter an error concerning curl, please follow instructions below to install curl (adapted from https://github.com/jeroen/curl).
Binary packages for OS-X or Windows can be installed directly from CRAN:
install.packages("curl")
Installation from source on Linux requires libcurl
. On
Debian or Ubuntu use libcurl4-openssl-dev:
sudo apt-get install -y libcurl-dev
On Fedora, CentOS or RHEL use libcurl-devel:
sudo yum install libcurl-devel
On OS-X libcurl is included with the system so nothing extra is needed. However if you want to build against the most recent version of libcurl, install and force-link curl from homebrew:
brew install curl
brew link --force curl
Note that on OS-X you must recompile the R package from source after force-linking curl, otherwise you get a version conflict with the system version of libcurl.