Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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 drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2016-02-06 03:40 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (215 votes), past polls