Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my $mismatch = get_mismatches (\@dna, \@complement); sub get_mismatches { my ($dna, $complement) = @_; print "<P>TESTING TESTING TESTING SEGMENT::::: @$ +dna <P> COMP::::::: @$complement<P><P>"; my $i; my %good_pairs = ( 'A' => 'T', 'C' => 'G', 'G' => 'C', 'T' => 'A', ); foreach (my $i =0; $i < @$dna; $i++) { if ($dna[$i] ne $good_pairs {$complement[$i]}) { print "SUB - MISMATCH: $dna[$i-1]$dna[$i]/$complement[$i- +1]$complement[$i]\n"; push @seg_mismatches,"$dna[$i-1]$dna[$i]/$complement[$i-1 +]$complement[$i]\n"; print "SUB - MISMATCH: $dna[$i]$dna[$i+1]/$complement[$i] +$complement[$i+1]\n"; push @seg_mismatches, "$dna[$i]$dna[$i+1]/$complement[$i] +$complement[$i+1]\n"; push @seg_mis, "$dna[$i-1]$dna[$i] $dna[$i]$dna[$i+1]\n"; } } return (@seg_mismatches); }
20030325 Edit by Corion: Changed title
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: subroutines!!!
by grantm (Parson) on Mar 25, 2003 at 11:26 UTC | |
by Anonymous Monk on Mar 25, 2003 at 11:35 UTC | |
by davorg (Chancellor) on Mar 25, 2003 at 12:16 UTC | |
|
Re: subroutines!!!
by davorg (Chancellor) on Mar 25, 2003 at 11:27 UTC | |
|
Re: subroutines!!!
by dragonchild (Archbishop) on Mar 25, 2003 at 13:57 UTC | |
|
Re: subroutines!!!
by zby (Vicar) on Mar 25, 2003 at 11:29 UTC |