ampir

antimicrobial peptide prediction in R

https://github.com/legana/ampir

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    1 of 5 committers (20.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (21.0%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

antimicrobial peptide prediction in R

Basic Info
  • Host: GitHub
  • Owner: Legana
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 34.1 MB
Statistics
  • Stars: 33
  • Watchers: 2
  • Forks: 5
  • Open Issues: 0
  • Releases: 0
Created over 7 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```




# Introduction to ampir


[![](https://img.shields.io/badge/Shiny-ampir-blue?style=flat&labelColor=white&logo=RStudio&logoColor=blue)](https://ampir.marine-omics.net/)
[![](https://img.shields.io/badge/doi-10.1093/bioinformatics/btaa653-yellow.svg)](https://doi.org/10.1093/bioinformatics/btaa653)
[![Travis build status](https://travis-ci.com/Legana/ampir.svg?branch=master)](https://travis-ci.com/Legana/ampir) [![codecov](https://codecov.io/gh/Legana/ampir/branch/master/graph/badge.svg)](https://codecov.io/gh/Legana/ampir) [![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html) [![CRAN\_Release\_Badge](http://www.r-pkg.org/badges/version-ago/ampir)](https://CRAN.R-project.org/package=ampir?color=yellow) ![CRAN\_Download\_Badge](http://cranlogs.r-pkg.org/badges/grand-total/ampir?color=red) 
[![](http://cranlogs.r-pkg.org/badges/last-month/ampir?color=green)](https://cran.r-project.org/package=ampir)



The **ampir** (short for **a**nti**m**icrobial **p**eptide prediction **i**n **r** ) package was designed to be a fast and user-friendly method to predict antimicrobial peptides (AMPs) from any given size protein dataset. **ampir** uses a *supervised statistical machine learning* approach to predict AMPs. It incorporates two support vector machine classification models, "precursor" and "mature" that have been trained on publicly available antimicrobial peptide data. The default model, "precursor" is best suited for full length proteins and the "mature" model is best suited for small mature proteins (<60 amino acids). **ampir**  also accepts custom (user trained) models based on the [caret](https://github.com/topepo/caret) package. Please see the **ampir** *"How to train your model"* [vignette](https://CRAN.R-project.org/package=ampir/vignettes/train_model.html) for details.

ampir's associated paper is published in the *Bioinformatics* journal as [btaa653](https://academic.oup.com/bioinformatics/article-abstract/doi/10.1093/bioinformatics/btaa653/5873588). Please cite this paper if you use ampir in your research.

ampir is also available via a Shiny based GUI at [https://ampir.marine-omics.net/](https://ampir.marine-omics.net/) where users can submit protein sequences in FASTA file format to be classified by either the "precursor" or "mature" model. The prediction results can then be downloaded as a csv file.

## Installation

You can install the released version of ampir from [CRAN](https://CRAN.R-project.org) with:

``` r
install.packages("ampir")
```

And the development version from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("Legana/ampir")
```

```{r setup, warning=FALSE, message=FALSE}
library(ampir)
```

## Usage

Standard input to **ampir** is a `data.frame` with sequence names in the first column and protein sequences in the second column. 

Read in a FASTA formatted file as a `data.frame` with `read_faa()` 

```{r, warning=FALSE, message=FALSE}
my_protein_df <- read_faa(system.file("extdata/little_test.fasta", package = "ampir"))
```

```{r, echo=FALSE}
display_df <- my_protein_df
display_df$seq_aa <- paste(substring(display_df$seq_aa,1,45),"...",sep="")
display_df$seq_name <- gsub("tr\\|[^\\|]*\\|","",display_df$seq_name)
knitr::kable(display_df)
```

Calculate the probability that each protein is an antimicrobial peptide with `predict_amps()`. Since these proteins are all full length precursors rather than mature peptides we use `ampir`'s built-in precursor model.

*Note that amino acid sequences that are shorter than 10 amino acids long and/or contain anything other than the standard 20 amino acids are not evaluated and will contain an `NA` as their `prob_AMP` value.*

```{r}
my_prediction <- predict_amps(my_protein_df, model = "precursor")
```

```{r, echo=FALSE}
my_prediction$seq_aa <- paste(substring(my_prediction$seq_aa,1,45),"...",sep="")
my_prediction$seq_name <- gsub("tr\\|[^\\|]*\\|","",my_prediction$seq_name)
knitr::kable(my_prediction, digits = 3)
```

Predicted proteins with a specified predicted probability value could then be extracted and written to a FASTA file:

```{r}
my_predicted_amps <- my_protein_df[which(my_prediction$prob_AMP >= 0.8),]
```

```{r, echo=FALSE}
my_predicted_amps$seq_aa <- paste(substring(my_predicted_amps$seq_aa,1,45),"...",sep="")
my_predicted_amps$seq_name <- gsub("tr\\|[^\\|]*\\|","",my_predicted_amps$seq_name)
knitr::kable(my_predicted_amps)
```

Write the `data.frame` with sequence names in the first column and protein sequences in the second column to a FASTA formatted file with `df_to_faa()`

```{r, eval=FALSE}
df_to_faa(my_predicted_amps, "my_predicted_amps.fasta")
```



Owner

  • Login: Legana
  • Kind: user

Bioinformatician, PhD | Molecular biology, genetics, comparative genomics and evolution.

GitHub Events

Total
  • Watch event: 5
  • Push event: 3
  • Create event: 1
Last Year
  • Watch event: 5
  • Push event: 3
  • Create event: 1

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 219
  • Total Committers: 5
  • Avg Commits per committer: 43.8
  • Development Distribution Score (DDS): 0.406
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Legana Fingerhut l****t@m****u 130
Ira Cooke i****e@g****m 45
Legana Fingerhut l****t@L****l 36
Legana Fingerhut l****a@L****l 7
Ira Cooke i****e@I****l 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 6
  • Total pull requests: 16
  • Average time to close issues: 14 days
  • Average time to close pull requests: 4 days
  • Total issue authors: 3
  • Total pull request authors: 4
  • Average comments per issue: 1.67
  • Average comments per pull request: 0.81
  • Merged pull requests: 13
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • iracooke (4)
  • Ebedthan (1)
  • flystar233 (1)
Pull Request Authors
  • iracooke (11)
  • Legana (3)
  • Ebedthan (1)
  • Wytamma (1)
Top Labels
Issue Labels
bug (1) enhancement (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • cran 371 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 4
  • Total maintainers: 1
cran.r-project.org: ampir

Predict Antimicrobial Peptides

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 371 Last month
Rankings
Stargazers count: 12.2%
Forks count: 12.8%
Average: 26.1%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Downloads: 40.2%
Last synced: 11 months ago
conda-forge.org: r-ampir
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 34.0%
Stargazers count: 44.9%
Average: 45.4%
Dependent packages count: 51.2%
Forks count: 51.6%
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.5.0 depends
  • Peptides * imports
  • Rcpp * imports
  • caret >= 6.0.0 imports
  • kernlab * imports
  • parallel * imports
  • e1071 * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • testthat >= 3.0.0 suggests