Skip to content

Instantly share code, notes, and snippets.

View seandavi's full-sized avatar

Sean Davis seandavi

View GitHub Profile
### Keybase proof
I hereby claim:
* I am seandavi on github.
* I am seandavi (https://keybase.io/seandavi) on keybase.
* I have a public key ASAQ8VtxEXZOXbXUmfgPSsE2L-mF4g5oHcMRkosW0EszDgo
To claim this, I am signing this object:
@seandavi
seandavi / README.ipynb
Last active September 21, 2020 13:34
sars2pack jupyter notebook for Cornell comp bio talk
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@seandavi
seandavi / nextflow_trace_columns.tsv
Created July 8, 2020 11:51
nextflow_trace_columns.txt
Name Description
task_id Task ID.
hash Task hash code.
native_id Task ID given by the underlying execution system e.g. POSIX process PID when executed locally, job ID when executed by a grid engine, etc.
process Nextflow process name.
tag User provided identifier associated this task.
name Task name.
status Task status.
exit POSIX process exit status.
module Environment module used to run the task.
@seandavi
seandavi / covid_cases_by_largest_country.R
Created June 25, 2020 15:50
Countries vying for largest share of new COVID-19 cases
library(sars2pack)
library(dplyr)
library(zoo)
library(cowplot)
library(ggplot2)
y = ecdc_data() %>% dplyr::group_by(iso3c) %>%
add_incidence_column(count_column = 'confirmed') %>%
align_to_baseline(confirmed>50,group_vars = 'iso3c') %>%
dplyr::arrange(date) %>%
browseURL('https://seandavi.github.io/ITR/r_intro_mechanics.html')
1 + 1
x = 10
x
y = 20
y
y + x
browseURL('https://seandavi.github.io/ITR/vectors.html')
# vectors
@seandavi
seandavi / README.md
Last active June 12, 2020 15:21
Example of using R to build a working web API

Example R API

To use, clone this repository and then run:

Rscript api.R

Test using the following URLs:

@seandavi
seandavi / README.md
Last active July 8, 2020 14:31
Run a Bioconductor Workshop docker image on Google Cloud Platform

Run a Bioconductor Workshop on a Google Cloud Instance

To run one of the workshops for Bioc2020, follow these steps after determining which workshop you'd like to run and finding the docker image name. Substitute the docker image name below for tidytranscriptomics if desired.

Prereqs

  • A google cloud platform account (which you can create with $300 free credit if you don't have one)
  • Installed google cloud sdk (the gcloud command)
@seandavi
seandavi / index.Rmd
Created June 4, 2020 13:42
Bioconductor big data notes
---
title: "Big Data Approaches"
subtitle: "Where to go with Bioconductor"
event: "Bioconductor Technical Advisory Board Meeting"
#author: Sean Davis
date: "`r Sys.Date()`"
output:
BiocStyle::html_document
---
library(tibble)
library(jsonlite)
library(curl)
as_tibble(jsonlite::fromJSON(curl('https://api.omicidx.cancerdatasci.org/sra/studies/ERP009142/runs?size=500'))$hits)
@seandavi
seandavi / kubernetes_job_example.py
Created March 4, 2020 01:37
example of kubernetes batch job with env variables and secrets
"""
Creates, updates, and deletes a job object.
"""
from os import path
import os
import yaml
import uuid