Skip to content

Instantly share code, notes, and snippets.

View kozo2's full-sized avatar

Kozo Nishida kozo2

View GitHub Profile
from py2cytoscape import cytoscapejs
import pandas as pd

cytoscapejs.render(pd.read_json("https://github.com/idekerlab/py2cytoscape/raw/develop/examples/initialisation.json"))
@kozo2
kozo2 / file0.txt
Created May 2, 2016 09:36
Ubuntu14.04 + InfiniBand で MPI を動かす ref: http://qiita.com/kozo2/items/4ccf4073d21bdc4db654
apt install opensm libmlx4-1 openmpi-bin libopenmpi-dev
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kozo2
kozo2 / sge-notes.md
Last active May 25, 2016 03:48
A note for Ubuntu + Sun Grid Engine

install

master server

apt install gridengine-master

exec server

apt install gridengine-exec
@kozo2
kozo2 / simple-uniprot.R
Last active June 12, 2016 13:46
biohack16
library(SPARQL) # SPARQL querying package
endpoint <- "http://sparql.uniprot.org/"
# create query statement
query <-
"
PREFIX up:<http://purl.uniprot.org/core/>
SELECT ?taxon
library(SPARQL) # SPARQL querying package
endpoint <- "http://www.ebi.ac.uk/rdf/services/biomodels/sparql"
query <-
"
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
@kozo2
kozo2 / uniprot-sparql.py
Last active June 13, 2016 12:45
biohack16
from SPARQLWrapper import SPARQLWrapper, JSON
#sparql = SPARQLWrapper("http://sparql.uniprot.org/")
sparql = SPARQLWrapper("http://sparql.uniprot.org/sparql/")
sparql.setQuery("""
PREFIX up:<http://purl.uniprot.org/core/>
SELECT ?taxon
FROM <http://sparql.uniprot.org/taxonomy/>
WHERE
{
@kozo2
kozo2 / reaction-attribute.ql
Last active June 14, 2016 17:11
bh16 sparqls
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX biopax3: <http://www.biopax.org/release/biopax-level3.owl#>
# Below is your R command history :
InitDataObjects("conc", "msetora", FALSE)
Setup.MapData(tmp.vec);
CrossReferencing("hmdb");
SetMetabolomeFilter(F);
SetCurrentMsetLib("pathway", 0, F);
CalculateHyperScore()
SaveTransformedData()
@kozo2
kozo2 / metaboanalyst.md
Last active August 26, 2016 16:57
MetaboAnalyst

variables

  • qvec = queryのcompoundのvector
  • lib.type = metabolite set の定義, pathwayなど

procedure

  • queryからcrossref tableの作成
  • filterをかけるかどうか == reference metabolome の変更をするかどうか?

data

  • resources/libs/msets に彼らのmset