- or download this
@a=@c=@t=@g=@n=@a2=@c2=@t2=@g2=@n2=();
- or download this
(@a, @c, @t, @g, @n, @a2, @c2, @t2, @g2, @n2) = ();
- or download this
for (my $k=0;$k<$number_positions; $k++) {
my (@a,@c,@t,@g,@n,@a2,@c2,@t2,@g2,@n2);
- or download this
if ($letter1=~ /[aA]/) { ... }
...
- or download this
if (uc $letter1 eq 'A') { ... }
if (uc $letter1 eq 'C') { ... }
if (uc $letter1 eq 'T') { ... }
if (uc $letter1 eq 'G') { ... }
# ...
- or download this
$letter1 = uc $letter1;
...
if ($letter1 eq 'C') { ... }
if ($letter1 eq 'T') { ... }
# ...
- or download this
for (my $k=0;$k<$number_positions; $k++) {
my (%base1, %base2);
...
push @${$base1{$letter1}}, $letter1;
push @${$base2{$letter2}}, $letter2;
- or download this
for (my $k=0;$k<$number_positions; $k++) {
my (%base1, %base2);
# ...
$base1{uc $letter1}++;
$base2{uc $letter2}++;
- or download this
"$number_a" + "$number_c" + "$number_t" + "$number_g" + "$number_n"
- or download this
$number_a + $number_c + $number_t + $number_g + $number_n
- or download this
$base1{A} + $base1{C} + $base1{T} + $base1{G} + $base1{N}
- or download this
my $total1 = $base1{A} + $base1{C} + $base1{T} + $base1{G} + $base1{N}
+;
- or download this
my %percent1 = (
A => ($base{A} * 100) / $total1,
...
G => ($base{G} * 100) / $total1,
N => ($base{N} * 100) / $total1,
);
- or download this
my %percent1 = map { $_ => ( $base{$_} * 100) / $total1 } 'A', 'C', 'T
+', 'G', 'N';
- or download this
my %percent1 = map { $_ => ( $base1{$_} * 100) / $total1 } qw(A C T G
+N);
- or download this
#!/usr/bin/perl
...
}
}
close(OUTPUT);