This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assembly_summary_refseq <- readr::read_delim("https://ftp.ncbi.nih.gov/genomes/ASSEMBLY_REPORTS/assembly_summary_refseq.txt", quote='', skip = 2, delim = "\t", col_names = c("assembly_accession", "bioproject", "biosample", "wgs_master", "refseq_category", "taxid", "species_taxid", "organism_name", "infraspecific_name", "isolate", "version_status", "assembly_level", "release_type", "genome_rep", "seq_rel_date", "asm_name", "submitter", "gbrs_paired_asm", "paired_asm_comp", "ftp_path", "excluded_from_refseq", "relation_to_type_material")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
execution_trace <- '/home/chase/Documents/pipeline_info/execution_trace_2021-08-14_09-52-45.txt' | |
execution_trace <- read.delim(execution_trace, sep = "\t") | |
process_names <- sapply(strsplit(execution_trace$name, " "), function(x) x[[1]]) | |
split_names <- strsplit(process_names, ":") | |
max_len <- max(lengths(split_names)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(data.table) | |
library(ggplot2) | |
library(gganimate) | |
population <- fread("/Users/chase/Downloads/csvData.csv") # https://worldpopulationreview.com/states | |
population <- population[, c("State", "Pop")] | |
colnames(population) <- c("state", "population") | |
covid <- "https://raw.githubusercontent.com/nytimes/covid-19-data/master/rolling-averages/us-states.csv" | |
covid <- fread(covid) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parse_domtblout_file <- function(dom){ | |
dom = readLines(dom) | |
dom <- dom[!grepl("^#", dom)] | |
dom <- lapply(strsplit(dom, "[ ]{1,}"), | |
function(x){ | |
parsed <- c(x[1:22], paste0(x[23:length(x)], collapse = " ")) | |
as.data.frame(t(parsed)) | |
}) | |
dom <- do.call(rbind, dom) | |
colnames(dom) <- c("target_name", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Main] | |
seed=632741178 | |
phase=0 | |
max_processors=24 | |
dataset_id=RL | |
output_directory=out | |
temp_directory=/tmp | |
gsa=True | |
pooled_gsa=True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(data.table) | |
library(ggplot2) | |
library(lubridate) | |
df <- fread("Shootings.csv") | |
df$hour = lubridate::hour(lubridate::mdy_hms(df$Date)) | |
new_df <- df[, list(arrest = sum(Arrest), no_arrest = sum(!Arrest), total_reports = length(Arrest)), Year] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code is very loosely based on https://www.r-bloggers.com/r-cade-games-simulating-the-legendary-game-of-pong/ | |
library(shiny) | |
library(ggvis) | |
library(dplyr) | |
# Playing field boundary lines | |
boundaries <- tibble(x = c(0, 50, 50, 0), y = c(0, 0, 50, 50)) | |
paddleHeight <- tibble(x = c(0, 0), y = c(10, 20)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Display code language in Rmarkdown" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(eval = TRUE, include = TRUE, python.reticulate=FALSE) | |
``` | |
```{r results="asis", echo=FALSE} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in *.pdf; do | |
inkscape --export-background-opacity=0 --export-dpi=300 --export-type=png $i | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Emacs, make this -*- mode: sh; -*- | |
FROM r-base:latest | |
LABEL org.label-schema.license="GPL-2.0" \ | |
org.label-schema.vcs-url="https://github.com/rocker-org/rocker" \ | |
maintainer="Dirk Eddelbuettel <[email protected]>" | |
RUN apt-get update \ | |
&& apt-get install -y --no-install-recommends \ |