Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    open(FILE,"align.input") or die "can not open file: $!";
    ...
            ($str1,$str2)=();
        }
    }
    
  2. or download this
            my @mismatch;
            for($i=0;$i<=length($str1);$i++)
    ...
            if(@mismatch) {
                print "mismatch: @mismatch\n";
            }
    
  3. or download this
    >hit    tstart    tend    #query    qstart    matches    qend    score
    +    probability    mismatches
    >gi|122939163|ref|NM_000165.3|    1595    1630    SNPSTER4_104_308EFAA
    +XX:1:1:1694:128    1    35    36    -10    1.000000    1
    mismatch: 30.GA
    >gi|113412254|ref|XR_018775.1|    1578    1613    SNPSTER4_104_308EFAA
    +XX:1:1:1608:94    1    36    36    0    0.090884    0
    mismatch: 3.GT 34.TG
    
  4. or download this
            my $xor = $str1 ^ $str2;
            while($xor =~ /[^\0]/g) {
                my $i = pos($xor) - 1;  # or: $-[0]
                push @mismatch, "$i." . substr($str1,$i,1) . substr($str2,
    +$i,1);
            }