Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Parsing .2bit DNA files

by bobf (Monsignor)
on Mar 06, 2008 at 04:08 UTC ( #672350=note: print w/replies, xml ) Need Help??

in reply to Parsing .2bit DNA files

Nice example++. Thanks for posting the code.

The 2bit format is used by the BLAT program for aligning DNA sequences. The BLAT suite of programs contains two utilities that might be of interest:

  • faToTwoBit convert Fasta format sequence files to a dense randomly-accessable .2bit format
  • twoBitToFa convert from the .2bit format back to fasta

The twoBitToFa documentation is as follows:

twoBitToFa - Convert all or part of .2bit file to fasta usage: twoBitToFa input.2bit output.fa options: -seq=name - restrict this to just one sequence -start=X - start at given position in sequence (zero-based) -end=X - end at given position in sequence (non-inclusive)

Once the sequence is converted back to fasta format it can be easily manipulated using a variety of tools (Perl, BioPerl, sequence utility programs, etc).

So yes, a utility does exist that meets at least some of your listed requirements. OTOH, another tool in the toolbox, especially if it is pure Perl and/or a snazzy wrapper around a command-line utility, is always welcome. :-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://672350]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2017-01-19 17:45 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (170 votes). Check out past polls.