Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Parsing .2bit DNA files

by BrowserUk (Pope)
on Mar 06, 2008 at 04:37 UTC ( #672356=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        $dna = join '', 
               map $conv{$_},
               unpack('(A2)*', unpack("B" . $bytes * BITS_PER_BYTE , $raw)
    +);
    
  2. or download this
    my %bitMap  =  ('00' => 'T', '01' => 'C', '10' => 'A', '11' => 'G');
    my @byteMap = map{ 
        join '', map $bitMap{ $_ }, unpack '(A2)4', unpack 'B8', chr 
    } 0 .. 255;
    
  3. or download this
    ## Omit the braces add a comma for a negligable further improvement
    my $DNA = join '', map{ $byteMap[ $_ ] } unpack 'C*', $raw;
    
  4. or download this
    my %bitMap  =  ('00' => 'T', '01' => 'C', '10' => 'A', '11' => 'G');
    my @byteMap = map{ 
    ...
    ...
    
    my $DNA = join '', map{ $wordMap[ $_ ] } unpack 'n*', $raw;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://672356]
help
Chatterbox?
Discipulus needs to virtualize a xp home machine..
[Discipulus]: someone has experience with this? as destiation i think i'll go with virtualbox on centos
[Lady_Aleena]: Why XP?
[Discipulus]: it is for my father: it is impossible to tell him to learn a newer OS
[Lady_Aleena]: To tell him or teach him?
Discipulus anyway xp is still the best lowend game machine
[Discipulus]: both: everyting must be identical in the new v-machine
[Lady_Aleena]: So putting a nice DE or WM up on a Linux machine is not an option?
[Discipulus]: i need some converter to have directly an OVF format directly: at the moment i'm trying with vmware converter standalone

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2017-05-22 18:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?