Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 having an uproarious good time at the Monastery: (11)
As of 2015-07-31 08:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (275 votes), past polls