User Tools

Site Tools


bioinfo:average_nucleotide_identity_ani_의_계산

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
bioinfo:average_nucleotide_identity_ani_의_계산 [2023/06/26 13:20] – [쌍 형태의 ANI 자료를 매트릭스로 전환하기] hyjeongbioinfo:average_nucleotide_identity_ani_의_계산 [2023/08/11 16:48] (current) – [쌍 형태의 ANI 자료를 매트릭스로 전환하기] hyjeong
Line 53: Line 53:
   $ awk -F"," -v OFS="\t" 'NR!=1{print $1, $2, $4}' Ndb.csv > pairwise.txt   $ awk -F"," -v OFS="\t" 'NR!=1{print $1, $2, $4}' Ndb.csv > pairwise.txt
      
-실습을 통하여 dRep 계산과 MASH matrix를 만드는 방법을 알아보자. {{:bioinfo:ani_r_exercise.zip|}}을 다운로드하여 압축을 풀고 accessions.txt 파일에 수록된 정보를 이용하여 51개의 유전체 파일을 다운로드하고 압축해제 및 파일명 단순화를 한 뒤 dRep v3.4.3을 실행하고 이에 따른 후속 작업을 하는 명령어를 다음에 보였다.+실습을 통하여 dRep 계산과 MASH matrix를 만드는 방법을 알아보자. {{:bioinfo:ani_r_exercise.zip|}}을 다운로드하여 압축을 푼다. accessions.txt 파일에 수록된 정보를 이용하여 //Paenibacillus polymyxa// 및 관련 species에 속하는 51개 균주의 유전체 파일을 다운로드하고 압축해제 및 파일명 단순화를 한 뒤 dRep v3.4.3을 실행한 다음, 이에 따른 후속 작업을 하는 명령어를 다음에 보였다. 특별히 지정하지 않으면 secondary clustering algorithm으로는 [[https://github.com/ParBLiSS/FastANI|fastANI]]가 쓰인다.
  
   # accessions.txt의 각 줄을 분리하여 acc1,acc2,acc3,,,accN 형태의 문자열로 만드는 트릭을 눈여겨보라.   # accessions.txt의 각 줄을 분리하여 acc1,acc2,acc3,,,accN 형태의 문자열로 만드는 트릭을 눈여겨보라.
Line 101: Line 101:
      
   $ awk -F"," -v OFS="\t" 'NR!=1{print $1, $2, $4}' drep_outdir/data_tables/Mdb.csv > pairwise.txt   $ awk -F"," -v OFS="\t" 'NR!=1{print $1, $2, $4}' drep_outdir/data_tables/Mdb.csv > pairwise.txt
- +   
-데이터 파일(pairwise.txt)이 만들어졌으므로 R console에서 후속 작업을 진행한다. +  # 데이터 파일(pairwise.txt)이 만들어졌으므로 R console에서 후속 작업을 진행한다.
   > library(reshape)   > library(reshape)
   > d = read.table(file="pairwise.txt",sep="\t")   > d = read.table(file="pairwise.txt",sep="\t")
Line 123: Line 122:
   > write.table(d3,"dRep_ANI_matrix.txt",sep="\t")   > write.table(d3,"dRep_ANI_matrix.txt",sep="\t")
  
-테스트 완료 --- //[[hyjeong@kribb.re.kr|Haeyoung Jeong]] 2023/06/26 13:19//+drep_outdir/data_tables/Cdb.csv 파일로부터 각 secondary cluster에 몇 개의 genome이 속하는지 알아보자. 
 + 
 +  $ awk -F, 'NR!=1{print $2}' drep_outdir/data_tables/Cdb.csv | sort | uniq -c  
 +       21 1_1 
 +        2 1_2 
 +        9 1_3 
 +       11 1_4 
 +        1 2_1 
 +        1 2_2 
 +        1 2_3 
 +        3 3_1 
 +        1 3_2 
 +        1 3_3 
 + 
 +가장 멤버의 수가 많은 cluster 1_1에는 21개의 genome이 속한다. 
 + 
 +모든 유전체에 대한 pairwise ANI 수치를 빠짐없이 얻고 싶다면 pyani를 이용하는 것이 나을 것이다. Pyani의 결과물에는 ANI 매트릭스가 포함되어 있어서 추가적인 계산은 필요하지 않다. 단, 계산 시간이 더 많이 걸리는 것은 감안해야 한다. dRep의 결과 파일을 조작하여 매트릭스를 만드는 이유는 iTOL 서버 등에서 재사용할 수 있는 tree 파일을 얻기 위함이다. 클러스터링 정보는 이미 PDF로 작성된 리포트 파일로 제공하고 있으니 그것을 활용하면 된다. 반면 pyani는 ANI 매트릭스와 heatmap을 제공하지만 정작 어느 유전체가 어느 클러스터에 속하는지를 나타낸 별도의 파일을 만들어내지는 않는다.
  
 ===== Genome-to-Genome Distance Calculator ===== ===== Genome-to-Genome Distance Calculator =====
bioinfo/average_nucleotide_identity_ani_의_계산.1687753218.txt.gz · Last modified: by hyjeong