Help for this page

Select Code to Download


  1. or download this
    Str:  AGACGAGTA
    Mask: 001111100
    ---------------
    Res:  AGxxxxxTA
    
  2. or download this
    use strict;
    use warnings;
    
    ...
    my $mask=''; vec ($mask,$_,1)=1 for (2..6);
    print "Str:  $seq\n";
    print "Mask: ", unpack ("b*",$mask),"\n";
    
  3. or download this
    Str:  AGACGAGTA
    Mask: 00111110
    
  4. or download this
    #Solution 1:
    my @mask = split "",unpack ("b*",$mask);
    ...
    print "Res:  ";
    print map {! shift @mask ? $_ : "x"} @seq;
    print "\n";
    
  5. or download this
    # Solution 2:
    my $s_mask = unpack ("b*",$mask);
    ...
      $pos++;
    }
    print "\n";
    
  6. or download this
    Res: AGxxxxxTA