Plot 그리기

R에서 한 화면에 두 그래프 찍기

어제 회식하러 가다가 용주형 전화받고 화인한 기능
사실 한 화면에 두개 이상의 plot을 그릴경우가 많이 있고
한눈에 많은 정보를 확인 할 수가 있기 때문에 유용한 기능 중 하나이다.

단 이 명령어로는 양쪽에 서로 다른 값의  y축은 설정 못한다.
-R에서 서로 다른 y축을 가지는 그래프도 그릴 수는 있다. 구글신에게 물어보면 간단히 나올듯... 위에 것도 구굴신에게 물어보니 10분.. ㅎㅎ

>a <- c(1,3,5,7,9,11)
>b <- c(12,10,8,6,4,2)
>plot(a, col="red")
>par(new=TRUE)
>plot(b, col="blue",axes=FALSE)
>dev.print(pdf, file="저장할/파일/경로명/파일명(확장자포함)")

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by gwlee

2009/10/21 08:34 2009/10/21 08:34
,
Response
0 Trackbacks , 4 Comments
RSS :
http://thegreatgoodplace.com/tt/study/rss/response/258

Trackback URL : http://thegreatgoodplace.com/tt/study/trackback/258

Comments List

  1. odysseus 2009/10/25 18:16 # M/D Reply Permalink

    점도 계속 위에다 찍을 수 있군요.
    어제 라인을 계속 덧그리는건 해봤었는데..ㅋ
    R도 공부하다보니 참 재밌는거 같아요.
    통계 개념을 이해하기 힘들어서 그렇지...ㅎㅎ;;

    1. gwlee 2009/10/25 20:50 # M/D Permalink

      모 예전부터 그랬지만
      공부만큼 재미있는 일은 없는듯합니다.
      요즘 눈물나게 그립슴당.. ㅋㅋ
      2년반이 남았다능.. 킁.. 'ㅅ'

    2. odysseus 2009/10/25 23:34 # M/D Permalink

      이럴 때...참~~~~
      군대 그냥 다녀오길 잘 했단 생각이 마구마구...ㅋㅋㅋ
      난 예비군도 이젠 끝났다는...ㅋ

  2. gwlee 2009/10/28 15:13 # M/D Reply Permalink

    아아악~~~

    미워요~ 흑... ㅠ.ㅜ

    ㅋㅋ

Leave a comment

DNA from the Beginning


Cold Spring Harbor Lab에서 만든 학습 사이트

아.... 박은미 교수님께서 이 사이트의
한국어판 미러링 사이트를 만드셨었는데;;
가끔 잘 사용하셨는데... ㅎㅎ

DNA from the Beginning
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by gwlee

2009/10/19 23:52 2009/10/19 23:52
,
Response
0 Trackbacks , 0 Comments
RSS :
http://thegreatgoodplace.com/tt/study/rss/response/257

Trackback URL : http://thegreatgoodplace.com/tt/study/trackback/257

Leave a comment

제길.. NCBI에서 안받아~!!


ㅋㅋ ncbi에서
내가 하도 다운로드 받으니깐
블락시켜서 ftp는 웹브라우저로도 안들어 가짐..
제길.. ㅋㅋ

그래서 결론은 가까운 일본 애용할 예정..
ftp://ftp.hgc.jp/pub/mirror/ncbi/

어차피 지리적으로 가까우니 속도도 쫌 빠른듯..
모 거의 동일하게 미러링 되니... 크게 문제될 것은
없을듯.. 내가 매일 업데이트 하는 것도 아니고.. ㅎㅎ
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by gwlee

2009/08/04 22:20 2009/08/04 22:20
,
Response
0 Trackbacks , 2 Comments
RSS :
http://thegreatgoodplace.com/tt/study/rss/response/211

Trackback URL : http://thegreatgoodplace.com/tt/study/trackback/211

Comments List

  1. odysseus 2009/10/25 18:12 # M/D Reply Permalink

    저도 예전에 웹 서비스 개발하다가

    NCBI에 request를 무자비하게 날렸더니 IP 바로 차단됐던 기억이 나네요.ㅎㅎ

    보름인가 있다가 풀렸던거 같은데..ㅋ

    1. gwlee 2009/10/25 20:54 # M/D Permalink

      전 왜 보름이 지났는데
      안풀릴까요..

      request가 아니라 ftp라서 그런가;;;
      제길.. ㅋ

Leave a comment

WebSat Setting

종오형님의 부탁으로 Websat 셋팅에 대해서 짧지만 긴 블로깅이 시작됩니다.

기본 디렉토리 구조
http://hostname/account/websat/ 로 접속 가능한 상태에서 설명 시작하겠습니다.
/home/account/public_html/websat -> HOME
/var/www/html/account (심볼릭 링크)

대부분 그냥 압축 파일 설정 풀면 다 되던데..;;
이녀석은 꽤나 까다롭습니다. 아직도 제대로 실행이 안되니깐요.

vi HOME/js/wesat.js
....
xmlHttp.open("POST", "/cgi-local/websat/sat.php", true);
>> xmlHttp.open("POST", "cgi-local/sat.php", true);
....
var textoLoading = "<br/><br/><div class=\"labels\" style=\"text
-align: center; font-weight: bold;\">Finding repeats... <br/><img src=\"/websat/imagens/loading.gif\" /></div>";
>> var textoLoading = "<br/><br/><div class=\"labels\" style=\"text-align: center; font-weight: bold;\">Finding repeats... <br/><img src=\"imagens/loading.gif\" /></div>";
....
xmlHttp.open("POST", "/cgi-local/websat/sat.php", true);
>> xmlHttp.open("POST", "cgi-local/sat.php", true);
....
xmlHttp.open("POST", "/cgi-local/websat/primer.php", true);
>> xmlHttp.open("POST", "cgi-local/primer.php", true);
....
window.open("/cgi-local/websat/export.php", "WEBSAT_EXPORT
_POPUP", "");
>> window.open("cgi-local/export.php", "WEBSAT_EXPORT_POPUP", "");
[END]


vi HOME/cgi-local/utils.php
#!/usr/local/bin/php >> 삭제
....
$DIRETORIO_CGI = "/DOC_ROOT/cgi-local/websat/";
>> $DIRETORIO_CGI = "HOME/cgi-local/";
$DIRETORIO_BASE = "/DOC_ROOT/websat/";
>> $DIRETORIO_CGI = "HOME/";
$DIRETORIO_TROLL = "/TROLL_DIRECTORY/troll";
>> $DIRETORIO_TROLL = "/home/account/public_html/troll-0.2-linux-ia32/";
$DIRETORIO_MOTIFS = "/TROLL_DIRECTORY/troll";
>> $DIRETORIO_MOTIFS = "/home/account/public_html/troll-0.2-linux-ia32/";
$DIRETORIO_SEQ_UPLOAD = "/DOC_ROOT/websat/tmp/";
>> $DIRETORIO_SEQ_UPLOAD = "HOME/tmp/";
....
[END]

 

vi HOME/cgi-local/sat.php
#!/usr/local/bin/php >> 삭제
....
$motifFileName  = "motifs" . $pMotifLen . ".dat";
>> $motifFileName  = "motifs.dat";
....
[END]

vi HOME/cgi-local/export.php
#!/usr/local/bin/php >> 삭제
....
[END]

vi HOME/cgi-local/primer.php
#!/usr/local/bin/php >> 삭제
....
[END]



메일에 적은 것과 같이 추가적인 프로그램이 필요합니다요

troll과 primer3
구글님께 검색해보시면 나오고요..
troll의 경우 제 경우에는 lib Error가 나서
libstdc++-libc6.2-2.so.3 설치해 주었습니다.
primer3는 make 해주시고 실행 파일을 troll 폴더로
옮기시면 별도의 파일 수정 없어도 됩니다.


크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by gwlee

2009/07/18 01:29 2009/07/18 01:29
, , ,
Response
0 Trackbacks , 0 Comments
RSS :
http://thegreatgoodplace.com/tt/study/rss/response/172

Trackback URL : http://thegreatgoodplace.com/tt/study/trackback/172

Leave a comment

Metabolic Pathway


In biochemistry, a metabolic pathway is a series of chemical reactions occurring within a cell. In each pathway, a principal chemical is modified by chemical reactions. Enzymes catalyze these reactions, and often require dietary minerals, vitamins, and other cofactors in order to function properly. Because of the many chemicals that may be involved, pathways can be quite elaborate. In addition, many pathways can exist within a cell. This collection of pathways is called the metabolic network. Pathways are important to the maintenance of homeostasis within an organism.

Metabolism is a step-by-step modification of the initial molecule to shape it into another product. The result can be used in one of three ways:

  • To be stored by the cell
  • To be used immediately, as a metabolic product
  • To initiate another metabolic pathway, called a flux generating step.

A molecule called a substrate enters a metabolic pathway depending on the needs of the cell and the availability of the substrate. An increase in concentration of anabolic and catabolic end-products would slow the metabolic rate for that particular pathway.



사용자 삽입 이미지


출처: wikipedia

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by gwlee

2009/07/11 02:14 2009/07/11 02:14
Response
1 Trackbacks , 0 Comments
RSS :
http://thegreatgoodplace.com/tt/study/rss/response/161

Trackback URL : http://thegreatgoodplace.com/tt/study/trackback/161

Trackbacks List

  1. Buy phentermine without a prescription.

    Tracked from Buy phentermine. 2010/03/11 17:51 Delete

    Buy phentermine using pay pal.

Leave a comment

Gene Ontology

Gene Ontology

Biological Process
A biological process is a recognized series of events or molecular functions. A biological process is not equivalent to a pathway, although some GO terms do describe pathways. Mutant phenotypes often reflect disruptions in biological processes.

Cellular Component
The cellular component ontology describes locations, at the levels of subcellular structures and macromolecular complexes. Examples of cellular components include nuclear inner membrane, with the synonym inner envelope, and the ubiquitin ligase complex, with several subtypes of these complexes represented.

Generally, a gene product is located in or is a subcomponent of a particular cellular component. The cellular component ontology includes multi-subunit enzymes and other protein complexes, but not individual proteins or nucleic acids. Cellular component also does not include multicellular anatomical terms.

Molecular Function
The functions of a gene product are the jobs that it does or the "abilities" that it has. These may include transporting things around, binding to things, holding things together and changing one thing into another. This is different from the biological processes the gene product is involved in, which involve more than one activity.

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by gwlee

2009/07/02 16:33 2009/07/02 16:33
, , , ,
Response
0 Trackbacks , 0 Comments
RSS :
http://thegreatgoodplace.com/tt/study/rss/response/157

Trackback URL : http://thegreatgoodplace.com/tt/study/trackback/157

Leave a comment

hmmer Manual

Blast와 함께 보편적으로 사용되는 Hmmer에 대한 설명서
hmmbuild/ hmmcalibrate/ hmmsearch에 대해서 설명
-물론 제가 사용하는 옵션에 대해서만 blast만큼 많지 않음. default로 사용해도 문제가 없으니깐~ 문제를 모르는것일 수도.. ㅎㅎ


hmmbuild: hmm matrix 만들어 줌
hmmbuild [-options] <hmmfile output> <alignment file>

-F 기존에 동일 이름의 hmm파일이 있으면 삭제하고 새로 만듬. 이 옵션 설정 안해주면 hmmbuild 아예 실행안됨.
ex) hmmbuild -F your_file.hmm your_file.aln


-f/ -g/ -s algorithm styles을 설정하는 옵션 이번에 사용하면서 이런 옵션을 처음 봤습니다. 왠지 hmm 멋져보이는 이유는.. ㅋ
ex) hmmbuild -f your_file.hmm your_file.aln


--amino/ --nucleic 강제로 alignment file이 어떤 서열인지 알려주는 것입니다.
ex) hmmbuild --amino your_file.hmm your_file.aln


-sequence weighting strategies
- model construction strategies
위의 무엇인가 고급스러운 것을 최대한 안건드리면 사용하는게
제 생활신조입니다. default인 이유는 그런 이유가 있을 것이다 라는.. ㅋ
개인적으로 잘 아시는 분만 선택해서 사용하시면 됩니다.
사용방법은 옵션을 그냥 적어주시면 됩니다.
ex) Alternative model construction strategies중 --fast 옵션 사용
      hmmbuild --fast your_file.hmm your_file.aln



hmmcalibrate: 만들어진 hmm matrix를 보정 시켜줌 
hmmcalibrate [-options] <hmmfile>
--cpu: 프로그램 수행에 사용할 cpu 갯수 설정, 멀티 코어의 경우 가능. 단, 컴파일 및 바이너리 파일을 받을때 cpu옵션이 on 되어 있는 것을 받아야 사용 가능

--seed: hmmcalibrate를 몇번 수행할것인지 설정 하는 옵션 인듯.

본인의 hmmcalibrate 사용 예

ex) hmmcalibrate your_file.hmm




hmmsearch: 만들어진 hmm 파일을 이용해서 유사한 서열을 찾음.
hmmsearch [-options] <hmmfile> <sequence file or database>

-A <n>: 상위 n개 까지만 출력
-E <x>: blast의 e-value cutoff와 같은 것
-T/ -Z옵션도 안좋은 값을 짤라내기 위한 옵션

--cpu : 프로그램 수행에 사용할 cpu 갯수 설정, 멀티 코어의 경우 가능. 단, 컴파일 및 바이너리 파일을 받을때 cpu옵션이 on 되어 있는 것을 받아야 사용 가능

 --domE <x> / --domT <x>
위의 -T/ -Z의 옵션과 같이 도메인에서 필터링 하는 옵션인듯. 사용 안해봤음. ^^
<sequence file or database>는 fasta format 파일이면 사용 가능함.

본인이 으레 쓰는 방법임. hmmsearch 결과는 '>'로 빼주면 됨.

ex) hmmsearch -E 0.001 your_file.hmm your_database.fasta > result.output


 

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by gwlee

2009/05/21 21:34 2009/05/21 21:34
, , ,
Response
0 Trackbacks , 0 Comments
RSS :
http://thegreatgoodplace.com/tt/study/rss/response/144

Trackback URL : http://thegreatgoodplace.com/tt/study/trackback/144

Leave a comment

Formatdb Manual

NCBI에서 제공되는 formatdb에 대한 메뉴얼
blast-2.2.18을 기준으로 작성합니다. 현재 2.2.20이 나와있죠??
아마 옵션은 거의 동일할것입니다.
-제가 자주 쓰는 옵션 중심으로 설명합니다.

-t  데이터베이스에 Title걸어주는 옵션. 사용안해봐서 모르겠음. Maybe 일반적으로 input_filename에 대해서 결과 파일이 나오는데 결과파일의 이름을 바꿔주는 옵션일 수도.

-i 데이터베이스 만들려고 하는 파일
ex) -i database_file_name


-l formatdb시 생설될 로그 파일 이름 설정 옵션 설정 안해도 formatdb.log라는 파일 생성

-p input 파일 타입 설정. 기본적으로 protein 서열들이 들어올것으로 설정되어 있음.
ex) -p T (inputfile이 protein 서열)
      -p F (inputfile이 nucleotide 서열)


-o Parse 옵션. NCBI에서 받은 정형화된 서열 format이 아니라면 F가 상책
임의의 fasta 파일의 경우 -o T 해주면 formatdb 생성 안됨.
ex) -o {T/F}


input파일이 ASN.1 형식의 파일일 경우 사용되는 옵션
 -a  Input file is database in ASN.1 format (otherwise FASTA is expected)
 -b  ASN.1 database in binary mode
지금까지 한번도 사용안해봄. 대충 감은 오시죠???
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by gwlee

2009/05/21 20:55 2009/05/21 20:55
,
Response
0 Trackbacks , 0 Comments
RSS :
http://thegreatgoodplace.com/tt/study/rss/response/143

Trackback URL : http://thegreatgoodplace.com/tt/study/trackback/143

Leave a comment

Blastpgp Manual

NCBI에서 제공되는 Blastpgp에 대한 메뉴얼
blast-2.2.18을 기준으로 작성합니다. 현재 2.2.20이 나와있죠??
아마 옵션은 거의 동일할것입니다.
제가 많이 사용하는 것을 중심으로 설명합니다.

-d blast를 돌리기 위한 데이터베이스 선택하는 옵션

ex) -d {nr|nt|your_database_file}
blast에서 데이터베이스로 사용하기 위해서는 fasta파일을 formatdb로 blast에 사용할 수 있는 데이터베이스로 변환시켜주어야 사용 가능. formatdb 수행후 붙는 확장자 명은 적어주지 않아도 됨. 파일이름 적음.


-i 검색해보고 싶은 서열(들) 입니다. Query 파일은 fasta format으로 되어있어야 함.

ex) -i your_query_file.seq 현재폴더에 있는 서열 파일
      -i /your/query/directory/query.fasta 다른 폴더에 있는 서열 파일


-e Expectation value를 정해줘서 설정된 값보다 크면 결과에 포함시키지 않는 옵션. 일반적으로 blastn의 경우 1e-06/1e-12, blastp의 경우 1e-03/1e-06으로 설정하고 상황마다 조정하면서 사용.

ex) -e 1e-06


-m 결과 파일을 저장할때의 format 결정 옵션. 일반적으로 로컬에서 blast를 돌리시려는 분들은 대량의 서열을 분석하기 위함이니, -m 8이 결과 파일을 분석하기 용이함,

ex) -m 8


-o Blast 결과 파일 설정하는 옵션

ex) -o your_output_file


-M blast를 실행시킬때 Matrix를 사용하게 하는 옵션. 서열과 서열을 비교하면서 weight를 주어서 peptide 서열을 검색할때 사용됨. 기본값은 BLOSUM62.
Matrix는 /your_blast_folder/data/ 밑에 있음.

ex) -M {BLOSUM62|PAM250|your_matrix}


-a CPU가 1개 이상일때 blast 수행시 하나 이상의 cpu를 사용하게 하는 옵션

ex) -a 2


-j Blastpgp의 반복 옵션. Blast를 한번만 수행하는 것이 아니라 검색한 결과를
기반으로 처음보다 더 좋은 결과를 이끌어 내게끔 검색 횟수를 반복시켜 주는것.

ex) -j {3|5|your_choice}
그냥 blast만 반복하는 것이 아니라 매 결과를 가지고 pssm을 만들어서 다음 blast에 matrix로 참조(아닌가?? ㅋ)



-p PHI-Blast를 위한 프로그램 옵션

ex) -p {patseedp|seedp}


-k blast 수행시 패턴을 이용해서 blast를 수행하게 한다.

ex) -k pattern_file


-file format은 prosite에서 제공되는 형식임.

보기


-B Alignment 파일 사용 옵션. PSI-Blast에서 PSSM 만들때 유저가 관여할 수 있게 해주는것 같음.

ex) -B alignment_file


Alignment file format (clustalw/clustalx의 aln 형식의 파일이면 사용 가능)

보기



참고 사이트 rcc.uga.edu



크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by gwlee

2009/05/21 20:37 2009/05/21 20:37
, , , ,
Response
0 Trackbacks , 0 Comments
RSS :
http://thegreatgoodplace.com/tt/study/rss/response/142

Trackback URL : http://thegreatgoodplace.com/tt/study/trackback/142

Leave a comment

Blastall Manual


NCBI에서 제공되는 Blastall에 대한 메뉴얼
blast-2.2.18을 기준으로 작성합니다. 현재 2.2.20이 나와있죠??
아마 옵션은 거의 동일할것입니다.
제가 많이 사용하는 것을 중심으로 설명합니다.

-p 5개의 기본 blast 프로그램중 하나를 선택하는 옵션
ex) -p {blastn|blastp|blastx|tblastn|tblastx}

-d blast를 돌리기 위한 데이터베이스 선택하는 옵션
ex) -d {nr|nt|your_database_file}
blast에서 데이터베이스로 사용하기 위해서는 fasta파일을 formatdb로 blast에 사용할 수 있는 데이터베이스로 변환시켜주어야 사용 가능. formatdb 수행후 붙는 확장자 명은 적어주지 않아도 됨. 파일이름 적음.

-i 검색해보고 싶은 서열(들) 입니다. Query 파일은 fasta format으로 되어있어야 함.
ex) -i your_query_file.seq 현재폴더에 있는 서열 파일
      -i /your/home/path/query.fasta 다른 폴더에 있는 서열 파일

-e Expectation value를 정해줘서 설정된 값보다 크면 결과에 포함시키지 않는 옵션. 일반적으로 blastn의 경우 1e-06/1e-12, blastp의 경우 1e-03/1e-06으로 설정하고 상황마다 조정하면서 사용.
ex) -e 1e-06

-m 결과 파일을 저장할때의 format 결정 옵션. 일반적으로 로컬에서 blast를 돌리시려는 분들은 대량의 서열을 분석하기 위함이니, -m 8이 결과 파일을 분석하기 용이함,
ex) -m 8


-o Blast 결과 파일 설정하는 옵션
ex) -o your_output_file


-M blast를 실행시킬때 Matrix를 사용하게 하는 옵션. 서열과 서열을 비교하면서 weight를 주어서 peptide 서열을 검색할때 사용됨. 기본값은 BLOSUM62.
Matrix는 /your_blast_folder/data/ 밑에 있음.
ex) -M {BLOSUM62|PAM250|your_matrix}

-a CPU가 1개 이상일때 blast 수행시 하나 이상의 cpu를 사용하게 하는 옵션
ex) -a 2

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by gwlee

2009/05/21 20:12 2009/05/21 20:12
, , ,
Response
0 Trackbacks , 0 Comments
RSS :
http://thegreatgoodplace.com/tt/study/rss/response/141

Trackback URL : http://thegreatgoodplace.com/tt/study/trackback/141

Leave a comment

블로그 이미지

gwLee's Study story

- gwlee



Site Stats

Total hits:
50045
Today:
52
Yesterday:
59