Skip to content

Instantly share code, notes, and snippets.

Dmitry Grapov dgrapov

Block or report user

Report or block dgrapov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dgrapov / correlation edge list
Last active Aug 29, 2015
Making edge lists for correlation networks
View correlation edge list
# demonstration of making edge lists for
# correlation network analysis
# by Dmitry Grapov
# 031814
# load devium library for all functions
source("") # sources function to download github repo (
dgrapov / mapping test set
Created Apr 14, 2014
Test data set for ID translation
View mapping test set
Name KEGG id
Carnitine C00318
catechin C06562
threonine C00188
threonic acid C01620
phenylethylamine C05332
phenylalanine C00079
N-acetyl-L-ornithine C00437
mannitol C00392
glutathione C00051
dgrapov / oxylipins edge list
Last active Aug 29, 2015
edge list for making oxylipin networks (partial)
View oxylipins edge list
sourceName sourceKEGG sourceCID targetName targetKEGG targetCID indirect
arachidonic_acid C00219 444899 TXB2 C05963 5283137 y
arachidonic_acid C00219 444899 PGE2 C00584 5280360 y
arachidonic_acid C00219 444899 LTB4 C02165 5280492 y
linoleic_acid C01595 5280450 9,10,13-TriHOME C14835 5282965 y
linoleic_acid C01595 5280450 9,12,13-TriHOME C14833 9858729 y
linoleic_acid C01595 5280450 EKODE 5283007 y
arachidonic_acid C00219 444899 11(12)-EpETrE 53480479 n
arachidonic_acid C00219 444899 11-HETE C14780 5283168 n
arachidonic_acid C00219 444899 12-HETE C14777 5283155 n
dgrapov / app
Last active Aug 29, 2015
ggvis linked brushing bug
View app
ui =bootstrapPage(
actionButton("randomize", "Randomize"),
dgrapov / RECA_test.R
Created Aug 21, 2015
Testing RECA: Relevant Component Analysis for Supervised Distance Metric Learning
View RECA_test.R
#R code, testing RECA with the iris data
#test data
#similar groups (species) in each chunk (n=3)
dgrapov / example.R
Last active Sep 21, 2015
Convert adjacency (or other) matrix to edge list
View example.R
#create edge list from matrix
# if symmetric duplicates are removed
id< # used to allow missing
if(symmetric){mat[lower.tri(mat)]<-"na"} # use to allow missing values
View test.r
test<-function(){print("hello world!")}
View plotting power calculations
#purpose: model the relationship between effects size, sample size and power
# holding the significance level constant (p = 0.05) for three of the most common statistical tests:
# 1) t-Test (two-sample)
# then visualize the results for medium small, medium and large effect sizes (0.2,0.5,0.8 ;
#Need pwr package
# t-TEST
View load devium.r
#load devium (or any other package) from github repo
source.git.hub<-function(url = "")
if(require(RCurl)==FALSE){install.packages("RCurl");library(RCurl)} else { library(RCurl)}
#get the names of all scripts to source
scripts<-gsub("/blob","",gsub('\" ',"",tmp2[grep("dgrapov/devium/blob/master/R/",tmp2)])) # fix formatting
dgrapov / CID_KEGG pairs
Last active Dec 13, 2015
CID_KEGG pairs
View CID_KEGG pairs
689043 C01197
6443013 C14762
6443013 C14762
6446027 C14765
6446027 C14765
11954058 C14813
6439873 C16326
6439873 C16326
1004 C00009
1023 C00013
You can’t perform that action at this time.