Build Status


Identify antimicrobial peptides

AmpGram identifies antimicrobial peptides using n-gram encoding and random forests. It can be also accessed as a web-based service

Local instance of AmpGram

You can install the latest development version of the package:


After installation GUI can be accessed locally:


Installing dependency: AmpGramModel

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:


Antimicrobial peptides might be also identified in the batch mode:

# if you do not have AmpGramModel use:
# install_AmpGramModel()
sequences <- read_txt(system.file("AmpGram/prots.txt", package = "AmpGram"))
predict(AmpGram_model, sequences)

Unix/macOS: curl

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

Binary packages for OS-X or Windows can be installed directly from CRAN:


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.