Skip to content

Instantly share code, notes, and snippets.

View kozo2's full-sized avatar

Kozo Nishida kozo2

View GitHub Profile
@kozo2
kozo2 / propertyPathExam
Last active August 29, 2015 14:10
property path example
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 sbmlrdf: <http://identifiers.org/biomodels.vocabulary#>
@kozo2
kozo2 / ecocyc
Created December 8, 2014 07:32
ecocyc biopax bug
> biopax = readBiopax("biopax-level3.owl")
Found a BioPAX level 3 OWL. Parsing...
[Info Verbose] Parsing Biopax-Model as a data.table...
[Info Verbose] Estimating up to 439065 entries. This will roughly need 97 MB of RAM.
[Info Verbose] Where I came from this would've taken at least 1317 seconds!
[Info Verbose] Internal Rowcount: 8192 Instance: UnificationXref144348
[Info Verbose] Internal Rowcount: 16384 Instance: UnificationXref133936
[Info Verbose] Internal Rowcount: 24576 Instance: UnificationXref123794
[Info Verbose] Internal Rowcount: 32768 Instance: UnificationXref114026
@kozo2
kozo2 / gist:af66cd9ddbc002cb9e13
Created December 9, 2014 17:09
diffcorr error
==> R CMD check DiffCorr_0.2.tar.gz
* using log directory ‘/home/kozo2/Documents/DiffCorr.Rcheck’
* using R version 3.1.2 (2014-10-31)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file ‘DiffCorr/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘DiffCorr’ version ‘0.2’
* checking package namespace information ... OK
@kozo2
kozo2 / diffcorr-check
Created December 10, 2014 12:20
DiffCorr warnings
==> R CMD build DiffCorr
* checking for file ‘DiffCorr/DESCRIPTION’ ... OK
* preparing ‘DiffCorr’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building ‘DiffCorr_0.2.tar.gz’
==> R CMD check DiffCorr_0.2.tar.gz
import libsbml
document = libsbml.readSBML('BMID000000140222.xml')
model = document.getModel()
@kozo2
kozo2 / getAllKEGGcompound.rst
Created December 17, 2014 09:50
KEGG compound downloader
import requests
compounds = requests.get('http://rest.kegg.jp/list/compound')
for line in compounds.content.split('\n'):
@kozo2
kozo2 / cyjs
Last active July 16, 2023 07:55
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Animated BFS</title>
<script src="require.js"></script>
<script src="jquery-2.1.3.min.js"></script>
<style type="text/css">
body {
font: 14px helvetica neue, helvetica, arial, sans-serif;
@kozo2
kozo2 / init.el
Last active March 11, 2019 17:28
init.el
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl "http" "https")))
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/")))))
@kozo2
kozo2 / spatiocyte4win.md
Last active August 29, 2015 14:18
Spatiocyte quick start for Windows

Installation

  1. Download the latest release of the Docker for Windows Installer
  2. Download the latest release of the UltraVNC
  3. Run the Boot2Docker Start shell script from your Desktop or Program Files > Boot2Docker for Windows.
  4. Run following command
docker run -p 5901:5901 -it ecell/spatiocyte:latest /bin/bash
  1. Now you are in Docker container, then run follwing command
@kozo2
kozo2 / spfw.R
Last active August 29, 2015 14:18 — forked from kohske/spfw.R
library(gtable)
d=data.frame(g=c(1,1,1,2,2,3),x=c(1,2,3,1,2,3),y=1:6);
p = ggplot(d,aes(x,y))+geom_bar(stat="identity")+facet_wrap(~g)
gt= ggplot_gtable(ggplot_build(g))
graphics.off()
for (p in c(4, 7, 10)) {
pdf(paste0("plot-", p, ".pdf"))
grid.draw(gt[,c(1:3, p, 12)])