여러개의 PDB 파일을 한꺼번에 렌더링하기 : PyMOL Batch Renderer

단백질 구조를 가지고 놀다보면 디렉토리에 PDB 파일이 쌓이게 되고..가끔은 이 파일이 무슨 구조의 파일인지조차 헷갈리는 경우가 있다.

물론 일일히 PyMOL과 같은 프로그램으로 열어보든지 아니면 PDB 사이트에서 검색을 해보셈…할수도 있겠으나 한두개면 모르겠는데 갯수가 늘어나면 난감하기 마련.

“디렉토리에 들어있는 PDB 파일을 한번에 몽땅 그림으로 보여주는 방법이 없을까?”

그런 방법 별로 생각이 안나네염.ㅋㅋ 그러나 이제 생겼음.

#!/usr/bin/python
#
# Batch Pymol Renderer
# Require Python 2.7 (argparse) and Pymol
#
#

import sys, subprocess, re, os, glob
import argparse

def pdbparsing(filename, regex):
#
# Parse pdb content and extract using regex
#
	if os.path.exists(filename):
		pdb = open(filename)
		pdbcontent = pdb.readlines()
		matched = ''
		matchedcount=0
		reg = re.compile(regex)
		for line in pdbcontent:
			match = reg.match(line)
			if match:
				if matchedcount==0:
					gap = " "
				else:
					gap = ""
				matched = matched+gap+match.group(1).strip()
		return (matched)
	else:
		print "{0} is not found!".format(filename)
		sys.exit()


def htmlout(description):
#
# Generate render.html which display rendered png files
#
#
	htmlheader = """
<!DOCTYPE html>
<html>
	<head>
    	<title>List</title>
 		<meta charset='utf-8'>
	</head>
	<style>
	</style>
	<body>
"""
	imgtag = """
		<img src="./{0}">
		<p><a href="http://www.rcsb.org/pdb/explore/explore.do?structureId={1}">{2}</a></p>
"""

	htmlfooter = """
	</body>
</html>
"""
	htmloutput = open('render.html','w')
	htmloutput.write(htmlheader)
	for pdb,desc in description.items():
		htmloutput.write(imgtag.format(pdb[:-4]+".png", pdb[:len(pdb)-4], pdb[:len(pdb)-4]+":"+desc))
	htmloutput.write(htmlfooter)
	htmloutput.close()


def main(arglist):
#
# PyMol executable path
# In cases of MacPymol, It assumed that pymol is installed in 'Application' folder.
# Other cases, plase set up the exact location of PyMOL executable
#
	PyMOLPath = '/Applications/MacPyMOL.app/Contents/MacOS/MacPyMol'
	if len(arglist.file)>0:
		subjectList = arglist.file
	else:
		subjectList = glob.glob('*.pdb')
	if len(subjectList)>0 :
		pymolLoadingFile = open('render.pml','w')
		pymolLoadingFile.write('bg_color white\n')
		description = {}

		style = "cartoon" #Defaults
		if arglist.ribbon :
			style = "ribbon"
		if arglist.line :
			style = "line"
		if arglist.stick :
			style = "stick"

		if arglist.view:
			if os.path.exists(arglist.view):
				f = open(arglist.view)
				view = f.readlines()
				if re.match("^set_view",view[0]):
					for line in view:
						pymolLoadingFile.write(line)

		for pdb in subjectList:	
			if os.path.exists(pdb):			
				print pdb
				pymolLoadingFile.write("load {0}/{1}\n".format(os.getcwd(),pdb))
				pymolLoadingFile.write("hide all\n")
				pymolLoadingFile.write("show {0}, {1}\n".format(style, pdb[:-4]))
				if arglist.cbc:
					pymolLoadingFile.write("util.cbc\n")
				else:
					pymolLoadingFile.write("spectrum count,rainbow,{0}\n".format(pdb[:-4]))
				if arglist.surface:
					pymolLoadingFile.write("show surface,{0}\n".format(pdb[:-4]))
				if not arglist.view:	
					pymolLoadingFile.write("orient {0}\n".format(pdb[:-4]))
				if arglist.ray:
					pymolLoadingFile.write("ray\n")
				pymolLoadingFile.write("png {0}.png\n".format(pdb[:-4]))
				description[pdb]=pdbparsing(pdb, '^TITLE    [ \d](.*)$')
		pymolLoadingFile.close()
		print "Running PyMol..."
		p = subprocess.Popen([PyMOLPath,'-c','render.pml'],
							  stdout=subprocess.PIPE)
		p_stdout = p.stdout.read()
		htmlout(description)
	else:
		print "Usage : render.py"
		sys.exit()		


if __name__ == "__main__":
	parser = argparse.ArgumentParser()
	parser.add_argument('-r', '--ribbon', action='store_true', dest='ribbon',default=False,
	                    help='Draw as ribbon')
	parser.add_argument('-l', '--line', action='store_true', dest='line',default=False,
	                    help='Draw as Line')
	parser.add_argument('-t', '--stick', action='store_true', dest='stick',default=False,
	                    help='Draw as Stick')
	parser.add_argument('-s', '--surface', action='store_true', dest='surface',default=False,
	                    help='Draw as Surface')
	parser.add_argument('-c', '--color_by_chain', action='store_true', dest='cbc',default=False,
	                    help='Color by Chain')
	parser.add_argument('-rt', '--ray_trace', action='store_true', dest='ray',default=False,
	                    help='Ray tracing')
	parser.add_argument('-f', '--files', nargs='*', dest='file',default=[],
	                    help='File to process')
	parser.add_argument('-v', '--fixed_view', action='store', dest='view')
	results = parser.parse_args()
	main(results)

위 스크립트를 render.py 등으로 저장하고 실행권한을 준다음 PATH가 설정되어 있는 디렉토리에 넣든 pdb 가 디글거리는 파일에 넣든지 하시고,

Python 2.7에서 지원되는 argparse 모듈을 사용하고 있으므로 Python 2.7 이상을 사용하든지 argparse를 설치. 
그리고 PyMol 이 설치되어 있어야 하고, MacPyMol 이 아닌 경우에는 75라인의 
PyMOLPath = '/Applications/MacPyMOL.app/Contents/MacOS/MacPyMol' 
을 자신의 PyMol 설치경로로 바꾸어 주어야 한다 

실행옵션을 보면

./render.py -h
usage: render.py [-h] [-r] [-l] [-t] [-s] [-c] [-rt]

optional arguments:
  -h, --help            show this help message and exit
  -r, --ribbon          Draw as ribbon
  -l, --line            Draw as Line
  -t, --stick           Draw as Stick
  -s, --surface         Draw as Surface
  -c, --color_by_chain  Color by Chain
  -rt, --ray_trace      Ray tracing

일단 아무 옵션 없이 render.py 를 실행시켜보면 render.pml 이라는 파일이 생성되고 자동적으로 스크립트내에서 PyMOL 을 실행시킨후 디렉토리내에 있는 모든 PDB를 하나씩 부른후 이를 png 로 저장한다.

그게 다가 아니라 render.html 이라는 html 형식의 카탈로그를 만들어줌. 설명을 클릭하면 rcsb pdb의 해당 pdb 페이지로 이동.

링크

여러가지 옵션을 제공하는데 (디폴트는 cartoon 방식의 렌더링이고, 색 지정은 N말단 – 청색 C말단 – 적색의 스펙트럼)

./render.py -r

Ribbon 으로 렌더링

./render.py -t
stick 으로 렌더링

./render.py -t
line으로 렌더링

./render.py -s
surface로 렌더링 (다른 표현방식에 비해 장시간이 걸리는 것에 유의)


./render.py -c
color by chain (chain별로 다른 color지정하여 렌더링)방식으로 색지정 변환.

./render.py -c -s
surface로 rendering하면서 color by chain

./render.py -rt
Raytracing (고품질의 렌더링이 가능하나 시간이 매우 오래 걸림에 유의)

추가로 부연설명하면

1. PyMol을 Python Script에서 제어하는 방법으로 가장 속편한 방법이라면 여기서 쓰는 방법처럼 PyMol script (위의 예에서는 Render.pml) 를 만들고 PyMol을 수행하여 작업을 수행하는 것임. 이렇게 생성된 스크립트를 대충 살펴보면

bg_color white
#바탕색 하얀색
load /Users/suknamgoong/Dropbox/pdbsearch/S_1G9O.pdb
#로딩. 
hide all
#몽땅지우고
show cartoon, S_1G9O
#S_1G9O이라는 pdb를 cartoon으로 그림
util.cbc
#color by chain
orient S_1G9O
#최적의 위치로 카메라위치 옮김
png S_1G9O.png
#S_1G90.png라는 이름으로 그림 png로 저장
.....반복

2. PyMol 을 커맨드 라인에서 수행하려면

PyMol -c script.pml

와 같은 방식으로 수행하면 편함.

단백질 구조 겹치기 (Structural Superposition) – 전편

단백질은 왜겹침?

Q: 여러종류의 단백질/DNA의 서열을 비교하려면 어떻게 하나요?
A: 시퀀스 얼라이먼트를 합니다 고갱님.

Q: 그렇다면 이미 구조가 풀린 단백질이 서로 어떻게 다른가 비교하려면 어떻게 하나요?
A: ……그냥 눈으로 잘 비교하세염

……눈으로 잘 비교하는 것은 그렇다치는데, 일단 비교를 하기 위해서는 동일한 조건에서 비교를 해야 하고, 제일 좋은 방법은 두개를 가장 최적으로 중첩시켜서 비교하는 것이다.

Image

가령 이런 넘과 (GFP, PDB 1EMA)Image
이런 넘 (mCherry, 2H5Q)은 척봐도 비슷하고 이걸 겹쳐보면
Image
이렇게 전체적인 맥주통 모양의 구조가 매우 유사하다는 것을 알 수 있지만, 이렇게 틀린 부분이 있다는 것을 알 수 있는데
Image
초록색 내냐 체리색 내냐를 결정하는 Fluorophore의 차이
Image
이런 넘(PDB:1GZN)과
Image
이런 넘 (PDB:1W84) 은 그닥 개별적으로 놓고 보면 별로 닮아보이지 않지만, 이 구조를 중첩시켜 보면,
Image
확실히 전체적으로 닮았고, 닮은 부분과 닮지 않은 부분이 어디인지가 확실히 나온다.

알다시피 단백질의 구조는 단백질의 서열에 비해서 변하는 속도가 느리기 때문에 서열비교로만으로는 상동성이 없다고 생각하는 단백질의 경우에도 구조를 비교해보면 놀라울만큼 유사한 구조를 보이는 경우가 자주 있다. 가령

>1FHW:A|PDBID|CHAIN|SEQUENCE
MNPDREGWLLKLGGRVKTWKRRWFILTDNCLYYFEYTTDKEPRGIIPLENLSIREVEDPRKPNCFELYNPSHKGQVIKACKTEADGRVVEGNHVVYRISAPSPEEKEEWMKSIKASISRDPFYDMLATR

이런 시퀀스하고

>3HIE:A|PDBID|CHAIN|SEQUENCE
SSQTSNFLAEQYERDRKAIINCCFSRPDHKTGEPPNNYITHVRIIEDSKFPSSRPPPDSKLENKKKRLLILSAKPNNAKL
IQIHKARENSDGSFQIGRTWQLTELVRVEKDLEISEGFILTMSKKYYWETNSAKERTVFIKSLITLYIQTFEGHVPELVN
WDLSLFYLDER

를 단순 아미노산 서열만 고려해서 align을 한다치면

#=======================================
#
# Aligned_sequences: 2
# 1: EMBOSS_001
# 2: EMBOSS_001
# Matrix: EBLOSUM62
# Gap_penalty: 10.0
# Extend_penalty: 0.5
#
# Length: 67
# Identity:      18/67 (26.9%)
# Similarity:    26/67 (38.8%)
# Gaps:          12/67 (17.9%)
# Score: 40.0
# 
#
#=======================================

EMBOSS_001        10 EQYERDRKA-IINCCFSRPDHKTGEPPNNYITHVRIIEDSKFPSSRPPPD     58
                     |.|....|. :|..|.:..|.:..|  .|::.: ||        |.|.|:
EMBOSS_001        66 ELYNPSHKGQVIKACKTEADGRVVE--GNHVVY-RI--------SAPSPE    104

EMBOSS_001        59 SKLENKKKRLLILSAKP     75
                     .|.|..|.....:|..|
EMBOSS_001       105 EKEEWMKSIKASISRDP    121


#---------------------------------------
#---------------------------------------

음 이 두개가 비슷한 단백질이라구? ㅋㅋㅋ구라즐ㅋㅋㅋㅋ 하는 반응이 보일수도 있겠으나, 구조를 비교해보면

거의 유사한 fold를 가진 단백질이고 유사한 기능(Phospholipid binding)을 수행한다는 것이 결국 확인되었다.

즉, 단순한 시퀀스 비교로만으로는 이해하기 힘든 단백질의 기능을 파악하기 위해서는 구조를 비교하는 것이 좋으며, 구조를 비교하려면 일단 단백질 구조를 동일한 선상에서 비교할 수 있도록 구조를 겹치는 (Superposition)작업을 해야한다 하는 이야기.

그래서 어떻게 하냐구..

단백질 몇 개의 구조를 서로 비교하는데는 PyMol과 같은 단백질 구조 비쥬얼라이제이션 프로그램에 있는 Structure Superposition 기능을 쓰면 좋다. 리빙포인트

가령 앞에서 예로 보여준 GFP와 mCherry구조를 PDB에서 불러서 PyMol로 띄워보면
알바야 맥주통 정렬해라 거의 유사한 구조라고 해도 이렇게 임의의 위치 (결정구조에서 실제 단백질 체인이 위치하는 위치이므로 ‘임의’라고 하면 좀 어폐가 있지만) 에 존재하기 때문에 두개의 구조를 거의 유사한 위치에 정렬해야 비교가 가능하다. 이걸 하려면 명령어 라인에서

align 2H5Q, 1EMA

을 치면


간단하게 정렬가능하다. 참 쉽져? 여기서 2H5Q는 움직일 넘, 1EMA는 기준이 되는 넘

그러나 앞에서 예로 보여준 아미노산 서열기준으로 그닥 상동성이 높지 않은 경우라면

align 3HIE, 1FHW


아까와는 달리 그닥 겹쳐지는 것이 부실하다. ;;; 왜그런가? 그 이유는 Pymol의 명령어인 align의 경우에는 구조에 기반한 align을 하는 것이 아니라 아미노산 서열 기준의 align을 수행하고, 단백질의 서열이 같은 두 단백질이거나 서열 상동성이 있는 경우에는 꽤 잘 맞추지만, 이렇게 서열 상동성은 낮은 경우에는 제대로 구조 superposition이 되지 않기 때문이다. 따라서 이런 경우에는 align 명령어를 사용하는 것은 좋지 않다. 따라서 이를 위해서는 다른 방법을 사용해야 한다.

cealign
cealign 은 PyMol 1.3 버전부터는 정식 명령어로 추가되었지만, 이전 버전에서는 플러그인으로만 제공되는 기능으로써, 자세한 설명은 아래 링크를 참조하기 바란다.

CEALIGN (PymolWiki)

이 기능은 아까와 같이 서열 상동성은 매우 낮지만 구조적으로 유사한 두개의 단백질을 순전히 구조정보만 가지고 align을 하는데 유용하게 사용된다. PyMol 최신 버전이거나 위 링크의 방법대로 플러그인을 설치했다면

cealign MASTER, TARGET

기준이 되는 넘을 앞에, 움직일 넘을 뒤에 (align 명령과 반대이다) 써서 두개의 alignment를 다시 수행하면

cealign 1FHW, 3HIE

이제 잘 겹쳐진다. 응?

때로는 여러개의 chain을 가진 모델끼리 겹치는데 특정 chain에 한정하여 Superposition 을 수행해야 할 때가 있다. 가령

여러개의 subunit 중에서 원하는 위치에 중첩을 시키고 싶다면 이동할 기준이 될 subunit를 파악해서

cealign /3LUE//I, 3M1F

이동의 기준이 되는 I Chain으로 3M1F 를 중첩시킬 수 있다.

이렇게 cealign 플러그인 (혹은 최신버전의 PyMol) 을 이용하면 ‘살짝 비슷한’ 구조라고 할지라도 가능한 최대한 superposition을 수행하여 구조간의 같은 점과 다른 점을 손쉽게 비교할 수 있다. 참 쉽져?

그러나 몇 개 정도의 구조를 대상으로 비교를 한다면 이렇게 PDB를 불러오고 하나씩 cealign 명령을 수행한다든지 하면 되겠지만 만약 수십, 수백개의 구조를 불러들여와서 여기에 대해서 일괄적으로 superposition을 해서 비교를 하려면 어떻게 해야 할까?

…………그건 ‘후편’ 을 기대하세염. ㅋ

BLAST를 이용한 PDB 자동 다운로드 및 처리

PDB에서 유사한 구조, 혹은 도메인을 모두 검색해서 구조를 서로 비교해 본다면 어떻게 해야 할까? 1. PDB에 가서 2. 키워드로 검색하고 3. 나오는 PDB 파일을 하나하나 클릭해서 저장하고 4. PyMol 등에 불러와서 5. Structure alignment 를 하고..
물론 몇 개 정도의 단백질이라면 이렇게 해도 된다. 그렇지만 비슷한 구조를 가진 단백질을 다 비교해 보고 싶다면? 가령 Kinase 로 구조가 풀려있는 PDB를 모두 검색해서 이들의 구조를 다 비교해 보고 싶다든지 한다면…이거 수작업으로는 쉽지 않다.

특정 아미노산 서열을 가지고 PDB에서 BLAST 검색해서 PDB 다운로드하고, 이걸 PyMol에 로딩한후 제일 처음 파일 기준으로 Structural Alignment를 해주는 스크립트. 자세한 설명은 나중에 시간나면…안나면말구
단, Pymol 버전이 1.3이상이거나 cealign (http://pymolwiki.org/index.php/Cealign) 이 설치되어 있어야 Structural Alignment 가 됨.

#
#
# 1. Blast search of PDB using RESTful web service form www.rcsb.org
# 2. Retrieve PDB ids and PDB files
# 3. Generate PyMOL script which load all of PDBs and structural alignment using cealign (http://pymolwiki.org/index.php/Cealign)
# Written by MadScientist (https://madscientist.wordpress.com
#
import urllib2, urllib, os
import xml.etree.ElementTree as ET
#
# The first Query is BLAST search using sequence and eValue Cutoff
# and second filter is high resolution Cutoff
# the last filter is for excluding title contains "arp" (To exclude Arp 2/3 complex)
# 
url = 'http://www.rcsb.org/pdb/rest/search'
queryXML = """
<?xml version="1.0" encoding="UTF-8"?>
<orgPdbCompositeQuery version=\"1.0\">
	<queryRefinement>
		<queryRefinementLevel>0</queryRefinementLevel>
			<orgPdbQuery>
				<queryType>org.pdb.query.simple.SequenceQuery</queryType>
				<sequence>{0}</sequence>
				<eCutOff>{1}</eCutOff>
				<searchTool>blast</searchTool>
			</orgPdbQuery>
</queryRefinement>
<queryRefinement>
	<queryRefinementLevel>1</queryRefinementLevel>
		<orgPdbQuery>
			<queryType>org.pdb.query.simple.ResolutionQuery</queryType>
			<description>ResolutionQuery </description>
			<refine.ls_d_res_high.comparator>between</refine.ls_d_res_high.comparator>
			<refine.ls_d_res_high.max>{2}</refine.ls_d_res_high.max>
		</orgPdbQuery>
</queryRefinement>
<queryRefinement>
	<queryRefinementLevel>2</queryRefinementLevel>
		<orgPdbQuery>
			<queryType>org.pdb.query.simple.StructTitleQuery</queryType>
			<struct.title.comparator>!contains</struct.title.comparator>
			<struct.title.value>arp</struct.title.value>
		</orgPdbQuery>
</queryRefinement>
</orgPdbCompositeQuery>
"""
#
# Guess what is this sequence 🙂 
#
#
sequence = """
MDDDIAALVVDNGSGMCKAGFAGDDAPRAVFPSIVGRPRHQGVMVGMGQKDSYVGDEAQS
KRGILTLKYPIEHGIVTNWDDMEKIWHHTFYNELRVAPEEHPVLLTEAPLNPKANREKMT
QIMFETFNTPAMYVAIQAVLSLYASGRTTGIVMDSGDGVTHTVPIYEGYALPHAILRLDL
AGRDLTDYLMKILTERGYSFTTTAEREIVRDIKEKLCYVALDFEQEMATAASSSSLEKSY
ELPDGQVITIGNERFRCPEALFQPSFLGMESCGIHETTFNSIMKCDVDIRKDLYANTVLS
GGTTMYPGIADRMQKEITALAPSTMKIKIIAPPERKYSVWIGGSILASLSTFQQMWISKQ
EYDESGPSIVHRKCF
"""
resolution="2.8"
#
# if you want to search remote homolog, increase E value cutoff. In this case, this protein is very highly conserved protein, so I used very stringent threshold.
#
eCutOff="1e-30"
biological_unit = True
reprot = """
http://www.rcsb.org/pdb/rest/customReport?pdbids=0&customReportColumns=structureId,structureTitle,resolution,experimentalTechnique,depositionDate,structureAuthor,classification,structureMolecularWeight&service=wsdisplay&format=xml
"""

queryText = queryXML.format(sequence, eCutOff, resolution)
print "querying PDB...\n"

#
# Fetch pdb list using XML query in queryText
# and pdb list was in pdblist
#

req = urllib2.Request(url, data=queryText)
f = urllib2.urlopen(req)

result = f.read()

if result:	
	pdblist = []
	pdblist = result.split()


	if biological_unit:
		pdburl = "ftp://ftp.wwpdb.org/pub/pdb/data/biounit/coordinates/all/{0}.pdb1.gz"
	else:
		pdburl = "http://www.rcsb.org/pdb/files/{0}.pdb.gz "
	
	f=open('load.pml','w')
	
	for pdb in pdblist:
		print "download {0}".format(pdb)
		urllib.urlretrieve(pdburl.format(pdb.lower()), pdb+".pdb.gz")
		os.system("gunzip {0}.pdb.gz".format(pdb))
		f.write("load {0}/{1}.pdb\n".format(os.getcwd(),pdb))
		
	f.write("hide all\n".format(pdb))
	f.write("show cartoon\n".format(pdb))

	for i in range(1,len(pdblist)):
		f.write("cealign {0}, {1}\n".format(pdblist[0],pdblist[i]))
	f.close()
	
	req = urllib2.Request(reprot.format(",".join(pdblist)))
	f = urllib2.urlopen(req)
	result = f.read()

	if result:
		f=open('list.txt','w')	
		root = ET.fromstring(result)
		for record in root.iter('record'):
			recordline = []
			for field in record:
				recordline.append(field.text)
			f.write("\t".join(recordline)+"\n")
		f.close()


	else:
	    print "Failed to retrieve results" 
			
else:
    print "Failed to retrieve results" 

어쨌든 실행하면

querying PDB...
download 1ATN
download 1C0F
download 1C0G
download 1D4X
download 1DEJ
download 1EQY
download 1ESV
download 1HLU
download 1J6Z
download 1KXP
download 1LOT
download 1MA9
download 1MDU
download 1NLV
download 1NM1
download 1NMD
download 1NWK
download 1P8Z
download 1QZ5
download 1QZ6
download 1RDW
download 1S22
download 1SQK
download 1WUA
download 1YAG
download 1YVN
download 1YXQ
download 2A3Z
download 2A40
download 2A41
download 2A42
download 2A5X
download 2ASM
download 2ASO
download 2ASP
download 2BTF
download 2D1K
download 2FF3
download 2FF6
download 2FXU
download 2GWJ
download 2GWK
download 2HF3
download 2HF4
download 2HMP
download 2OAN
download 2PAV
download 2PBD
download 2Q0R
download 2Q0U
download 2Q1N
download 2Q31
download 2Q36
download 2Q97
download 2V51
download 2V52
download 2VYP
download 3A5L
download 3A5M
download 3A5N
download 3A5O
download 3CHW
download 3CI5
download 3CIP
download 3DAW
download 3EKS
download 3EKU
download 3EL2
download 3HBT
download 3M6G
download 3MMV
download 3MN5
download 3MN6
download 3MN7
download 3MN9
download 3SJH
download 3U4L
download 3U8X
download 3U9D
download 3U9Z
download 3UB5
download 3UE5
download 4EFH

BLAST에서 hit 된 pdb 파일을 쳐묵쳐묵 다운로드하고

이렇게 생성된 load.pml 파일을 더블클릭하거나 PyMol에서 @load.pml 식으로 불러오면

(파일이 수십개가 넘어가면 cealign 단계에서 시간 꽤 걸림. 인내심을 가지고 기다려보삼)

결과물. 헉 단백질이 디글디글. 너무 정신없으니까 좀 엇나간 넘들 좀 끄면..

대충 특정한 단백질 (Actin)에 붙는 바인딩 파트너들이 어떠한 방식으로 붙는지를 개괄적인 양상을 볼 수 있음.

list.txt를 엑셀 등으로 열어보면 다음과 같이 다운로드된 파일의 목록을 볼 수 있음.

위 스크립트를 응용하면 좀 더 다양한 조건을 지정하여 PDB의 목록을 뽑고, 이를 다운로드하고, PDB에 대한 관련정보들을 저장하여 추후분석에 사용할 수 있을 것임.

시간이 나면 CCP4의 ‘superpose’ http://www.ccp4.ac.uk/html/superpose.html 를 이용하여 PyMol 의 cealign 을 거치지 않고 바로 Structure superimpose를 하도록 스크립트를 고칠 예정. 시간나면. ;;;;

Make Sublime text 2 as VIM replacement

Sublime Text 2 is great text editor. No question about that. But If you are came from VIM world. you can tweak a little bit and make it as near perfect vim replacement.

1. Turn vintage mode

Sublime is shipped with package called ‘Vintage’, but it is disabled by default.

Image

Preference – Setting – DefaultImageSearch ‘ignored_packages’ and remove ‘vintage’ from [] and add “vintage_start_in command_mode” : true

Now you can use most of key binding of Vim, including cursor movement, deletion, visual mode selection, extra. But Ex-mode commands including search & replacement (%s/…/…/g) is still missing. In order to emulate Ex mode in sublime text, you should install another package called ‘VintageEx’.

2. Install Package Control and VintageEx

It is better to install ‘Package Control’, which enable to manage various packages available for Sublime text 2. To install Package Control, open console (Ctrl-`) and paste the following command in console line.

import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'

Restart the sublime and using command pallette (shift+command+P) and select ‘install packages’

Select ‘VintageEx’

VintageEx Packages will be downloaded and installed. Restart Sublime Text and let’s press ‘:’ as we did in vi/vim.Now you can execute various Ex mode commands. For examples,

You can delete lines using regular expression

Search and Replacements

Random genomic related tweets

22Kb average reads? Wondering average error rate..:)

Even 5Kb+ reads will be helpful to resolve many repeats..

과학자의 소통 우선순위

가끔 과학자들에게 자신의 연구결과를 대중이 알아들을 수 있는 용어로 해설해 주기를 원하는 사람들이 있고, 심지어는 이런 게 성공적인 과학자의 자질인 것처럼 이야기하는데, 이런 것은 전반전 뛰고 온 박지성이가 하프타임에 TV 중계석에 등장해서 자신의 전반전 경기에 대한 해설을 해주기를 기대하는 것과 사실 크게 차이 없는 일 아닐까?

스포츠 경기에는 선수 혹은 지도자 경험이 있는 해설자가 있어서 경기의 흐름을 대중에게 설명해 주는 것처럼 과학자의 경험을 가지고 ‘경기’ 의 맥락을 읽을 수 있는 사람이 대중에게 해설을 해 주면 되는 것이고 그게 꼭 현역 ‘선수’일 필요는 없음. 그리고 주로 해설을 해 주는 사람이 현역 선수라고 사기칠 필요도 없는 것이고…그리고 주로 그런 역할을 하는 사람이 ‘현역’인 것처럼 ‘프로구단’의 로스터를 차지하고 있을 필요도 없다고 생각함.

현역 프로스포츠 선수가 제일 우선적으로 소통이 잘 되어야 하는 대상은 자신의 팀메이트인 것처럼 현역 과학자라면 제일 우선적으로 소통해야 할 대상은 자신과 같은 분야를 연구하는 연구자임. 그 다음 대상이라면 자신과 완전히 동일한 분야는 아니지만 다른 관점에서 자신의 문제를 살펴볼 수 있는 연구자. 그 이외는 자신의 본업이 잘 된 다음에 시간남을때 해도 된다. 아니면 현역에서 은퇴한 다음에 하든가. 자신과 같은 분야를 연구하는 연구자들한테서 듣보 취급을 받으면서 외부와의 ‘소통’ 에만 치중하는 사람은 뭐랄까 현역 로스터에 등록되어 있으면서 연예프로에 더 관심을 보이는 프로스포츠 선수와 그닥 다를바 없는 존재 아닐까? 우리는 강ㅂ규의 말로가 어떻게 되었는지 알고 있긔

#1줄로 요약하면 : 통섭트립_즐

The DNA Exchange

Let’s STOP talking about the $1000 genome!  Please.

Unless you’ve been living under a rock since 2001, you’ve been hearing about the $1000 genome for years.  The inevitable, the holy grail, the game-changer – the ultimate goal post as proclaimed by an entire chorus of Chicken Little genomicists crying, ‘The cost of sequencing is falling!  The cost of sequencing is falling!’  And it’s true! Not only has the cost of sequencing dropped faster than Facebook stock on IPO day, but the product has improved at the same time, in speed, accuracy and coverage.  Will it be transformational?  It already is. 

The early references to the ‘$1000 genome’ were purely aspirational, tossed out in stark contrast to cost of the newly-completed 2.7 billion dollar genome generated by the Human Genome Project.  But the emergence of the $1000 genome as a meme began in earnest in 2005, when the Craig…

View original post 706 more words

엔코드를 디코딩하기 (3) : Transcription Landscape

Landscape of transcription in human cells

ENCODE 논문인 위 논문에 대해서 글을 쓸까 했는데, 이미 아래 블로그에서 잘 해설을 했다 ㅋ 

http://massgenomics.org/2012/10/redefining-the-gene-transcription-landscape-of-human-cells.html

아래 블로그를 읽어보삼. ㅋ 

 

뭐 그외 다른 논문에서도 이미 확인된 것이지만, ENCODE에서도 소위 RNA-DNA Difference (RDD) 가 엄청 많이 있더라에 대해서 풋 기존에 알려진 A->G 에디팅 이외엔 별거 없더라로 확인사살을 해주었다. ㅋ

Image

 

RDD  ㅋㅋㅋㅋㅋㅋㅋㅋ 

오늘의 뉴스 및 단상 (노벨상 열폭 등)

Genome interpreter vies for place in clinical market

http://www.knome.com/knosys-100-overview/

위 회사에서 파는 125000불짜리 ‘지놈해석턴키시스템’ 에 대한 기사. 하루에 한사람 NGS 홀지놈 데이터 프로세싱하기 충분한 파워라나.

클라우드 시대에 몇년안에 고물될 시스템 들여놓으라구염 ㅋ 호갱님 취급인가 하실분 있겠지만  저 회사 사람들은 “‘아놔 환자 데이터를 클라우드에 어떻게 올림 유출이라도 되서 소송크리 맞으면 ㄷㄷㄷ 환자 데이터는 병원 밖으로 못나간다능’ 하는 의사양반들 많거던여? ” 하고있음.

여튼 저 제품의 주된 키는 하드웨어라기 보다는 내장된 소프트웨어 솔루션인데

Image

“의사양반들한테 걍 SNP 3백만개 목록주면 뒷목잡고 넘어가거던여 고갱님? 그래서 추릴거 다 추리고 해서 현재까지 알려진 걸로 봐서 질병과 관련있을것 같은 variant 딱 10개만 뽑아줍니다. 더도덜도 말고 열개 ㅋ”

Boston scandal exposes backlog

1. 메사추세츠주 소속의 법의학 실험실에서 마약성분 검사를 하는 사람이 지난 몇년간 8천건의 검사결과를 조작해왔음이 드러남.

2. 남들보다 더 많은 실적을 올리려고 실제로 검사하지도 않고 결과를 어림짐작해서 결과통보 ㄷㄷㄷ

3.약 34000건의 형사사건에 영향을 미쳤고,이 사람이 검사한 사건 관련되서 감방에 들어간 사람만 1100명. 실제로 죄가 없는데 이사람때문에 감방살고 있는 케이스도 수두룩한듯. (실제 네가티브인데 그냥 포지티브라고 결과를 보고했다고 시인한 것도 몇건 있다는듯)

4. 저런 기가막힌 사건이 일어나게 된 근본원인이라면 미국 법의학관련 실험실의 태부족으로 30일 이내에 결과안나오는 건수가 전체의 30% 이상 되므로 이거 빨리 처리하는 사람 능력있음 ㅋ 식으로 여건이 조성된 때문이라는듯. 그러니 검사도 안하고 그냥 찍기하는 엽기적인 일이 일어나지.ㅉㅉ

노벨상 잡설

쟈마나카 야마나카와 개구리아저씨 노벨상 득템. 노벨상 계절만 되고 특히 일본 수상자가 나오면 이넘의 열폭드립 장난아님. 우리는 왜 못타냐 한국은 언제쯤………공부 조낸 쳐 안하다가 학원 3개월 보내놓고 전교등수 진입하기를 바라는 심보는 놀부심보라고 합니다 고갱님

1901-1950년간 생리의학상 후보자로 추천된 일본사람 목록

1901년부터 일본넘들은 후보자로 올라온다는 것을 알 수 있음. 물론 자기네들이 추천한 것도 부지기수지만 ㅋㅋ 그 중간에도 이 바닥에서 일본넘들 중 꽤나 날리는 업적을 세운 사람 많이 있음. 노구치 히데요 같은 사람이야  1. 이 사람 주장한거 거진 다 틀렸음 ㅋㅋ  2. 일본에서 연구한 것도 아님 이라고 쳐도 몇년전에 발생한 독일대장균 관련 독소인 shiga toxin 및 원인균 shigella를 발견한 것은 시가 키요시 라는 사람이고 이때가 1896년임. (이 사람은 일제시대 경성제대 총장을 지내기도 함) 여튼 일본의 의학의 경우에는 20세기 초반만 해도 국제적으로 경쟁력이 있는 수준으로 올라와 있었음.

또 한가지 예 들어볼까? 님들 Michealis-Menten Equation 암? 뭐 생화학 시간에 나오는 식 있잖아 대개의 생물쟁이가 아는 유일한 수식  그 수식만든 사람이 Leonor Michaelis 라고 하는데, 이 사람이 1920년대 중반에 나고야 대학에서 겨수를 했음. 아마 독일에서 연구비가 끊겨서 일본까지 기어들어왔겠지. 여튼 1920년대 정도에는 일본은 그 당시 과학선진국이던 독일에서 별볼일 없어지면 가볼만한 데 정도로까지는 여겨졌다는 이야기.

그런데 생리의학상을 처음 탄 것은 1987년에서야 되서임. 토네가와 스스무 

그나마 이 사람은 일본에서 연구한 업적으로 탄것도 아님. 일본 내에서 연구한 업적으로 탄 사람은 저 야마아저씨가 최초임. 즉 1901년부터 2012년….111년 걸렸음.

그러면 한국의 경우에는 얼마나 걸려야겠지?  한국과학재단이 설립되고 국가에서 연구비를 주기 시작한게 1982년임. 그전에는 기초연구 그런거 먹는거임? 했다고 생각하면 됨. 즉 한국에서 과학연구를 시작한 것은 1970년대말, 1980년대 초라고 봐야함. 그나마 연구비의 규모가 늘어나고 국제적으로 경쟁할 수 있는 수준의 연구가 된 것은 잘봐주어야 2000년대에 들어서임.

즉, 한국은 일본보다 100년 늦게 이 바닥에 들어온 거임.

그래서 일본의 선례를 따른다면 2112년 정도에나 한국에서 수행된 연구가 노벨상을 탄나고 해도 그닥 놀랄 것은 아니지만, 그냥 biased 된 눈으로 팍팍 디스카운트해줘서 1/3 정도로 신속하게 빨리빨리 탄다고 해도 앞으로 30년 안에 타면 진짜 빨리 타는 거임.  노벨상깎던 노인 “어허 노벨상이 재촉한다고 되나 쪼랩이 만랩이 되어야 디아블로도 잡고 상을 타지”