Monday, July 12, 2010

synthetic biology

Synthetic biology is a big issue in these days. Craig Venter, George Church, and Kristala Prather who are the most famous in biology field spoke about synthetic biology to a presidential commission(http://www.genomeweb.com//node/944858?hq_e=el&hq_m=762062&hq_l=4&hq_v=37b0a0cbd3). Then what is synthetic biology? Actually what I know is very little thing. So I make opportunity to know this concept.


In 1912, the French chemist Stephane Leduc was first to use the term 'synthetic biology'.
In 1978, Szybalski and Skalka quote the term as closer meaning in today.

top-down approach

bottom-up approach

engineering principles considered in synthetic biology, In 2005 Drew Endy's paper are 
standardization, decoupling, abstraction.

application of synthetic biology, example is artemisinin, a drug against malaria produced from plant, can be produced in genetically engineer yeasts.

Although there are big differences in synthetic biology(more normalized, standardized and concrete), I accept the concept of synthetic biology as one of the way to comprehend the biology. From the past scientist have tried to modify organism for interrogating biological knowledge and producing what they want more efficiently. Synthetic biology is a part of this movement. 

Sunday, July 11, 2010

human epigenome project

As I try to study epigenomics, investigating global movement such as epigenome project to check available data is also important as much as studying biological investigation. And in that sense, I will introduce human epigenome project.

In 2003, scientists from UK's Sanger Institute and Epigenomics, Inc formed the Human Epigenome Project (http://science.howstuffworks.com/genetic-science/human-epigenome-project1.htm). According to website ( http://www.epigenome.org/index.php), The human epigenome project (HEP) is a collaboration run by the members in the Human Epigenome Consortium. One of the aims of the HEP is to generate tissue-specific DNA methylation reference profiles of the human genome. They use sodium bisulfite treatment, find MVPs (methylation variable positions) and release these data.
So far, two papers were published from here.
The first paper is "DNA methylation profiling of the human major histocompatibility complex: a pilot study for the human epigenome project" (http://www.ncbi.nlm.nih.gov/pubmed/15550986?dopt=Abstract)
and the second one is "DNA methylation profiling of human chromosomes 6, 20 and 22"

releasing date from this is stopped in 2006. I am not sure whether their activities stopped.

Monday, July 5, 2010

essential utility (make)

make는 파일 관리 유틸리티이다. 파일 간 종속 관계를 파악하여 기술 파일(Makefile)에 기술된 대로 컴파일 명령이라던지 쉘 명령을 내린다.

make

make는 기술 파일(makefile)에 내용대로 명령을 수행하므로 makefile 작성법과 make 특징만 알면 된다.

-make의 기본 동작-

Sunday, July 4, 2010

essential utility (gcc)

컴파일의 의미와 과정, 그리고 binutils 패키지 활용 방법에 대해 알아본다.


gcc


-컴파일의 의미-

컴파일이란? 형식언어(C, C++) 를 기계어로 번역하는 것.
그럼 기계어(machine instruction)란? 이진수로 되어 있는 숫자로써 CPU의 종류마다 고유하며, 특정 행동을 취하게 하기 위한 코드 (예로 01010101은 i386 CPU에서 'ebp레지스트를 현재의 스택에 push 해라'). 어셈블리 언어와 1대 1 매치.
그럼 어셈블리 언어란? 기계어를 사람이 일상 생활에서 사용하는 자연어에 가깝게 1~6개의 문자로 기호화해서 나타낸 것.

C 소스 파일 컴파일시 -g 옵션을 넣어주고 컴파일 한뒤에 실행 파일을 objdump 명령어로 보면 디버깅 심벌과 기계어, 그리고 어셈블리 코드를 볼수 있다. 기계어는 사람이 보기 좋게 16진수로 되어 있다 (gcc -g -o like like.c --> objdump -S like).
책에 CPU의 0과 1값을 받는 것에 대한 설명이 그림과 함께 잘 나타나 있으나 생략한다.


-C 소스 컴파일 과정-


gcc 는 GNU에서 만든 C 컴파일러이다 (사실 C, Fortran, ada 등도 컴파일 가능하다). 실제로 gcc는 실제 컴파일을 하는 것이 아니라 전처리기(cpp0), C 컴파일러(cc1), 어셈블러(as), 링커(ld 혹은 collect2)를 호출하는 역할을 한다 (*오른쪽 그림 참조*).

컴파일 과정을 gcc -v --save-temps 으로 확인할 수 있다 (-v 는 컴파일 과정을 화면에 출력하라, --save-temps는 컴파일 과정의 파일을 지우지 마라 라는 의미). 위 결과 전처리 후 생기는 *.i 파일 등을 이용하여 에러 수정에 도움이 된다.

1.cpp0에 의한 전처리 과정: /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs에는 gcc가 호출하는 프로그램의 기본적인 옵션들이 들어 있다. 전처리 과정은 크게 헤더 파일 삽입매트로의 치환및 적용으로 이루어진다. 헤더파일 삽입은 include 한 자리에 파일의 내용이 붙게 된다. 매크로 치환은 define으로 된 내용을 찾아 치환이 일어난다.


2.cc1에 의한 어셈블리 소스 파일로 컴파일 :
1.어휘분석 : 스캐너가 소스를 토큰(문법적으로 의미있는 최소 단위)으로 나눔
2.구문분석 : 파서가 토큰을 받아서 문법적 오류가 있는지 확인
3.의미분석 : 의미상 오류 검사(변수 선언검사, 자료형 불일치 검사등등).
4.중간언어생성 : 이해 안됨
5.최적화 : 중간 코드 최적화(공통부분식 제거, 연산 강도 경감, 상수 계산. 예, var=5+3을 var=8로바꿈)와 목적 코드 최적화(최대한 레지스터를 사용)로 나뉨.
6.목적코드생성 : 목적코드란 어셈블리 언어를 뜻한다.

3.as에 의한 기계어 코드 생성 : as에 의해서, cc1에 의해 생긴 *.s 파일의 기계어와 데이터가 들어있는*.o 파일을 생성한다. *.o 파일은 ELF 바이너리 포멧(바이너리 파일의 구조를 결정짓는 규약)의 바이너리 파일이다. readelf -a *.o 를 통해 ELF 포멧 바이너리의 정보를 알 수 있다. xxd like.o 명령으로도 전체를 볼 수 있다.

4.collect2에 의한 링킹 과정 : printf와 같은 함수를 사용하기 위해 정적 라이브러리 내지는 공유 라이브러리를 ELF 포멧의 바이너리 파일과 링크 시키다.
정적라이브러리란? 미리 만들어진 함수나 변수들의 묶음으로 미리 컴파일 된 *.o 파일이 하나의 파일 lib[라이브러리 이름].a 형식으로 묶여있는 형태를 뜻한다. 이렇게 묶인 오브젝트들은 컴파일 과정에서 각 바이너리와 링크되어 삽입된다. 그러나 이렇게 되면 링크가 중복되고 파일크기도 커져 공유라이브러리를 사용한다.
공유라이브러리(동적라이브러리)란? 설명이 굉장히 복잡하기에 대략적으로 설명하기로 한다. 공유 라이브러리가 존재하면 링크 과정에서 정적라이브러리 링크 하듯이 하지 않고 단순히 오브젝트 파일에 공유라이브러리를 사용하겠다고 표시만 해놓게 된다. 컴파일이 마쳐져서 프로그램이 실행되어지면 공유라이브러리를 사용한다는 표시를 보고 프로그램과 함께 동적 링크도 같이 로드하고 동적 링크는 로드된 동적 라이브러라와 프로그램 상의 라이브러리를 매핑한다.

책에는 gcc에서 호출하는 프로그램들(cpp0, cc1, as, collect2)의 옵션설명이 자세히 나와있으며 바이너리를 조작하거나 정보를 보기 위한 바이너리 유틸리티들에 대한 설명이 있으나 이는 생략한다.

Finding the fifth base : Genome-wide sequencing of cytosine methylation

This article introduced technical methodology, using next-generation sequencing, for a study on cytosine methylation (http://signal.salk.edu/publications/Lister_Ecker.pdf).

Ryan Lister and Joseph R. Ecker*


*SALK INSTITUTE (http://www.salk.edu/)

The Mammalian Epigenome

As according to UCSC's web site for bioinformatics course, they discriminate bioinformatics and computational biology. Of course, discrimination of these things would be meaningless because boundary between them is vague and we cannot weigh up the computational skill and the biological knowledge. Maybe this is only my own problem, my effort as a bioinformatician is leaning toward to raise computational skill. Even in the recent situation where contents is emphasizing, lack of biological insight can be serious problem for being leader of the field which I belong. Thus I planned to make group with lab members, who are related with my ex-firm, for studying epigenomics. I ask them to be active on this meeting, and I hope that this meeting will be more than studying groups. This is the first posting for epigenomics.

Bradley E. Bernstein, Alexander Meissner, and Eric S.Lander

-Epigenetic modifications in mammalian genomes
Epigenetic modifications fall into two categories
DNA methylation : In vertebrate, DNA methylation occurs almost exclusively in CpG and most CpG are methylated.
Histone modification : The core histones are subject to more than 100 posttranslational modification (acetylation, methylation, phosphorylation and ubiquitination). This occurs primarily in N-terminal. Lysine acetylation almost correlate to chromatin accessiblity and transcriptional activity, but lysine methylation have various effects (H3K4, H3K36 -> transcribed chromatin, H3K9, H3K27, H4K20 -> repression).


--Epigenetic Inheritance

Epigenetic modifications are heritable. By methyl-transferase Dnmt1 which can methylate hemi-methylated CpG, newly synthesized DNA strand are methylated and the pattern are preserved.
Histone modifications are a little bit hard to explain and need more reference. so I will defer this to next posting.


-A Dynamic Landscape of Cytosine Methylation DNA Methylation

--DNA Methylation in Development and Disease

DNA methylation work as
1.accelerator of recruitment of regulatory protein : methyl-CpG binding proteins recognize methylated cytosine and mediate transcriptional repression through interactions with histone deacetylases.
2.repressor for protein binding to DNA : CTCF binding at the H19 locus.
In development
In cancer, genome-wide loss or aberrant local gain of methylation. Tumor suppressor gene promoter is the target of the latter cases.

--CpG Islands

CpG island cover 0.7 % of genome and contain 7 % of total CpG. In the germ line, CpG in island are unmethylated, so can be recognized and corrected by repair system(deamination of cytosine(uracil), deamination of methylated cytosine(thymine), uracil can be corrected). 60% of promoter are related to CpG islands. The subset of these are tissue specific methylated during development. Some CpG reside within repetitive elements, and these are heavily methylated in somatic tissues. Oct-4 and Nanog promoter's methylation are associated with transcriptional activation while IL-2 and Sry's demethylation are associated.

--Studying the DNA Methylome
bisulfite sequencing : treat DNA with NaHSO3 (this convert unmethylated cytosine to uracil) and then sequence the DNA(uracil read as thymine, methylated cytosine read as cytosine).With this method survey on 6,20,22 chromosome found that small fraction(9.2%) of 511 CpG island are methylated while almost 50 % of non-CpG islands containing 5' UTRs were hypermethylated, and about 70 % conserved methylation profile between mouse and human.
Using fractionation of methylated and unmethylated portions by restriction or antibody : some found that the average methylation level CpG(selected from 5' regions of 371 genes) wa about 35 %. some group detect novel methyaltion at 135 promoters(of which 127 contain CpG islands) when comparing colon cell line with normal colon.


-Global Insights into Histone Biology

--Methods for Large-Scale Analysis of Histone Modifications



--Chromatin Domains and Cellular Memory
--Epigenetic Mechanisms of Genome Plasticity


-The Relationship between Genome and Epigenome

--The Newly Reprogrammed Epigenetic State

ES cells from inner cell mass where remethylation begins in early development, are representative of the reprogrammed state. The role of DNA in defining ES cell epigenome is significant.
H3K4 methylation coincide with CpG islands : trxG complexes that catalyze H3K4 methylation contain domains that bind unmethylated CpG dinucleotide.
H3K27 methylation correlates with transposon-free regions : 1.transposition is incompatible with the chromatin structure or negative slection. OR 2. transposons could interfere with the spreading of H3K27 methylation.

--Repetitive Elements

Transposon-derived DNA sequence is typically highly methylated in somatic tissues. Within given repeat class, modification status appeared to depend on the cellular differentiation state.
--Predicting Cytosine Methylation from DNA Sequences


-Emerging Technologies in Epigenome Research

--Cytosine Methylation

1.MSREs (methylation-sensitive restriction enzymes) , but has limitation on outside the restriction site.
2.Immunoprecipitation with a methylcytosine antibody, also has limitation on resolution
3.bisulfite-treat and sequence analysis, has little bias

--Histone Modifications

Chromatin IP (XChIP) : cross-link DNA and nearby protein by formaldehyde, sonicating the chromatin and then immunoprecipitating with antibody against a particular histone modification. but this has limitations, which are efficacy of antibody, fragmentation bias, and "masked" by other proteins specific to histone.
Native ChIP (N-ChIP) : shearing chromatin by micrococcal nuclease digestion which cut DNA at the length of the linker instead of sonication and no cross-link.
Biotin-tag affinity purification,
DamID (DNA adenine methltransferase identification) : using fusion protein consisting of E.coli Dam(Dam methylates adenines in the sequence GATC) and a certain chromatin protein or TF.

-Future Perspectives and Challenges
There are important issues
1.reduction of the numer of cells required for histone modification studies.
2.better antibody reagents for increasing sensitivity.
3.development of highly parallel DNA analyses.
4.computational tools in need.

I just want to summarize and rearrange the article in my way, but the most of sentences are compressed because of characteristic of review paper, so I couldn't do that.


further study
epigenome project, genomic imprinting & DNA methylation, inheritance of epigenome.

Saturday, July 3, 2010

essential utility (vi)

c 언어를 공부하다가 컴파일을 하게 되고 컴파일을 하다보니 자연스레 make 파일을 알게 되고.. 이와 같은 이유로 좀 더 깊게 알고 싶은 생각에 "유닉스, 리눅스 프로그래밍 필수 유틸리티 (백창우 저)" 를 보기 시작했다. 책은 내용은 프로그래밍을 시작하기 위한 편집기에서부터 컴파일의 자동화를 위한 유틸리티, 디버깅, 그룹 프로그래밍시 프로그램 에디팅 할 때의 버젼 업관리 까지 실직적으로 프로그래밍 시작부터 마무리까지에 필요한 유틸리티를 자세하게 설명하고 있다. 책의 내용이 상당히 많은 관계로 여기서는 가장 기본적인 컨셉과 나에게 도움이 될만한 예를 기록하는것으로 하겠다.


vi

vi 는 visual edit의 준말이라는것 (어떻게 이것이 비쥬얼이란 말이 들어간다는 건지.. 그 이전 시대의 에디터를 설명하나 감이 오진 않는다). 올해 나이로 얼추 서른, 최장수 소프트웨어 중 하나란다. 이 책에서는 vim(Vi Improved) 를 사용하길 권장하고 이를 기준으로 설명한다.

vim 은 3가지 모드로 구성된다.

- 명령모드 : 키 입력을 통해 vim에게 명령을 내리는 모드. 커서이동, 삭제, 복사, 붙이기 등 편집을 위한 모드.
- 입력모드 : 실제로 문서 입력 및 편집을 위한 모드. 타이핑하는데로 화면에 출력.
- ex모드 : 라인 에디터인 ex 에디터(vi 의 바탕이 된 소프트웨어)의 기능을 사용하는 모드. 파일 저장, 종료, 치환 등의 기능


명령 앞에 숫자를 넣게 되면 그 명령을 앞에 누른 숫자 만큼 반복한다는 의미가 있다. 예를 들어 10x 를 누르게 되면 x를 10번누른 효과, 즉 10개의 글자가 삭제되며, 10dd를 누르면 10개의 행이 삭제 된다. 또 다른 예를 보자면 10yw를 누른뒤에 2p를 누르게 되면 10개의 단어가 복사 되고 복사한 내용을 두번 붙여넣게 된다.

붙여넣기를 이해하기 위해서는 레지스트를 알아야 한다. vi 는 총 17개의 레지스트를 갖고 있으며 이를 보기 위해서는 ex모드에서 :reg 명령을 넣으면 된다. 명령모드에서 "1p를 누르게 되면 1번 레지스트에 있는 내용을 붙이게 된다.



v를 누른 후 방향키나 h j k l 를 이용하여 커서를 이동하면 블록을 형성할수 있다(마우스 우클릭 효과). ctrl + v 를 누르면 사각형의 블록을 지정하게 된다. 이후 d 나 y를 누르면 삭제 복사가 이루어 지고 <는 탭 제거, >탭 삽입.

되돌리기는 u 되살리기는 ctrl + r.

치환은 ex 모드에서 :[범위]/[매칭문자열]/[치환 문자열]/[행 범위]. 예를 들어 :2,4s/old/new/g 2,4s는 2행에서 4행을 의미하며 g는 행 전체에 걸쳐 매치되는 문자열을 치환하라는 의미이며 :-1,+3s/old/new/ 에서 -1,+3은 현재 커서에서 위로 1행 아래로 3행을 뜻하고 마지막에 g가 없으므로 행에서 첫 번째 매치 문자열만 치환하라는 뜻이다.


-vi 의 고급 테크닉-

정규표현식:
vi 는 정규 표현식을 지원한다.

내가 정규식에 약하기 때문에 (항상 공부하겠다고 하고 스킵한 이유로...) 이 부분은 자세히 하고자 한다.


[a-z]\+[0-9]\+ 는 소문자 하나 이상 숫자 하나이상을 의미 하는 것으로 'like0101' 이나 'korea1117'을 의미 한다. OK\ [a-z]* 은 OK 문자뒤 하나의 공백 뒤에 소문자가 0개 이상 반복을 의미한다. 곧 'OK like'를 의미한다. ^[^0-9]\+.*[a-z]$ 에서 괄호 앞의 ^ 행의 시작을 의미하며 괄호 안의 ^는 not을 의미 하고 \+는 1 이상, .은 '\n'을 제외한 문자를 *는 0개 이상, $는 행의 끝을 의미하므로 숫자로 시작하지 않는 행이며 행 가운데는 아무 문자가 있을수도 있고 끝이 소문자로 끝나는 행 을 지징하게 된다. \에서 \<는 단어의 시작을 의미하고 \>는 단어의 끝을 의미하므로 단어중에 ko로 시작하고 a 로 끝나는 단어 예를 들어 'korea' 등을 뜻하게 된다. [A-z]\+[0-9]\{2,3\}는 영문자로 시작하고 숫자가 최소 2번에서 3번 반복되는 단어 즉 'graphy21' 과 같은 단어를 뜻하게 된다.



vi는 POSIX 문자 클래스를 지원한다. 또한 확장 정규 표현식도 지원한다. 이는 생략하기로 한다.



여러 파일 편집시 예를 들어 vi를 이용해 확장자가 .py로 끝나는 파일을 열었다고 했을때(vi *.py) 열린 파일 리스트를 보기 위해서는 :ls 는 이용해 가능하고 지정 파일로의 이동은 :b2 (두번째 파일 버퍼를 의미한다) 식의 ex모드 명령어로 가능하다. :map 명령어는 단축키 지정시 사용한다.

vim 설정하기 : 사용자 홈 디렉토리에 .vimrc 파일을 생성하게 되면 vim은 실행 할때 이 파일을 읽어서 수행하게 된다. 그래서 .vimrc 파일을 이용해 원하는 사용자에 맞도록 vim를 설정할 수 있다. .vimrc파일에서 주석은 "로 시작한다.

매크로의 사용 : 예를 들어 perl로 코딩을 했는데 python에 익숙한 나머지 행 마지막에 ; 를 빼먹었다. 그러면 커서를 문장의 맨뒤로 보낸뒤 입력모드로 바꾸고 ;를 입력한다음 행을 바뀌야 한다. 이를 수행하는 과정을 나열하자면 $ i ; Esc Enter 이다 (물론 $ i 다음에 그냥 행아래로 내려가서 계속 ;를 넣으면 가능한긴하다). 이를 매번 치기 귀찮으니 명령어 과정을 vim에서 제공하는 레지스트(a-z 레지스트) 에 저장해서 이용할수 단축키로 이용 할수 있다. 명령모드에서 qb를 누르면 b레지스트에 기록시작을 뜻하며 $ i ; Esc Enter 를 순서대로 입력수 q를 누르면 b레지스트에 저장이 된다. 그뒤 다시 명령모드에서 5@b 라고 치면 b레지스트에 있는 매크로가 5번 수행하는 결과를 가져와서, 곧 5개의 행 뒤에 ;를 붙인다.

다중창 사용하기 :
Ctrl+w n : 가로 분할로 새창이 띄어짐, 여기서 :e 명령어로 파일을 불러올수 있다.
Ctrl+ww : 창간커서 전환
Ctrl+w s : 현재 파일을 가로로 분할, 같은 파일의 다른 부분을 참조할 때 이용한다.
Ctrl+w v : 현재 파일을 세로로 분할


-vim 의 조력자들 ctags, cscope, 기타 플러그 인-

연동 프로그램은 바이너리 형식의 실행 파일로 vim과 독자적으로 동작할수 있다. ctags, cscope, man등이 있다.
내장 스크립트는 vim이 기능확장을 위해 자체적으로 가지고 있는 것으로 vim 플러그 인아리 부르고 .vim의 확장자를 갖는 것으로 bufexplorer, taglist, calendar, vimspell등이 있다.

ctags :


-알아두면 유용한 팁-

파일 탐색 : :r !ls 는 원래 :!를 이용해 쉘명령어를 이용할수 있는데 :!ls를 하면 vim상태에서 ls를 실행하게 된다. 결국 ls 명령어로 출력되는 결과를 현재 커서의 위치에 삽입하라는 명령어가 된다.
:20vs ./ 이는 explorer 플러그 인이 설치 되어 있어야 한다. 파일의 리스트를 보고 싶을때 !ls를 이용할 수도 있지만 :20vs 를 이용하여 선택하면 바로 열리게 된다. 뒤의 ./는 현재 디렉토리를 뜻한다.

폴딩 기능 : 보기 싫은 긴 함수 같은 경우 '{' 위에 커서를 두고 v]}zf 명령어를 치면 함수가 폴딩되고 zo를 치면 다시 풀리게 된다. 사실 좀더 일반적으로 v로 영역을 지정하여 zf를 누르면 이부분이 폴딩된다. v는 앞에서 배운 드레그의 의미이다.

여러 행 앞에 탭 끼워넣기 : [N]>> 는 커서 위치서부터 N 행에 탭넣기 [N]<< 탭제거. 예를 들어 7>> 이면 7행 앞부분에 탭넣기가 된다.

자동 완성 기능 : 코딩중에 앞에서 사용한 함수 이름이나 변수를 일부만 치고 Ctrl+p를 누르면 앞에서 사용된 변수들 중 입력한 문자가 들어가는 변수들이 리스트업 된다.