packages feed

biophd-0.0.7: src/Bio/Sequence/PhdTag.hs

module Bio.Sequence.PhdTag where 
import System.Locale
import Data.Time
import Data.Time.Format
import Bio.Core.Sequence (Offset, unOff)

data PhdTag = PhdTag
              { tagType              :: String
              , source               :: String
              , unpaddedReadPosition :: (Offset, Offset)
              , date                 :: LocalTime
              , comment              :: Maybe String
              } deriving (Eq)

instance Show PhdTag where
  show (PhdTag tt so urp da co) = ("\n" ++) $ unlines $ map (" " ++)
                                  [ "TYPE: "              ++ show tt
                                  , "SOURCE: "            ++ show so
                                  , "UNPADDED_READ_POS: " ++ (show $ unOff $ fst urp) ++ " " ++ (show $ unOff $ snd urp)
                                  , "DATE: "              ++ show da
                                  , "COMMENT: "           ++ show co ]