Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/uscbiostats/software-dev

Coding Standards for the USC Biostats group
https://github.com/uscbiostats/software-dev

hpc r reproducibility reproducible-research standards

Last synced: 3 months ago
JSON representation

Coding Standards for the USC Biostats group

Awesome Lists containing this project

README

        

---
output:
rmarkdown::github_document:
html_preview: false
---

# Software Development Standards ![GitHub last commit](https://img.shields.io/github/last-commit/USCbiostats/software-dev)

This project's main contents are located in the project's [Wiki](wiki#welcome-to-the-software-development-wiki).

# USCbiostats R packages

```{r setup, include=FALSE}
knitr::opts_chunk$set(warning = FALSE, message = FALSE)
```

```{r listing-pkgs, echo = FALSE}
pkgs <- read.csv("packages.csv", comment.char = "#", stringsAsFactors = FALSE)

# Alphabetically ordered
pkgs <- pkgs[order(pkgs$name),,drop=FALSE]

# Checking cran status
pkgs$on_cran <- TRUE
for (i in seq_len(nrow(pkgs))) {
pkg_status <- tryCatch(
httr::GET(sprintf("https://cran.r-project.org/package=%s", pkgs$name[i])),
error = function(e) e
)

# Error fetching a status
if (inherits(pkg_status, "error")) {
pkgs$on_cran[i] <- FALSE
next
}

if (httr::status_code(pkg_status) != 200) {
pkgs$on_cran[i] <- FALSE
next
}

}

dat <- with(pkgs, data.frame(
Name = sprintf(
"[**%s**](%s)", name, ifelse(!is.na(repo) & repo != "", repo, paste0("https://github.com/USCbiostats/", name))
),
Description = paste(
description,
sprintf(
"[![CRAN status](https://www.r-pkg.org/badges/version/%s)](https://CRAN.R-project.org/package=%1$s)",
name
),
sprintf(
"[![CRAN downloads](http://cranlogs.r-pkg.org/badges/grand-total/%s)](https://cran.r-project.org/package=%1$s)",
name
),
sprintf(
"[![status](https://tinyverse.netlify.com/badge/%s)](https://CRAN.R-project.org/package=%1$s)",
name
)
), stringsAsFactors = FALSE))

test <- with(pkgs, !on_cran & is.na(on_bioc))
dat$Description[!pkgs$on_cran] <- pkgs$description[!pkgs$on_cran]

for (pkg in pkgs$name[which(pkgs$on_bioc)]) {
dat[which(pkgs$name == pkg), "Description"] <-
paste0(pkgs$description[pkgs$name == pkg],
sprintf("[![](https://img.shields.io/badge/Bioconductor%%20version-1.0.0-green.svg)](https://www.bioconductor.org/packages/%s)", pkg),
badger::badge_bioc_download(pkg, "total", "blue", "total"))
}

```

```{r citations, include=FALSE}
regex <- "([0-9,]+)[\\s\\n]+results?[\\s\\n]+\\([\\s\\n]*[0-9]+" #[\\s\\n]+[(][0-9]*[.]?[0-9]+\\s+secs?
dat$Citations <- ""
tot_citations <- 0L
for (i in seq_len(nrow(pkgs))) {

# If no URL, then continue
if (nchar(pkgs$google_scholar[i]) == 0) {
next
}

# Otherwise, take a look at the cictations
address <- pkgs$google_scholar[i]

page <- tryCatch(readLines(address, warn = FALSE), error = function(e) e)

if (inherits(page, "error"))
next

# Removing blocks of bold, italic, etc
page <- gsub("\\<[[:alnum:]_/-]+\\>", "",page, perl = TRUE)

citations <- which(grepl(regex, page, perl = TRUE))
if (!length(citations))
next

citations <- stringr::str_extract(page[citations], "[0-9,]+(?=[\\s\\n]+results?)")
citations <- as.integer(gsub("[,.]", "", citations, perl = TRUE))
tot_citations <- tot_citations + citations
dat$Citations[i] <- sprintf("[%i](%s)", as.integer(citations), address)

}

if (tot_citations == 0L)
stop("There can't be 0 citations! Make sure things are running as expected!")
```

As of `r Sys.Date()`, the packages listed here have been cited **`r tot_citations`** times
(source: Google Scholar).

```{r printing, echo = FALSE}
knitr::kable(dat, row.names = FALSE)
```

To update this list, modify the file [packages.csv](packages.csv). The
`README.md` file is updated automatically using GitHub Actions, so there's no
need to "manually" recompile the README file after updating the list.

# Coding Standards

1. [Coding Standards](wiki#coding-standards)
2. [Software Thinking](wiki/coding-standards.md#software-thinking)
3. [Development Workflow](wiki/coding-standards.md#development-workflow)
4. [Misc](wiki/coding-standards.md#misc)

We do have some direct guidelines developed as issue templates [here](templates).

# Bioghost Server

1. [Introduction](wiki/Bioghost-server.md#introduction)
2. [Setup](wiki/Bioghost-server.md#setup)
3. [Cheat Sheet](wiki/Bioghost-server.md#cheat-sheet)

# HPC in R

* [Parallel computing in R](wiki/HPC-in-R.md#parallel-computing-in-r)
* [parallel](wiki/HPC-in-R.md#parallel)
* [iterators+foreach](wiki/HPC-in-R.md#foreach)
* [RcppArmadillo + OpenMP](wiki/HPC-in-R.md#rcpparmadillo-and-openmp)

# Happy Scientist Seminars

The Happy Scientist Seminars are educational seminars sponsored by Cores C and D of IMAGE, the Biostats Program Project award. This series, the "Happy Scientist" seminar series, is aimed at providing educational material for members of Biostats, both students and faculty, about a variety of tools and methods that might prove useful to them. If you have any suggestions for subjects that you would like to learn about in future, please send email to Paul Marjoram at ([email protected]). Our agenda will be driven by your specific interests as far as is possible.

List of past seminars with material can be found [here](/happy_scientist/).