For my personal use, I have always used faToTwobit to create 2bit files.
I wrote most of the original seq module in bx-python (circa 2005?), adapting it
from a nib format reader that James Taylor wrote. The main goal at the time
was to read DNA from a variety of sequence file formats. Writing wasn't
considered, since at the time I had no need to write such files.
I'm pretty sure there have been improvements made, but if writing has been
added, I expect it would be supported in lib/bx/seq/seq.py . But I see no
write support there, so I think it has never been added.
It wouldn't take much to write 2bit in python. Format spec is here:
On Feb 2, 2012, at 6:30 PM, Amit Indap wrote:
> I had a question about the bx python API. I'm using its twobit API to
> read sequence intervals from a two bit file.
> If I had sequence I wanted to write to a 2bit file, is there a way to
> do that with bx-python API? Otherwise, I was going to use FaToTwoBit
> program from jksrc,
> but it would be nice if there is a way I can do it from python.
> Thanks for the help!
> The Galaxy User list should be used for the discussion of
> Galaxy analysis and other features on the public server
> at usegalaxy.org. Please keep all replies on the list by
> using "reply all" in your mail client. For discussion of
> local Galaxy instances and the Galaxy source code, please
> use the Galaxy Development list:
> To manage your subscriptions to this and other Galaxy lists,
> please use the interface at:
The Galaxy User list should be used for the discussion of
Galaxy analysis and other features on the public server
at usegalaxy.org. Please keep all replies on the list by
using "reply all" in your mail client. For discussion of
local Galaxy instances and the Galaxy source code, please
use the Galaxy Development list:
To manage your subscriptions to this and other Galaxy lists,
please use the interface at: