Drkcore

18 03 2010 chemoinformatics Python Tweet

CouchDBにsdfを突っ込む

ほとんど化合物情報をTokyo Cabinetで管理してみると同じノリで出し入れできそう。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#!/usr/bin/env python
# -*- encoding:utf-8 -*-

import pybel
import couchdb

sdffile = "pc_sample.sdf"
couch = couchdb.Server()
db = couch.create('pubchem')

mols = pybel.readfile("mol",sdffile)

for mol in mols:
    title = mol.OBMol.GetTitle()
    molstring = mol.write("mol")
    db[title] = {"mol":molstring}

化合物情報みたいな、RDBで管理しやすいようなデータよりは、in vivoの薬理試験とか動態試験みたいな、プロトコル間で比較があまりなくて、かつ所見とかの文章データが重要なもののほうが向いているのかもしれんなぁと思った。PKデータなんてIDで探して、時点と個体のデータがJSONで引っ張ってこれるようにしとけばナイスすぎる!

javascriptからRの関数呼べんかな?そうすればJSONでデータ受け取ってPKfitとか使えんのにな。それかbrewとか

書籍もいくつか出てるけど、日本語ないなぁ。そのうち出るんかな?

ProductName CouchDB: The Definitive Guide
J. Chris Anderson
Oreilly & Associates Inc / 3390円 ( 2010-01-15 )


ProductName Beginning CouchDB
Joe Lennon
Apress / 3783円 ( 2009-12-30 )


ProductName Couchdb in Action
Christopher Chandler
Manning Pubns Co / 4180円 ( 2010-12-28 )


  • CouchDB: The Definitive Guide
  • CouchDB: the Definitive Guide 日本語訳

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021