https://github.com/noriakis/stana
Metagenotyping analysis in R
https://github.com/noriakis/stana
intra-species metagenomics metagenotyping microbiome r strain-analysis
Last synced: 8 months ago
JSON representation
Metagenotyping analysis in R
- Host: GitHub
- URL: https://github.com/noriakis/stana
- Owner: noriakis
- License: gpl-3.0
- Created: 2022-12-23T13:21:25.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-13T04:28:45.000Z (about 2 years ago)
- Last Synced: 2024-04-13T18:11:10.663Z (about 2 years ago)
- Topics: intra-species, metagenomics, metagenotyping, microbiome, r, strain-analysis
- Language: R
- Homepage: https://noriakis.github.io/software/stana
- Size: 5.64 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
fig.dev = "grDevices::png",
dpi = 300L,
dev.args = list(),
fig.ext = "png",
fig.height=8,
fig.width=12,
fig.retina = 2L,
fig.align = "center"
)
```
# stana
[](https://github.com/noriakis/stana/actions/workflows/R-CMD-check.yaml)
Metagenotyping analysis in R. Import and analyse, visualize the metagenotyping output of the software like [MIDAS](https://github.com/snayfach/MIDAS), [MIDAS2](https://github.com/czbiohub/MIDAS2), [metaSNV and metaSNV v2](https://github.com/metasnv-tool/metaSNV), and [inStrain](https://github.com/MrOlm/inStrain). In general the metagenotyping software produces the allelic count information and gene copy number tables and the package utilizes these information to analyze the intra-species diversity.
The detailed usage is available at [https://noriakis.github.io/software/stana](https://noriakis.github.io/software/stana), using `bookdown`.
## Installation
Using `devtools`:
```{r, eval=FALSE}
devtools::install_github("noriakis/stana")
```
## Pipeline

## Examples
```{r message=FALSE, warning=FALSE, fig.width=6, fig.height=6}
## Using example data
library(stana)
library(phangorn)
load(system.file("extdata", "sysdata.rda", package = "stana"))
stana
getID(stana)
## Make example metadata
samples <- getSlot(stana, "snps")[[1]] |> colnames()
metadata <- data.frame(
row.names=samples,
treatment=factor(sample(1:3, length(samples), replace=TRUE)),
marker=runif(length(samples))
)
## Set metadata
stana <- setMetadata(stana, metadata)
## Call consensus sequence
## Infer and plot tree based on metadata
stana <- stana |>
consensusSeq(argList=list(site_prev=0.95)) |>
inferAndPlotTree(meta=c("treatment","marker"))
getFasta(stana)[[1]]
getTree(stana)[[1]]
getTreePlot(stana)[[1]]
```
If the gene copy number table is available like in `MIDAS` series and `inStrain`, one can compare the functional implications of these gene contents. The details are described in the [documentation](https://noriakis.github.io/software/stana).
## Interactive inspection
The users can inspect metagenotyping results interactively using Shiny based on the variables such as disease conditions (`exportInteractive()`). One can publish the results in the hosting services for sharing the research findings.