-
Notifications
You must be signed in to change notification settings - Fork 7
/
README.Rmd
150 lines (113 loc) · 4.98 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
---
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/).