User Tools

Site Tools



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

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
variousperlscriptsjapanese [2010/10/01 13:05]
variousperlscriptsjapanese [2010/10/01 13:07]
Line 167: Line 167:
 {{hs_nj_rrs.png?​300|}} {{hs_nj_rrs.png?​300|}}
 +====== Example 4 - ゲノム配列の情報と相関解析 ======
- +以下のスクリプトはさまざまなゲノム情報を解析します。rRNAtRNA遺伝子、CDSの数、ゲノムサイズ、塩基組成[100x(G+C)/​(A+C+G+T)]GC skew [(G-C)/​(G+C)] ​の度合いを示すgcsi ​(GC skew index; ​http://​​pubmed/​19461976)といった解析です。
-====== Example 4- Calculating genome statistics and their correlation analyses ​ ====== +
- +
-The following script calculates various genome statistics such as rRNA gene number, ​tRNA gene number, protein-coding sequence (cds) number, genome size, GC content ​[100x(G+C)/​(A+C+G+T)], and GC skew index (gcsi), which is a measure of the degree of GC skew [(G-C)/​(G+C)] (http://​​pubmed/​19461976).+
 <code perl> <code perl>
-use G;+  ​use G;
-my @key = qw(rRNA tRNA cds size GC gcsi); +  ​my @key = qw(rRNA tRNA cds size GC gcsi); 
-my %stat;+  my %stat;
-open(OUT,">​stat.txt"​);​ +  ​open(OUT,">​stat.txt"​);​ 
-print OUT join("​\t",​ @key), "​\n";​+  print OUT join("​\t",​ @key), "​\n";​
-my $dir = '​g-language-1.8.10/​share/​genomes/';​ +  ​my $dir = '​g-language-1.8.10/​share/​genomes/';​ 
-opendir(DIR,​ $dir) || die "​directory open error:​$!";​ +  opendir(DIR,​ $dir) || die "​directory open error:​$!";​ 
-foreach my $file (sort readdir(DIR)){+  foreach my $file (sort readdir(DIR)){
     next if($file !~ /\.gbk$/);     next if($file !~ /\.gbk$/);
     my $gb = load("​$dir/​$file","​no msg");     my $gb = load("​$dir/​$file","​no msg");
Line 202: Line 200:
     foreach (@key){ push(@tmp, $stat{$_}); }     foreach (@key){ push(@tmp, $stat{$_}); }
     print OUT join("​\t",​ @tmp), "​\n";​     print OUT join("​\t",​ @tmp), "​\n";​
-+  ​
-closedir(DIR);​+  closedir(DIR);​
-close(OUT);+  ​close(OUT);
 </​code>​ </​code>​
-Executing this script generates the following tab-delimited output file ('​stat.txt'​).+このスクリプトを実行すると、以下のようなタブ区切りの結果がファイル('​stat.txt'​)に保存されます。
   rRNA    tRNA    cds     ​size ​   GC      gcsi   rRNA    tRNA    cds     ​size ​   GC      gcsi
Line 220: Line 218:
   4       ​46 ​     2125    1908256 40.8    0.0203799266306591   4       ​46 ​     2125    1908256 40.8    0.0203799266306591
-Scatter plots and correlation coefficients between all pairs of these values can be computed by adding the following ​commands ​(http://​​mogr/​chapter-code/​TwoColorPre.R).+得られた結果の散布図や相関係数は以下のようなRコマンド(http://​​mogr/​chapter-code/​TwoColorPre.R)を書き加えることで計算できます。
 <code perl> <code perl>
-my $rcmd = new Rcmd; +  ​my $rcmd = new Rcmd; 
-my @result = $rcmd->​exec(+  my @result = $rcmd->​exec(
                          qq!                          qq!
                          dat = read.delim("​stat.txt"​)                          dat = read.delim("​stat.txt"​)
Line 236: Line 234:
 </​code>​ </​code>​
-Executing this script generates the following '​'​ file.+実行するとこのようなグラフが生成されます。
 {{genomestatrplot.png?​600|}} {{genomestatrplot.png?​600|}}
-There are a strong positive correlation between rRNA gene number and tRNA gene number (see rRNA-tRNA plot, r=0.9), as reported previouly ​(http://​​cgi/​content/​full/​33/​4/​1141/​FIG4), and between the number of protein-coding sequences and genome size (see cds-size plot, r=1), as reported previouly ​(http://​​content/​101/​9/​3160/​F2.expansion.html).+先行研究で指摘されるように(http://​​cgi/​content/​full/​33/​4/​1141/​FIG4)、rRNA遺伝子数とtRNA遺伝子数に強い正の相関があることがわかります 
variousperlscriptsjapanese.txt · Last modified: 2014/01/18 07:44 (external edit)