Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
aricha17 authored Feb 5, 2024
0 parents commit f41b69b
Show file tree
Hide file tree
Showing 23 changed files with 658 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.*\.Rproj$
^\.Rproj\.user$
^README.Rmd
^\.github$
^doc$
^Meta$
^codecov\.yml$
^_pkgdown\.yml$
^docs$
^pkgdown$
Dockerfile
^LICENSE\.md$

node_modules$
package-lock\.json$
package\.json$
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

## 1. Bug description

(A clear and concise description of what the bug is.)

### Expected behaviour

(A clear and concise description of what you expected to happen.)


## 2. Reproducible example

### Code

(Please add the steps to reproduce the bug here. See [here](https://www.r-bloggers.com/2020/10/how-to-make-a-reprex/) for an intro to making a reproducible example (i.e. reprex) and why they're important! __This will help us to help you much faster.__)

```R
# Paste example here

```

### Console output

```
# Paste console output here (e.g. from R/python/command line)
```

### Data

(If possible, upload a small sample of your data so that we can reproduce the bug on our end. If that's not possible, please at least include a screenshot of your data and other relevant details.)


## 3. Session info

(Add output of the R function `utils::sessionInfo()` below. This helps us assess version/OS conflicts which could be causing bugs.)

<details>

```
# Paste utils::sessionInfo() output
```
</details>
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
58 changes: 58 additions & 0 deletions .github/workflows/rworkflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: rworkflows
'on':
push:
branches:
- master
- main
- devel
- RELEASE_**
pull_request:
branches:
- master
- main
- devel
- RELEASE_**
jobs:
rworkflows:
permissions:
contents: write
packages: write
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
container: ${{ matrix.config.cont }}
strategy:
fail-fast: ${{ false }}
matrix:
config:
- os: ubuntu-latest
bioc: devel
r: auto
cont: ghcr.io/bioconductor/bioconductor_docker:devel
rspm: https://packagemanager.rstudio.com/cran/__linux__/latest/release
- os: macOS-latest
bioc: release
r: auto
cont: ~
rspm: ~
- os: windows-latest
bioc: release
r: auto
cont: ~
rspm: ~
steps:
- uses: neurogenomics/rworkflows@master
with:
run_bioccheck: ${{ false }}
run_rcmdcheck: ${{ true }}
as_cran: ${{ true }}
run_vignettes: ${{ true }}
has_testthat: ${{ true }}
run_covr: ${{ true }}
run_pkgdown: ${{ true }}
has_runit: ${{ false }}
has_latex: ${{ false }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run_docker: ${{ false }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
runner_os: ${{ runner.os }}
cache_version: cache-v1
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# R project files
*.Rproj
.Rproj.user
.Ruserdata
# History files
.Rhistory
.Rapp.history
# Session Data files
.RData
# User-specific files
.Ruserdata
# .DS_Store
# find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
.DS_Store
./.DS_Store
./**/.DS_Store
./**/**/.DS_Store
./**/**/**/.DS_Store
./**/**/**/**/.DS_Store
./**/**/**/**/**/.DS_Store
./**/**/**/**/**/**/.DS_Store
# Example code in package build process
*-Ex.R
# Output files from R CMD build
/*.tar.gz
# Output files from R CMD check
/*.Rcheck/
# RStudio files
.Rproj.user/
# produced vignettes
vignettes/*.html
vignettes/*.pdf
vignettes/*.R
# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
.httr-oauth
# knitr and R markdown default cache directories
*_cache/
/cache/
# Temporary files created by R markdown
*.utf8.md
*.knit.md
# R Environment Variables
.Renviron
45 changes: 45 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Package: echoverseTemplate
Type: Package
Title: echoverse module: echoversePackageTitle
Version: 0.99.0
Authors@R:
c(person(given = "Brian",
family = "Schilder",
role = c("aut","cre"),
email = "[email protected]",
comment = c(ORCID = "0000-0001-5949-2191")),
person(given = "Jack",
family = "Humphrey",
role = c("aut"),
email = "[email protected]",
comment = c(ORCID = "0000-0002-6274-6620")),
person(given = "Towfique",
family = "Raj",
role = c("aut"),
email = "[email protected]",
comment = c(ORCID = "0000-0002-9355-5704"))
)
Description: echoverse module: echoversePackageDescription.
URL: https://github.com/RajLabMSSM/echoverseTemplate
BugReports: https://github.com/RajLabMSSM/echoverseTemplate/issues
Encoding: UTF-8
Depends: R (>= 4.1)
biocViews:
Software, Genetics, FunctionalGenomics, SystemsBiology
Imports:
Suggests:
rworkflows,
markdown,
rmarkdown,
remotes,
knitr,
BiocStyle,
covr,
testthat (>= 3.0.0),
utils,
rlang,
methods
RoxygenNote: 7.2.3
VignetteBuilder: knitr
License: GPL-3
Config/testthat/edition: 3
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Generated by roxygen2: do not edit by hand

3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# echoverseTemplate 0.99.0

* Added a `NEWS.md` file to track changes to the package.
8 changes: 8 additions & 0 deletions R/message_parallel.r
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#' Message parallel
#'
#' Send messages to console even from within parallel processes
#' @return Null
#' @keywords internal
message_parallel <- function(...) {
system(sprintf('echo "%s"', paste0(..., collapse = "")))
}
22 changes: 22 additions & 0 deletions R/messager.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#' Print messages
#'
#' Conditionally print messages.
#' Allows developers to easily control verbosity of functions,
#' and meet Bioconductor requirements that dictate the message
#' must first be stored to a variable before passing to \link[base]{message}.
#'
#'
#' @param v Whether to print messages or not.
#' @param parallel Whether to enable message print when wrapped
#' in parallelised functions.
#'
#' @return Null
#' @keywords internal
messager <- function(..., v = TRUE, parallel = FALSE) {
if(parallel){
if(v) try({message_parallel(...)})
} else {
msg <- paste(...)
if (v) try({message(msg)})
}
}
18 changes: 18 additions & 0 deletions R/stopper.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#' Stop messages
#'
#' Conditionally print stop messages.
#' Allows developers to easily control verbosity of functions,
#' and meet Bioconductor requirements that dictate the stop message
#' must first be stored to a variable before passing to \link[base]{stop}.
#' @param v Whether to print messages or not.
#'
#' @return Null
#' @keywords internal
stopper <- function(..., v = TRUE) {
msg <- paste(...)
if (v) {
stop(msg)
} else {
stop()
}
}
45 changes: 45 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: ""
author: "`r rworkflows::use_badges(add_doi = '10.1093/bioinformatics/btab658')`"
output:
github_document
---

```{r, echo=FALSE, include=FALSE}
pkg <- read.dcf("DESCRIPTION", fields = "Package")[1]
description <- read.dcf("DESCRIPTION", fields = "Description")[1] |>
gsub(pattern="\n", replacement=" ")
```

## ``r pkg``: `r gsub("echoverse module: ","", description)`

This R package is part of the *echoverse* suite that supports
[`echolocatoR`](https://github.com/RajLabMSSM/echolocatoR):
an automated genomic fine-mapping pipeline.

If you use ``r pkg``, please cite:

> `r citation(pkg)$textVersion`
## Installation

```R
if(!require("remotes")) install.packages("remotes")

remotes::install_github("RajLabMSSM/`r pkg`")
library(`r pkg`)
```
## Documentation

### [Website](https://rajlabmssm.github.io/`r pkg`)
### [Get started](https://rajlabmssm.github.io/`r pkg`/articles/`r pkg`)

<hr>

## Contact

<a href="https://bschilder.github.io/BMSchilder/" target="_blank">Brian
M. Schilder, Bioinformatician II</a>
<a href="https://rajlab.org" target="_blank">Raj Lab</a>
<a href="https://icahn.mssm.edu/about/departments/neuroscience" target="_blank">Department
of Neuroscience, Icahn School of Medicine at Mount Sinai</a>
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<img src='https://github.com/RajLabMSSM/echoverseTemplate/raw/master/inst/hex/hex.png' title='Hex sticker for echoverseTemplate' height='300'><br>
[![License:
GPL-3](https://img.shields.io/badge/license-GPL--3-blue.svg)](https://cran.r-project.org/web/licenses/GPL-3)
[![](https://img.shields.io/badge/doi-10.1093/bioinformatics/btab658-blue.svg)](https://doi.org/10.1093/bioinformatics/btab658)
[![](https://img.shields.io/badge/devel%20version-0.99.0-black.svg)](https://github.com/RajLabMSSM/echoverseTemplate)
[![](https://img.shields.io/github/languages/code-size/RajLabMSSM/echoverseTemplate.svg)](https://github.com/RajLabMSSM/echoverseTemplate)
[![](https://img.shields.io/github/last-commit/RajLabMSSM/echoverseTemplate.svg)](https://github.com/RajLabMSSM/echoverseTemplate/commits/master)
<br> [![R build
status](https://github.com/RajLabMSSM/echoverseTemplate/workflows/rworkflows/badge.svg)](https://github.com/RajLabMSSM/echoverseTemplate/actions)
[![](https://codecov.io/gh/RajLabMSSM/echoverseTemplate/branch/master/graph/badge.svg)](https://app.codecov.io/gh/RajLabMSSM/echoverseTemplate)
<br>
<a href='https://app.codecov.io/gh/RajLabMSSM/echoverseTemplate/tree/master' target='_blank'><img src='https://codecov.io/gh/RajLabMSSM/echoverseTemplate/branch/master/graphs/icicle.svg' title='Codecov icicle graph' width='200' height='50' style='vertical-align: top;'></a>
<h4>
Authors: <i>Brian Schilder, Jack Humphrey, Towfique Raj</i>
</h4>

## `echoverseTemplate`: echoversePackageDescription.

This R package is part of the *echoverse* suite that supports
[`echolocatoR`](https://github.com/RajLabMSSM/echolocatoR): an automated
genomic fine-mapping pipeline.

If you use `echoverseTemplate`, please cite:

> Brian M Schilder, Jack Humphrey, Towfique Raj (2021) echolocatoR: an
> automated end-to-end statistical and functional genomic fine-mapping
> pipeline, *Bioinformatics*; btab658,
> <https://doi.org/10.1093/bioinformatics/btab658>
## Installation

``` r
if(!require("remotes")) install.packages("remotes")

remotes::install_github("RajLabMSSM/echoverseTemplate")
library(echoverseTemplate)
```

## Documentation

### [Website](https://rajlabmssm.github.io/echoverseTemplate)

### [Get started](https://rajlabmssm.github.io/echoverseTemplate/articles/echoverseTemplate)

<hr>

## Contact

<a href="https://bschilder.github.io/BMSchilder/" target="_blank">Brian
M. Schilder, Bioinformatician II</a>
<a href="https://rajlab.org" target="_blank">Raj Lab</a>
<a href="https://icahn.mssm.edu/about/departments/neuroscience" target="_blank">Department
of Neuroscience, Icahn School of Medicine at Mount Sinai</a>
Loading

0 comments on commit f41b69b

Please sign in to comment.