bio-0.5.2: A bioinformatics library

Safe Haskell | Safe-Infered

Bio.Alignment.BED

Description

Model the BED format, according to the spec at http:genome.ucsc.eduFAQFAQformat#format1

Synopsis

- data BED = BED {
  - chrom :: ByteString
  - chromStart :: Offset
  - chromEnd :: Offset
  - name :: ByteString
  - score :: Int
  - strand :: Dir
  - thickStart :: Offset
  - thickEnd :: Offset
  - itemRGB :: (Word8, Word8, Word8)
  - blockSizeStart :: [(Offset, Offset)]
  }
- data Dir
  - = Fwd
  - | Rev
- readBED :: FilePath -> IO [BED]
- writeBED :: FilePath -> [BED] -> IO ()

# Documentation

data BED

The BED data type Note that the specification allows a variable number of fields, with only the three first required. This definition requires all fields to be present.

Constructors

BED |

Fields

chrom :: ByteString
chromStart :: Offset
chromEnd :: Offset
name :: ByteString
score :: Int

  Range 0..1000

strand :: Dir
thickStart :: Offset
thickEnd :: Offset
itemRGB :: (Word8, Word8, Word8)

  Available BED files appear to not support this format. RGB is therefore ignored (read and written as '0')

blockSizeStart :: [(Offset, Offset)]

  Lists of lenght blockCount, blockStarts are relative to chromStart

Instances

Show BED |

data Dir

Yet another direction data structure.

Constructors

Fwd |
Rev |

Instances

Eq Dir |
Read Dir |
Show Dir |

readBED :: FilePath -> IO [BED]

writeBED :: FilePath -> [BED] -> IO ()