This file contains 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(stringr) | |
read.pc2.gmt <- function(file, organism=9606, datasource='kegg', idtype='hgnc symbol') { | |
# utility function to read and parse GMT file | |
# provided by Pathway Commons into R | |
# i.e. https://www.pathwaycommons.org/archives/PC2/v12/PathwayCommons12.All.hgnc.gmt.gz | |
gmt <- list() | |
con <- file(file, open='r') | |
for (line in readLines(con)) { | |
line_parts <- unlist(strsplit(line, '\t')) | |
desc_keys <- c('name', 'datasource', 'organism', 'idtype') |
This file contains 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
import os | |
import networkx as nx | |
WORKDIR = '' | |
IREFINDEX_FILE = os.path.join(WORKDIR, '9606.mitab.01-22-2018.txt') | |
def parse_irefindex_alias(alias): | |
splits = alias.split('|') |
This file contains 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
name: a^nb^2nc^3n | |
source code: | | |
input: 'aabbbbcccccc' | |
blank: '_' | |
start state: start | |
table: | |
start: | |
a: {write: x, R: q1} | |
y: {R: start} | |
z: {R: start} |
This file contains 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
# Multiple plot function | |
# | |
# ggplot objects can be passed in ..., or to plotlist (as a list of ggplot objects) | |
# - cols: Number of columns in layout | |
# - layout: A matrix specifying the layout. If present, 'cols' is ignored. | |
# | |
# If the layout is something like matrix(c(1,2,3,3), nrow=2, byrow=TRUE), | |
# then plot 1 will go in the upper left, 2 will go in the upper right, and | |
# 3 will go all the way across the bottom. | |
# |
This file contains 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
'use strict'; | |
(function(exports) { | |
var rank = { | |
/* | |
* Standart ranking | |
* | |
* The MIT License, Copyright (c) 2014 Ben Magyar | |
*/ |