-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.Rmd
69 lines (54 loc) · 2.28 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
options(tibble.print_min = 5, tibble.print_max = 5)
```
# miplicorn <a href='https://bailey-lab.github.io/miplicorn/'><img src='man/figures/logo.png' align="right" height="139" /></a>
<!-- badges: start -->
[![R-CMD-check](https://github.com/bailey-lab/miplicorn/actions/workflows/check-standard.yaml/badge.svg)](https://github.com/bailey-lab/miplicorn/actions/workflows/check-standard.yaml)
[![Codecov test coverage](https://codecov.io/gh/bailey-lab/miplicorn/branch/main/graph/badge.svg)](https://app.codecov.io/gh/bailey-lab/miplicorn?branch=main)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
<!-- badges: end -->
miplicorn establishes a unified analysis framework in R for molecular inversion
probe (MIP) and amplicon-targeted sequencing analysis after micro haplotyping or
variant calling. It provides tools for parsing large variant files, filtering
and manipulating the data, and basic analyses and visualization.
## Installation
You may install the package from
[Github](https://github.com/bailey-lab/miplicorn) using `devtools`.
::: .pkgdown-release
```{r, eval = FALSE}
# Install most recent released version
devtools::install_github("bailey-lab/miplicorn@v0.2.1")
```
:::
::: .pkgdown-devel
```{r, eval = FALSE}
# Install development version
devtools::install_github("bailey-lab/miplicorn")
```
:::
## Usage
See `vignette("miplicorn")` for a more extensive introduction and a
demonstration of several features of the package.
```{r usage, warning = FALSE}
library(miplicorn)
ref_file <- miplicorn_example("reference_AA_table.csv")
alt_file <- miplicorn_example("alternate_AA_table.csv")
cov_file <- miplicorn_example("coverage_AA_table.csv")
data <- read_tbl_ref_alt_cov(ref_file, alt_file, cov_file, gene == "atp6" | gene == "crt")
data
plot_coverage(data, mutation_name)
prev <- mutation_prevalence(data, threshold = 5)
prev
plot(prev)
```