Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2016-10-26 19:46 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (346 votes). Check out past polls.