Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2014-11-27 06:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (180 votes), past polls