首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > perl python >

寻觅DNAmotif小程序

2012-10-18 
寻找DNAmotif小程序@point([36,0,112,200,0,112,18,18,22,0,0,0,200,112,], #A[0,0,0,0,200,0,9,0,0,0,0,

寻找DNAmotif小程序
@point=(
  [36,0,112,200,0,112,18,18,22,0,0,0,200,112,], #A
  [0,0,0,0,200,0,9,0,0,0,0,0,0,0,], #C
  [0,0,0,0,0,22,0,9,0,200,0,0,0,22,], #G
  [72,200,22,0,0,0,27,27,112,0,200,200,0,0,], #T
);
$count=1;
$dna_filename=listeria;
unless(-e $dna_file){
  print "File \"$dna_filename\" doesn\'t seem to exist!!\n";
  exit;
}
unless(open (DNAFILE, $dna_filemane)){
  print "Cannot open file \"$dna_filename\"\n\n";
}
@DNA=<DNAFILE>;
close DNAFILE;
$DNA=join('',@DNA);
$DNA=~s/\s//g;
for($position=0;$position<(length $DNA)-14;$position++){
  $DNAf=substr($DNA,$position,14);
  @DNAf=split('',$DNAfragment);
  for($i=0;$i<14;$i++){
  if ($DNAf[i] eq 'A'){
  $count*=$point[0][i];
}
  elsif($DNAf[i] eq 'C'){
  $count*=$point[1][i];  
}
  elsif($DNAf[i] eq 'G'){
  $count*=$point[2][i];
}
  else{
  $count*=$point[3][i];
}  
  if($count>100000){
  $position1=$position+13;
  print "$position $position1 ";
  print "$DNAf\n";
}

}

可以运行,但每次都说找不到listeria文件,我把这个文件放到这个程序同一个文件夹里的,到底应该放哪里呢?

[解决办法]
cd C:/Perl64/homework
perl your.pl

热点排行