User Tools

Site Tools


cog_assignment

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
cog_assignment [2021/08/10 11:53] – [NCBI COG software를 이용한 query protein의 COG assignment 방법] hyjeongcog_assignment [2021/08/10 12:51] (current) – [Functional classification] hyjeong
Line 140: Line 140:
  
 ==== COGNITOR 실행 ==== ==== COGNITOR 실행 ====
 +이 과정에서는 COGs.csv라는 파일이 필요하다. 2003-2014 버전과 2020 버전의 컬럼 수가 다르므로 COG software를 쓰려면 2020 버전 파일을 고쳐야 한다. 여기서 약간의 시행착오를 겪었다. 두 버전의 컬럼 설명이 완전히 1:1 대응하듯이 일치하지를 않아서 그야말로 '대충' 전환을 하였다.
   $ COGcognitor -i=./BLASTcogn -t=COGs.csv -q=GenQuery.p2o.csv -o=GenQuery.COG.csv   $ COGcognitor -i=./BLASTcogn -t=COGs.csv -q=GenQuery.p2o.csv -o=GenQuery.COG.csv
 +다음은 전환용 스크립트. 작동의 완전성을 보장하지 못한다. 특히 마지막 컬럼은 2003-2014 버전의 설명에 의하면 'The membership-class field indicates the nature of the match between the sequence and the COG consensus'라 하여 0부터 3까지의 값을 갖는데, 나는 무조건 0(the domain matches the COG consensus)로 해 버렸다.
 +  #!/usr/bin/perl
 +  #
      
 +  open COG2020, 'cog-20.cog.csv';
 +  open OUT, '>COGs.csv';
 +  while (<COG2020>) {
 +      chomp;
 +      my @temp = split /,/, $_;
 +      if ($temp[12] =~ /^(\d+)\-(\d+)$/) {
 +         ($start, $end) = ($1, $2);
 +      }
 +      print OUT join ',', $temp[2], $temp[1], $temp[2], $temp[3], $start, $end, $temp[6], 0 . ",\n";
 +  }
 +
 모든 것이 끝났다. **GenQuery.COG.csv**에 최종적으로 할당된 COG 정보가 수록된다. 주의할 점은 하나의 Query protein에 대하여 복수의 COG가 부여될 수 있다. 이러한 경우에는 5번째 필드인 cognitor-score를 가지고 1등을 선별해야 할 것이다. 모든 것이 끝났다. **GenQuery.COG.csv**에 최종적으로 할당된 COG 정보가 수록된다. 주의할 점은 하나의 Query protein에 대하여 복수의 COG가 부여될 수 있다. 이러한 경우에는 5번째 필드인 cognitor-score를 가지고 1등을 선별해야 할 것이다.
  
Line 169: Line 183:
  
 ==== Functional classification ==== ==== Functional classification ====
-COG의 각 functional class에 몇 개씩의 유전자가 분포하는지를 집계하고 싶다면 [[cogclass2018.pl|COGclass2018.pl]] 스크립트를 이용하라. 하나의 COG에 대하여 복수의 functional class가 있는 경우는 무작위로 하나만 선택한다.+COG의 각 functional class에 몇 개씩의 유전자가 분포하는지를 집계하고 싶다면 [[cogclass2018.pl|COGclass2018.pl]] 스크립트를 이용하라. 하나의 COG에 대하여 복수의 functional class가 있는 경우는 무작위로 하나만 선택한다. 이게 최선이 아닌 줄은 알지만 어쩔 수가 없어서...
  
   $ COGclass2018.pl GenQuery.COG.csv.bestHit > COGclass   $ COGclass2018.pl GenQuery.COG.csv.bestHit > COGclass
cog_assignment.1628564022.txt.gz · Last modified: 2021/08/10 11:53 by hyjeong