Skip to content

Instantly share code, notes, and snippets.

View kozo2's full-sized avatar

Kozo Nishida kozo2

View GitHub Profile
[ {
"format_version" : "1.0",
"generated_by" : "cytoscape-3.7.1",
"target_cytoscapejs_version" : "~2.1",
"title" : "KEGG style",
"style" : [ {
"selector" : "node",
"css" : {
"font-family" : "Dialog.plain",
"font-weight" : "normal",
package:
name: ecell
version: "4.1.4"
build:
number: 0
skip: True # [win32]
skip: True # [win64 and py<35]
skip: True # [osx and py34]
skip: True # [py26]
skip: True # [py33]
@kozo2
kozo2 / README.md
Created July 11, 2019 06:32
ecell4 temp

Simple examples

Here are two extremely simple examples, See http://ecell4.readthedocs.org for more details on running E-Cell4.

Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ecell4.core import *
@kozo2
kozo2 / conda-build-issue.md
Created July 9, 2019 11:29
requirements:run: did not install "gsl" Conda package on OSX Python 3.6
kgml = requests.get('http://rest.kegg.jp/get/mmu04150/kgml').content
soup = BeautifulSoup(kgml, "xml")
entries = soup.find_all('entry')
len(entries)
d = {}
elements = {}
nodes = []
edges = []

AsciiDoc Article Title

Table of Contents

Content entered directly below the header but before the first section heading is called the preamble.

First level heading

@kozo2
kozo2 / app.R
Last active June 5, 2019 21:11
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(clusterProfiler)
library(DT)
library(tibble)
pathway <- character(0)
cids <- list()
for(i in 1:length(mset_SMPDB_format_KEGG)) {
row = mset_SMPDB_format_KEGG[[i]]
pathway <- c(pathway, row[[2]])
from __future__ import absolute_import
import pandas as pd
from pandas.api.types import is_numeric_dtype
import numpy as np
import plotly.graph_objs as go
KEGG_PATHWAY_ID = "rn01100"
# IPI data from ftp://ftp.ebi.ac.uk/pub/databases/IPI/last_release/current/ipi.genes.MOUSE.xrefs.gz
library(tidyverse)
ipi_genes_MOUSE <- read.delim("ipi.genes.MOUSE.xrefs", "\t", escape_double = FALSE, col_names = FALSE, trim_ws = TRUE, skip = 1)
ipi2ncbigene <- ipi_genes_MOUSE %>% select(9,10) %>%
separate(X9, into=c("NCBI_GENEID", "GENE_NAME")) %>%
separate_rows(X10) %>%
filter(X10 != "") %>%
drop_na(NCBI_GENEID) %>%
distinct()