foreach my $nucleotide(@nucleotide_array) { chomp $nucleotide; my($T,$G,$C,$A); #These mutations rates reflect 10^-5 if ($nucleotide eq 'A'){ # $T=.1;$G=.2;$C=.3;$A=.7; my $score = (int rand(100000))/1 +00000; if( $score>=00000 && $score<=.00 +033){ $nucleotide='T';} if( $score>=.000334 && $score<=. +00066){ $nucleotide='G';} if( $score>=.00067 && $score<=.0 +0099){ $nucleotide='C';} # if( $score>=.300 && $score<=1.0 +0){ Do NOTHING } } } elsif ($nucleotide eq 'T'){ # $A=.1;$G=.2;$C=.3;$T=.7; my $score = (int rand(100000))/1 +00000; if( $score>=00000 && $score<=.00 +0333){ $nucleotide='A';} if( $score>=.00034 && $score<=.0 +0066){ $nucleotide='G';} if( $score>=.00067 && $score<=.0 +0099){ $nucleotide='C';} #if( $score>=.300 && $score<=1.0 +0){ DO NOTHING } } } elsif ($nucleotide eq 'C'){ # $T=.1;$G=.2;$A=.3;$C=.7; my $score = (int rand(100000))/1 +00000; if( $score>=00000 && $score<=.00 +033){ $nucleotide='T';} if( $score>=.00034 && $score<=.0 +0066){ $nucleotide='G';} if( $score>=.00067 && $score<=.0 +0099){ $nucleotide='A';} #if( $score>=.300 && $score<=1.0 +0){ #No mutation} } elsif ($nucleotide eq 'G'){ # $T=.1;$A=.2;$C=.3;$G=.7; my $score = (int rand(100000))/1 +00000; if( $score>=00000 && $score<=.00 +033){ $nucleotide='T';} if( $score>=.00034 && $score<=.0 +0066){ $nucleotide='A';} if( $score>=.00067 && $score<=.0 +0099){ $nucleotide='C';} #if( $score>=.300 && $score<=1.0 +0){ #No mutation} } $new_string= $new_string . $nucleotide;
In reply to Re^2: Increasing the efficiency of a viral clonal expansion model
by ZWcarp
in thread Increasing the efficiency of a viral clonal expansion model
by ZWcarp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |