Displaying 1 result from an estimated 1 matches for "gatta".
Did you mean:
vatta
2009 Jan 09
3
Pack and Unpack Strings in R
...t; '00',
C => '01',
G => '10',
T => '11',
);
my %digmap = (
'00' => "A",
'01' => "C",
'10' => "G",
'11' => "T",
);
my $string = 'GATTA';
$string =~ s/(.)/$charmap{$1}/ge;
my $compressed = pack 'b*', $string;
print "COMP: $compressed\n";
printf "%d bytes\n", length $compressed;
my @data;
# Store the compressed bit into array
push @data, $compressed;
# process the array
foreach my $dat ( @data )...