bio-0.5.3: A bioinformatics library

Safe HaskellNone

Bio.Sequence.TwoBit

Description

This module implements the 2bit format for sequences.

Based on: http://genome.ucsc.edu/FAQ/FAQformat#format7 Note! the description is not accurate, it is missing a reserved word in each sequence record.

There are also other, completely different ideas of the 2bit format, e.g. http://jcomeau.freeshell.org/www/genome/2bitformat.html

Synopsis

Documentation

decode2Bit :: ByteString -> [Sequence Nuc]Source

Parse a (lazy) ByteString as sequences in the 2bit format.

read2Bit :: FilePath -> IO [Sequence Nuc]Source

Read sequences from a file in 2bit format and | unmarshall/deserialize into Sequence format.

hRead2Bit :: Handle -> IO [Sequence Nuc]Source

Read sequences from a file handle in the 2bit format and | unmarshall/deserialze into Sequence format.

encode2Bit :: [Sequence a] -> ByteStringSource

Marshall from neutral representation to the 2Bit ByteString rep

write2Bit :: FilePath -> [Sequence a] -> IO ()Source

Marshall/serialize [Sequence] into 2Bit format and write to a file.

hWrite2Bit :: Handle -> [Sequence a] -> IO ()Source

Marshall/serialize [Sequence] into 2Bit format and write to a file using handle.