-
Notifications
You must be signed in to change notification settings - Fork 16
/
README.Rmd
113 lines (80 loc) · 6.47 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
106
107
108
109
110
111
---
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%"
)
```
# biocthis
<!-- badges: start -->
[![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)
<!-- badges: end -->
`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')`.