Skip to content

Instantly share code, notes, and snippets.

View kozo2's full-sized avatar

Kozo Nishida kozo2

View GitHub Profile
import dash
import dash_core_components as dcc
import dash_html_components as html
import dash_bio
import pandas as pd
import kegg2cyjs
import plotly.graph_objs as go
# df = pd.read_csv("./ecoliLeucineRMA.csv")
import pandas as pd
df = pd.read_csv("./eLeuRMA.txt", sep='\t')
gene_df = df[df['Unnamed: 0'].str.contains(pat='b[0-9]{4}')]
foo = gene_df['Unnamed: 0'].str.extract(r'(b[0-9]{4})')
foo = foo[0].str.replace("b", "eco:b")
gene_df.update(foo.rename('Unnamed: 0'))
gene_df.columns = gene_df.columns.str.replace("/home/laurent/Affymetrix_data/ecoli_sample//", "")
gene_df.columns = gene_df.columns.str.replace("Unnamed: 0", "keggids")
gene_df.to_csv('ecoliLeucineRMA.csv', index=False)
library(ecoliLeucine)
data("ecoliLeucine")
library(affy)
eset <- rma(ecoliLeucine)
write.exprs(eset, "eLeuRMA.txt")
[ {
"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)