Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Parsing .2bit DNA files

by blokhead (Monsignor)
on Mar 06, 2008 at 05:49 UTC ( #672371=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    my @CONV = glob( "{T,C,A,G}" x 4 );
    my $dna = join "", @CONV[ unpack "C*", $raw ];
  2. or download this
    ## takes 16 bits (= 8 bases = unsigned short) at a time
    my @CONV = glob( "{T,C,A,G}" x 8 );
    my $dna = join "", @CONV[ unpack "S*", $raw ];
  3. or download this
    substr($dna, $_, $mblock{$_}, lc(substr($dna, $_, $mblock{$_})))
  4. or download this
    substr($dna, $_, $mblock{$_}) ^= (" " x $mblock{$_});

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://672371]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2016-10-26 00:52 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (330 votes). Check out past polls.