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 / dplyr_tutorial.Rmd
Created Apr 28, 2015
hands on with dplyr
View dplyr_tutorial.Rmd
title: "Hands-on with dplyr"
author: "Dmitry Grapov"
keep_md: yes
## Introduction
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 / 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 / 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 / Data Summaries and Tests
Created Nov 12, 2013
Example of data summary tools.
View Data Summaries and Tests
#demonstration of data summary tools
#enable necessary functions
#get demo data
url<-getURL("",ssl.verifypeer = FALSE)<-read.csv(textConnection(url))
#Prepare to generate data summaries and conduct statitcal tests
dgrapov / server.R
Last active Dec 20, 2015
compare skewed to normal distrubution
View server.R
mydat <- reactive(function() {
scale(rsnorm(input$obs, location = input$mean, scale =input$variance,
shape = input$skew),center=TRUE,scale=TRUE)
ndat <- reactive(function() {
scale(rnorm(input$obs, mean = input$mean, sd =input$variance),center=TRUE, scale=TRUE)
View server.R
# Script to demonstrate distributions
View server.r
shinyServer(function(input, output, session) {
inputTextarea <- function(inputId, value="", nrows, ncols) {
singleton(tags$head(tags$script(src = "textarea.js"))),
tags$textarea(id = inputId,
class = "inputtextarea",
rows = nrows,
cols = ncols,
dgrapov / query PubMed
Last active Dec 19, 2015
Check for key word in PubMed article titles
View query PubMed
#Check pubmed article titles for a given year for a keyword (using partial matching).
#get PubMed Ids for all journals for a given year
getPubMedIds<-function(year=2013, max=100){
#max = maximum results to return
View global.R
#check for and/or install dependencies
for(i in 1:length(need)){
if(require(need[i], character.only = TRUE)==FALSE){ install.packages(need[i]);library(need[i], character.only = TRUE)} else { library(need[i],character.only = TRUE)}
need<-c('Rcpp', 'rJava',
'Matrix', 'cluster', 'foreign', 'lattice', 'mgcv', 'survival')
for(i in 1:length(need)){
You can’t perform that action at this time.