Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lcolladotor/biocthis

Automate package and project setup for Bioconductor packages
https://github.com/lcolladotor/biocthis

actions bioconductor biocthis github rstats styler usethis

Last synced: about 2 months ago
JSON representation

Automate package and project setup for Bioconductor packages

Awesome Lists containing this project

README

        

---
output: github_document
---

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

# biocthis

[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![Bioc release status](http://www.bioconductor.org/shields/build/release/bioc/biocthis.svg)](https://bioconductor.org/checkResults/release/bioc-LATEST/biocthis)
[![Bioc devel status](http://www.bioconductor.org/shields/build/devel/bioc/biocthis.svg)](https://bioconductor.org/checkResults/devel/bioc-LATEST/biocthis)
[![Bioc downloads rank](https://bioconductor.org/shields/downloads/release/biocthis.svg)](http://bioconductor.org/packages/stats/bioc/biocthis/)
[![Bioc support](https://bioconductor.org/shields/posts/biocthis.svg)](https://support.bioconductor.org/tag/biocthis)
[![Bioc history](https://bioconductor.org/shields/years-in-bioc/biocthis.svg)](https://bioconductor.org/packages/release/bioc/html/biocthis.html#since)
[![Bioc last commit](https://bioconductor.org/shields/lastcommit/devel/bioc/biocthis.svg)](http://bioconductor.org/checkResults/devel/bioc-LATEST/biocthis/)
[![Bioc dependencies](https://bioconductor.org/shields/dependencies/release/biocthis.svg)](https://bioconductor.org/packages/release/bioc/html/biocthis.html#since)
[![Codecov test coverage](https://codecov.io/gh/lcolladotor/biocthis/branch/devel/graph/badge.svg)](https://codecov.io/gh/lcolladotor/biocthis?branch=devel)
[![R build status](https://github.com/lcolladotor/biocthis/workflows/R-CMD-check-bioc/badge.svg)](https://github.com/lcolladotor/biocthis/actions)
[![GitHub issues](https://img.shields.io/github/issues/lcolladotor/biocthis)](https://github.com/lcolladotor/biocthis/issues)
[![GitHub pulls](https://img.shields.io/github/issues-pr/lcolladotor/biocthis)](https://github.com/lcolladotor/biocthis/pulls)

`r BiocStyle::Githubpkg("lcolladotor/biocthis")` is an R package that expands `r BiocStyle::CRANpkg("usethis")` with Bioconductor-friendly templates. These templates will help you quickly create an R package that either has Bioconductor dependencies or that you are thinking of submitting to Bioconductor one day. `r BiocStyle::Githubpkg("lcolladotor/biocthis")` has functions that can also enhance your current R packages that either are already distributed by Bioconductor or have Bioconductor dependencies. `r BiocStyle::Githubpkg("lcolladotor/biocthis")` also includes a Bioconductor-friendly [GitHub Actions](https://github.com/features/actions) workflow for your R package(s).

Note that `r BiocStyle::Githubpkg("lcolladotor/biocthis")` is not a Bioconductor-core package and as such it is not a Bioconductor official package. It was made by and for Leonardo Collado-Torres so he could more easily maintain and create Bioconductor packages as listed at [lcolladotor.github.io/pkgs/](https://lcolladotor.github.io/pkgs/). Hopefully `r BiocStyle::Githubpkg("lcolladotor/biocthis")` will be helpful for you too.

## Installation instructions

Get the latest stable `R` release from [CRAN](http://cran.r-project.org/). Then install `biocthis` from [Bioconductor](http://bioconductor.org/) using the following code:

```{r 'install', eval = FALSE}
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}

BiocManager::install("biocthis")
```

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

```{r 'install_dev', eval = FALSE}
BiocManager::install("lcolladotor/biocthis")
```

## Example

Here is how you can use `r BiocStyle::Githubpkg("lcolladotor/biocthis")` to create a new Bioconductor-friendly R package (illustrated using a temporary directory):

```{r example, eval = requireNamespace('biocthis')}
## Load biocthis
library("biocthis")

## Create an example package for illustrative purposes.
## Note: you do not need to run this for your own package!
pkgdir <- biocthis_example_pkg()

## Create the bioc templates
biocthis::use_bioc_pkg_templates()
```

The template `dev` scripts include comments and steps you can follow for making your Bioconductor-friendly R package or updating a current package. In particular, you might
want to use a Bioconductor-friendly GitHub Actions workflow. If this is your first time seeings this words, we highly recommend that you watch [Jim Hester's `rstudio::conf(2020)` talk on this subject](https://www.jimhester.com/talk/2020-rsc-github-actions/).

```{r 'bioc_github_action'}
## Create a GitHub Actions workflow that is Bioconductor-friendly
biocthis::use_bioc_github_action()
```

```{r 'bioc_github_action_alternatives'}
## Alternatively, use the general GitHub Actions workflow maintained by
## r-lib/actions
usethis::use_github_action("check-standard")
```

## Citation

Below is the citation output from using `citation('biocthis')` in R. Please
run this yourself to check for any updates on how to cite __biocthis__.

```{r 'citation', eval = requireNamespace('biocthis')}
print(citation("biocthis"), bibtex = TRUE)
```

Please note that the `biocthis` was only made possible thanks to many other R and bioinformatics software authors, which are cited either in the vignettes and/or the paper(s) describing this package.

## Code of Conduct

Please note that the `biocthis` project is released with a [Contributor Code of Conduct](http://bioconductor.org/about/code-of-conduct/). By contributing to this project, you agree to abide by its terms.

## Development tools

* Continuous code testing is possible thanks to [GitHub actions](https://www.tidyverse.org/blog/2020/04/usethis-1-6-0/) through `r BiocStyle::CRANpkg('usethis')`, `r BiocStyle::CRANpkg('remotes')`, and `r BiocStyle::CRANpkg('rcmdcheck')` customized to use [Bioconductor's docker containers](https://www.bioconductor.org/help/docker/) and `r BiocStyle::Biocpkg('BiocCheck')`.
* Code coverage assessment is possible thanks to [codecov](https://codecov.io/gh) and `r BiocStyle::CRANpkg('covr')`.
* The [documentation website](http://lcolladotor.github.io/biocthis) is automatically updated thanks to `r BiocStyle::CRANpkg('pkgdown')`.
* The code is styled automatically thanks to `r BiocStyle::CRANpkg('styler')`.
* The documentation is formatted thanks to `r BiocStyle::CRANpkg('devtools')` and `r BiocStyle::CRANpkg('roxygen2')`.

For more details, check the `dev` directory.

This package was developed using `r BiocStyle::Biocpkg('biocthis')`.