Skip to content

Instantly share code, notes, and snippets.

View jasdumas's full-sized avatar

Jasmine Daly jasdumas

View GitHub Profile
@jasdumas
jasdumas / app.R
Created April 5, 2018 20:18
A better way to include logos in the comments # (also inspired from here: https://stackoverflow.com/a/21997097/4143444)
library(shiny)
library(ttbbeer)
data("beermaterials")
library(tidyverse)
library(ggridges)
library(shinythemes)
library(wesanderson)
library(shinyLP)
library(scales)
@jasdumas
jasdumas / install_gganimate.md
Last active August 11, 2017 20:11
Getting gganimate to work on Mac
  1. visit for intructions for other OS: https://www.imagemagick.org/script/download.php
  2. download: ImageMagick-x86_64-apple-darwin16.4.0.tar.gz from download button
  3. create (or choose) a directory to install the package into and change to that directory:

cd Desktop/R-directory

mkdir ImageMagick

cd ImageMagick/

@jasdumas
jasdumas / DIY Data Science.md
Last active April 12, 2018 03:09
Supplementing the remainder of my Master's coursework with self-learning, moocs, reading books, and projects
We can't make this file beautiful and searchable because it's too large.
"y","x.CAR_TYPE_2","x.CAR_TYPE_3","x.CAR_TYPE_4","x.CAR_TYPE_5","x.CAR_TYPE_6","x.JOBCLASS_3","x.JOBCLASS_4","x.JOBCLASS_5","x.JOBCLASS_6","x.JOBCLASS_7","x.JOBCLASS_8","x.JOBCLASS_9","x.MAX_EDUC_2","x.MAX_EDUC_3","x.MAX_EDUC_4","x.MAX_EDUC_5","x.KIDSDRIV","x.KIDSDRIV2","x.KIDSDRIV3","x.TRAVTIME","x.TRAVTIME2","x.TRAVTIME3","x.BLUEBOOK","x.BLUEBOOK2","x.BLUEBOOK3","x.NPOLICY","x.NPOLICY2","x.NPOLICY3","x.MVR_PTS","x.MVR_PTS2","x.MVR_PTS3","x.AGE","x.AGE2","x.AGE3","x.HOMEKIDS","x.HOMEKIDS2","x.HOMEKIDS3","x.YOJ","x.YOJ2","x.YOJ3","x.INCOME","x.INCOME2","x.INCOME3","x.HOME_VAL","x.HOME_VAL2","x.HOME_VAL3","x.SAMEHOME","x.SAMEHOME2","x.SAMEHOME3","x.CAR_USE","x.RED_CAR","x.REVOLKED","x.GENDER","x.MARRIED","x.PARENT1","x.AREA"
title layout
Notes on xgboost: Extreme Gradient Boosting Machine
default

Background

  • Computation in C++
  • tree-based models
  • easy to use, install, R/python interface
  • Automatic parallel computation on a single Machine

Directions to install feather on a Windows 7 (64 bit) machine

  1. upgrade to 3.3.0 R: as directed from the original announcement post "Feather uses C++11, so if you’re on windows, you’ll need the new gcc 4.93 toolchain. (All going well this will be included in R 3.3.0, which is scheduled for release on April 14. We’ll aim for a CRAN release soon after that)."

  2. install.packages("feather"); library(feather)

  3. write_feather(df, path) in R:
    this took less than 2 minutes to write a ~0.5 Gb file, where as readr::write_csv was stopped yesterday after writing 0.1 Gb in 2 hours (I had to go home)

  4. pip install feather-format in windows command line (cmd)

title subtitle layout
Notes from Statistical Learning Course
via Stanford University Online
default

Course Link

shinyGEO testing before submitting to Bioinformatics again

  1. GSE83517: Gene Expression data from LPS (2 hour) - treated PPP2CA alpha conditional knockout Bone Marrow Derived Macrophages (PP2ACαfl/fl;lyM-Cre, cre-loxp mediated exon1 deletion in myeloid cells)

  2. result: DE plot and data export was working well. Since the dataset has no survial columns the 'Generate KM plot' button can still be pressed and the plot area shows the message "Generating KM curves, please wait..." - should that button be disabled if there a literaly no time/outcome values to choose from? the auto column detection correclty informed the user of not finding any appropriate column.

  3. GSE73142:Blood, adipose and muscle samples taken from monozygotic twin pairs with age range 32-37

  4. result: same concern as above.

  5. GSE83744: Hig

@jasdumas
jasdumas / useR2016 shinyGEO poster feedback.md
Last active June 28, 2016 23:07
useR! 2016 Conference, poster session 1 feedback - June 28 2016

useR2016 Conference shinyGEO poster feedback and questions

  1. Graphics quality (DPI, submission criteria)
  2. Colors for graphics (colorblind scale, options for removing the original ggplot2 theme, etc, RColorBrewer package
  3. Save graphics within the app
  4. Upload FASTA data
  5. Interactive graphics - something similar to plotly
  6. Statistical test used for differential expression analysis (t-test showing somewhere on the app that is what is used)
  7. Dataset type availability (more than cancer sets)
  8. Hosting on CRAN or Bioconductor - is there a common consensus about if shiny apps are considered packages?
@jasdumas
jasdumas / example-mod-wsgi.py
Created June 16, 2016 18:24 — forked from tahajahangir/example-mod-wsgi.py
Python (2&3 compatible) Equivalent to phpinfo()
def application(environ, start_response):
from pyinfo import pyinfo
output = pyinfo()
# or pyinfo([('custom key', 'custom value'), ...])
start_response('200 OK', [('Content-type', 'text/html')])
return [output]