-
Notifications
You must be signed in to change notification settings - Fork 4
/
README.Rmd
105 lines (78 loc) · 3.76 KB
/
README.Rmd
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
ggplot2::theme_set(ggplot2::theme_bw())
```
# deepredeff <img src="man/figures/logo.png" align="right" width="120"/>
<!-- badges: start -->
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/deepredeff)](https://cran.r-project.org/package=deepredeff)
[![lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![R-CMD-check](https://github.com/ruthkr/deepredeff/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ruthkr/deepredeff/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/ruthkr/deepredeff/branch/master/graph/badge.svg)](https://codecov.io/gh/ruthkr/deepredeff?branch=master)
[![pkgdown status](https://github.com/ruthkr/deepredeff/workflows/pkgdown/badge.svg)](https://ruthkr.github.io/deepredeff/)
[![tensorflow version](https://img.shields.io/badge/tensorflow-v2.0.0-orange)](https://www.tensorflow.org/)
[![python version](https://img.shields.io/badge/python-v3.6-blue)](https://www.python.org/)
[![doi](https://img.shields.io/badge/DOI-10.1101%2F2020.07.08.193250-blue)](https://www.biorxiv.org/content/10.1101/2020.07.08.193250v1)
<!-- badges: end -->
**deepredeff** is a package to predict effector protein given amino acid sequences. This tool can be used to predict effectors from three different taxa, which are oomycete, fungi, and bacteria.
## Installation
You can install the released version of `deepredeff` from [CRAN](https://CRAN.R-project.org) with:
``` r
install.packages("deepredeff")
```
And the development version from [GitHub](https://github.com/) with:
```r
# install.packages("devtools")
devtools::install_github("ruthkr/deepredeff")
```
The `deepredeff` package uses TensorFlow. If you already have TensorFlow 2.0.0 or later in your system, then you can specify the environment where TensorFlow is installed using `reticulate::use_condaenv()`. Otherwise, you can install TensorFlow, by using the `install_tensorflow()` function as follows:
```r
library(deepredeff)
install_tensorflow()
```
**Note that this only needs to be run once**, the first time you use `deepredeff`.
## Documentation
To use `deepredeff`, you can read the documentation on the following topics:
1. [Getting started](https://ruthkr.github.io/deepredeff/articles/overview.html)
2. [Effector prediction with various different input formats and models](https://ruthkr.github.io/deepredeff/articles/predict.html)
## Quick start
This is a basic example which shows you how to predict effector sequences if you have a FASTA file:
```{r example}
# Load the package
library(deepredeff)
# Define the fasta path from the sample data
bacteria_fasta_path <- system.file(
"extdata/example", "bacteria_sample.fasta",
package = "deepredeff"
)
# Predict the effector candidate using bacteria model
pred_result <- predict_effector(
input = bacteria_fasta_path,
taxon = "bacteria"
)
```
```r
# View results
pred_result
```
```{r pred-result, echo=FALSE}
pred_result %>%
dplyr::mutate(
name = stringr::str_replace_all(name, "\\|", "⎮"),
sequence = stringr::str_sub(sequence, 1, 25)
) %>%
knitr::kable()
```
After getting the prediction results, you can plot the probability distribution of the results as follows:
```{r pred_result_plot, fig.width=7, fig.height=3.5, out.width='670px', out.height='335px', fig.align='center'}
plot(pred_result)
```
More examples with different input formats are available on functions documentations and vignettes, please refer to the [documentation](https://ruthkr.github.io/deepredeff/).