注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

Bioinformatics home

 
 
 

日志

 
 

Date of the duplication blocks  

2014-03-27 01:37:36|  分类: Bioinformatics |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
Dnasp
 把多个序列的CDS进行比对先,得到比对文件,导入到Dnasp算Ka 和 Ks, ka/Ks
 Date of the duplication blocks  
 T=Ks/2 λ  (λ, The clock-like rate is1.5e-8 /substitution /synonymous site /year(Balnc and Wofe, 2004)
 

use Bio::AlignIO;
use Bio::Align::DNAStatistics;

my $stats = new Bio::Align::DNAStatistics;
  
 my $in = new Bio::AlignIO(-format => 'fasta',
                            -file   => '123.txt');
  my $alnobj = $in->next_aln;
  my ($seq1id,$seq2id) = map { $_->display_id } $alnobj->each_seq;
  my $results = $stats->calc_KaKs_pair($alnobj, $seq1id, $seq2id);
  print "comparing ".$results->[0]{'Seq1'}." and ".$results->[0]{'Seq2'}."\n";
  for (sort keys %{$results->[0]} ){
      next if /Seq/;
      printf("%-9s %.4f \n",$_ , $results->[0]{$_});
  }

  my $results2 = $stats->calc_all_KaKs_pairs($alnobj);
  for my $an (@$results2){
      print "comparing ". $an->{'Seq1'}." and ". $an->{'Seq2'}. " \n";
      for (sort keys %$an ){
 next if /Seq/;
 printf("%-9s %.4f \n",$_ , $an->{$_});
      }
      print "\n\n";
  }

  my $result3 = $stats->calc_average_KaKs($alnobj, 1000);
  for (sort keys %$result3 ){
      next if /Seq/;
      printf("%-9s %.4f \n",$_ , $result3->{$_});
  }

  S_d
   Number of synonymous mutations between the 2 sequences.
   N_d
   Number of non-synonymous mutations between the 2 sequences.
   S
   Mean number of synonymous sites in both sequences.
   N
   mean number of synonymous sites in both sequences.
   P_s
   proportion of synonymous differences in both sequences given by P_s = S_d/S.
   P_n
   proportion of non-synonymous differences in both sequences given by P_n = S_n/S.
   D_s
   estimation of synonymous mutations per synonymous site (by Jukes-CAntor).
   D_n
   estimation of non-synonymous mutations per non-synonymous site (by Jukes-CAntor).
   D_n_var
   estimation of variance of D_n .
   D_s_var
   estimation of variance of S_n.
   z_value
   calculation of z value.Positive value indicates D_n > D_s,
negative value indicates D_s > D_n.

my $stats = new Bio::Align::DNAStatistics;的方法 http://doc.bioperl.org/releases/bioperl-1.4/Bio/Align/DNAStatistics.html#DESCRIPTION 
Methods
BEGIN Code
newDescriptionCode
distanceDescriptionCode
available_distance_methodsDescriptionCode
D_JukesCantorDescriptionCode
D_F81DescriptionCode
D_KimuraDescriptionCode
D_TamuraDescriptionCode
D_F84DescriptionCode
D_TajimaNeiDescriptionCode
K_JukesCantorDescriptionCode
K_TajimaNeiDescriptionCode
transversionsDescriptionCode
transitionsDescriptionCode
_trans_count_helper
No description
Code
_build_nt_matrix
No description
Code
_check_arg
No description
Code
pairwise_statsDescriptionCode
calc_KaKs_pairDescriptionCode
calc_all_KaKs_pairsDescriptionCode
calc_average_KaKsDescriptionCode
_run_bootstrap
No description
Code
_resample
No description
Code
_get_av_ds_dn
No description
Code
jk
No description
Code
jk_var
No description
Code
analyse_mutations
No description
Code
count_diffs
No description
Code
get_syn_changesDescriptionCode
count_syn_sites
No description
Code
get_syn_sites
No description
Code
  评论这张
 
阅读(660)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017