Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homepage revamp #59

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 45 additions & 7 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,31 @@ output: github_document
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
<span style="font-family:Arial; font-size:10em;"> `happi`: a **H**ierarchical **Ap**proach to **P**angenomics **I**nference</span>

## What is `happi`?
# HAPPI <img src="vignettes/logo.JPEG" align="right" width="200px"/>

<span style="font-family:Arial; font-size:10em;">

a **H**ierarchical **Ap**proach to **P**angenomics **I**nference</span>

<!-- ## What is `happi`? -->
`happi` is a method for modeling gene presence in pangenomics that leverages information about genome quality to improve inference. `happi` models the association between an experimental condition and gene presence where the **experimental condition** is the **primary predictor** of interest and **gene presence** is the **outcome** while incorporating user-chosen information on genome quality metrics (e.g. mean coverage, contamination, completion, etc...).

You might be interested in using `happi` to conduct your pangenomics hypothesis testing if you work with fragmented genomes such as metagenome assembled genomes (MAGs). `happi` is currently distributed as an `R` package and can be installed using the instructions below.

## Where does `happi` fit into my workflow?
If you are a **microbial ecologist** or **bioinformatician**, some of the things that you may like about `happi` include

- **AMY TO LIST ITEM 1**

- **AMY TO LIST ITEM 2**

If you are a **statistician**, things you may like about `happi` include

- **AMY TO LIST ITEM 1**

- **AMY TO LIST ITEM 2**

### Where does `happi` fit into my workflow?

If you're new to shotgun metagenomics we understand that things can feel overwhelming! On top of all the tools and names floating around you're probably wondering where does `happi` fit into the vast suite of bioinformatics tools for metagenomics data and how can you use it in your work? `happi` can be used *after* you have assembled, binned, annotated, and refined your genomes or metagenome-assembled genomes (MAGs) and as such it can be used with any bioinformatics workflow that conducts assembly, binning, annotation, and refinement.

Expand Down Expand Up @@ -43,6 +60,28 @@ functions through the `R` interactive session. You can follow the vignettes by r
```
utils::browseVignettes(package = "happi")
```

The syntax to use the main functions from `happi` in `R` is shown in the following example,

```
happi_results <- happi(outcome = presence_vector, covariate=x_matrix, quality_var= quality_vector)
happi_results$summary
```

where `presence_vector` is a length-n vector indicating the presence/absence (coded as 0 or 1) of the target gene, `x_matrix` is a n x p design matrix for the predictors of interest, and `quality_vector` is a length-n vector indicating the quality of the genome.

To use `happi`'s nonparametric permutation testing approach, we could run the `happi()` function above with the extra argument `run_npLRT = TRUE` or we can take our `happi` results object as an input to the function `happi::npLRT()` as shown below.

```
perm_test_result <- npLRT(happi_results,
change_threshold = 0.1,
spline_df = 3,
nstarts = 1,
epsilon = 0,
firth = T,
method = "splines")
```

An example snakemake workflow of `happi`'s usage has been made available under the `workflows/` folder of this github directory. To run the example workflow you'll need to install snakemake. We recommend creating a conda environment with your snakemake installation:

```
Expand All @@ -68,13 +107,12 @@ The Snakefile is customizable for your own input data and parameters. Please ref
## How do I export data from anvi'o for use in `happi`?



## Citation
If you use `happi` please cite our work:
If you use `happi` please cite our work:

An open-access preprint is available [here](https://www.biorxiv.org/content/10.1101/2022.04.26.489591v1.full).
Trinh P, Clausen DS, Willis AD. happi: a hierarchical approach to pangenomics inference. Genome Biology. 2023;24(1):214-214. [Available here](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-023-03040-6)

## Issues/Requests
## Issues/Requests

If you have any issues using our software or further questions please submit an issue [here](https://github.com/statdivlab/happi/issues).

Expand Down
53 changes: 47 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

<span style="font-family:Arial; font-size:10em;"> `happi`: a
**H**ierarchical **Ap**proach to **P**angenomics **I**nference</span>
# HAPPI <img src="vignettes/logo.JPEG" align="right" width="200px"/>

## What is `happi`?
<span style="font-family:Arial; font-size:10em;">

a **H**ierarchical **Ap**proach to **P**angenomics **I**nference</span>

<!-- ## What is `happi`? -->

`happi` is a method for modeling gene presence in pangenomics that
leverages information about genome quality to improve inference. `happi`
Expand All @@ -19,7 +22,20 @@ hypothesis testing if you work with fragmented genomes such as
metagenome assembled genomes (MAGs). `happi` is currently distributed as
an `R` package and can be installed using the instructions below.

## Where does `happi` fit into my workflow?
If you are a **microbial ecologist** or **bioinformatician**, some of
the things that you may like about `happi` include

- **AMY TO LIST ITEM 1**

- **AMY TO LIST ITEM 2**

If you are a **statistician**, things you may like about `happi` include

- **AMY TO LIST ITEM 1**

- **AMY TO LIST ITEM 2**

### Where does `happi` fit into my workflow?

If you’re new to shotgun metagenomics we understand that things can feel
overwhelming! On top of all the tools and names floating around you’re
Expand Down Expand Up @@ -76,6 +92,30 @@ the vignettes by running the following code in `R`:

utils::browseVignettes(package = "happi")

The syntax to use the main functions from `happi` in `R` is shown in the
following example,

happi_results <- happi(outcome = presence_vector, covariate=x_matrix, quality_var= quality_vector)
happi_results$summary

where `presence_vector` is a length-n vector indicating the
presence/absence (coded as 0 or 1) of the target gene, `x_matrix` is a n
x p design matrix for the predictors of interest, and `quality_vector`
is a length-n vector indicating the quality of the genome.

To use `happi`’s nonparametric permutation testing approach, we could
run the `happi()` function above with the extra argument
`run_npLRT = TRUE` or we can take our `happi` results object as an input
to the function `happi::npLRT()` as shown below.

perm_test_result <- npLRT(happi_results,
change_threshold = 0.1,
spline_df = 3,
nstarts = 1,
epsilon = 0,
firth = T,
method = "splines")

An example snakemake workflow of `happi`’s usage has been made available
under the `workflows/` folder of this github directory. To run the
example workflow you’ll need to install snakemake. We recommend creating
Expand Down Expand Up @@ -106,8 +146,9 @@ Please refer to the sample data files that have been provided in

If you use `happi` please cite our work:

An open-access preprint is available
[here](https://www.biorxiv.org/content/10.1101/2022.04.26.489591v1.full).
Trinh P, Clausen DS, Willis AD. happi: a hierarchical approach to
pangenomics inference. Genome Biology. 2023;24(1):214-214. [Available
here](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-023-03040-6)

## Issues/Requests

Expand Down