-->

Thursday, February 18, 2016

Using the subroutine generate a dna seq randomly using regular expression.read the length of the seq from user.


print"enter the length \n";
$len=; chomp($len); $seq= randomsequence ($len); print"randon sequence: $dna\n"; sub randomsequence for($i=0;$i<$len;$i++) { $a=int(rand (5)); { $dna.='A' if($a==0); $dna.='T' if($a==1); $dna.='G' if($a==2); $dna.='C' if($a==3); $dna.='U' if($a==4); } } return $dna;

No comments:

Post a Comment

JavaScript Free Code