Skip to content

Instantly share code, notes, and snippets.

View rmflight's full-sized avatar

Robert M Flight rmflight

View GitHub Profile
@rmflight
rmflight / updateandprint.Rmd
Created October 19, 2012 17:36
storing data with side effect of printing
```{r defineFunct}
insertStoreText <- function(inObj, inText){
cat(inText)
inObj <- c(inObj, inText)
return(inObj)
}
inObj <- character(0)
```
@rmflight
rmflight / test.rhtml
Created December 20, 2012 21:12
simple rhtml with code
<!DOCTYPE html>
<html>
<head>
<!--begin.rcode setTitle, echo=F
title <- "test me"
end.rcode-->
<title>
<!--begin.rcode genTitle, results='asis', echo=F
cat(title)
end.rcode-->
this is some test stuff
@rmflight
rmflight / file1.txt
Created June 9, 2013 00:54
still a test gist
This is a test file that I'm working
with to see if I can modify it
after getting a personal OAuth token
todays date is:Fri Jun 14 2013 14:59:30 GMT-0400 (Eastern Daylight Time)count: 1; date: Fri Jun 14 2013 20:42:59 GMT-0400 (Eastern Daylight Time)
Sat Jun 15 2013 17:02:50 GMT-0400 (Eastern Daylight Time)
Sat Jun 15 2013 17:02:51 GMT-0400 (Eastern Daylight Time)
Sat Jun 15 2013 17:06:30 GMT-0400 (Eastern Daylight Time)
Mon Jun 17 2013 21:40:18 GMT-0400 (Eastern Daylight Time)
Mon Jun 17 2013 21:40:52 GMT-0400 (Eastern Daylight Time)
Fri Oct 04 2013 08:33:59 GMT-0400 (EDT)

Notes:

  • I've tried to break up in to separate pieces, but it's not always possible: e.g. knowledge of data structures and subsetting are tidy intertwined.

  • Level of Bloom's taxonomy listed in square brackets, e.g. http://bit.ly/15gqPEx. Few categories currently assess components higher in the taxonomy.

Programming R curriculum

Data structures

@rmflight
rmflight / journalList.md
Last active December 24, 2015 16:08
holding some urls for myself

Ensemble Inference and Inferability of Gene Regulatory Networks|http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0103812 Genomic responses in mouse models greatly mimic human inflammatory diseases|http://www.pnas.org/content/early/2014/07/31/1401965111.full.pdf IVT-seq reveals extreme bias in RNA sequencing|http://genomebiology.com/2014/15/6/R86 DiffSplice: the genome-wide detection of differential splicing events with RNA-seq|http://nar.oxfordjournals.org/content/41/2/e39.full FDM: a graph-based statistical method to detect differential transcription using RNA-seq data|http://bioinformatics.oxfordjournals.org/content/27/19/2633.full MapSplice: Accurate mapping of RNA-seq reads for splice junction discovery|http://nar.oxfordjournals.org/content/38/18/e178.full A probabilistic framework for aligning paired-end RNA-seq data|http://bioinformatics.oxfordjournals.org/content/26/16/1950.full

@rmflight
rmflight / testTextOut.Rmd
Last active December 28, 2015 05:49
testing knitr formatting for text output
```{r t1}
crud <- "alksdjflkajsdflkajsdf"
```
Here is some text for context
```{r t2, echo=FALSE, results='asis'}
cat(paste("```",crud,"```", sep="\n"))
```
@rmflight
rmflight / go2list.R
Last active December 31, 2015 18:22
temporary workaround for getting categoryCompare go2list associations
# assumes that a ccCompareResult object has been generated from a ccEnrichResult, eg ccResults from the vignette
# note that the $BP is to access a single ccCompareResult from a collection, these are generally BP, MF, CC, KEGG, etc
library(graph)
tmpGraph <- mainGraph(ccResults$BP)
tmpData <- nodeData(tmpGraph, , "listMembership")
go2list <- data.frame(goid = names(tmpData), listMembership = unlist(tmpData), stringsAsFactors=FALSE)
@rmflight
rmflight / post-commit
Last active March 29, 2024 19:43
useful commit hooks for R package dev
#!/path/2/Rscript
# License: CC0 (just be nice and point others to where you got this)
# Author: Robert M Flight <[email protected]>, github.com/rmflight
#
# This is a post-commit hook that after a successful commit subsequently increments the package version in DESCRIPTION
# and commits that. Analogous to the pre-commit at https://gist.github.com/rmflight/8863882, but useful if you only have
# good reasons for not doing it on the pre-commit.
#
# To install it, simply copy this into the ".git/hooks/post-commit" file of your git repo, change /path/2/Rscript, and make