module Data.Fasta.ByteString.Lazy.Utility ( getField
, compl
, revCompl
) where
import qualified Data.ByteString.Lazy.Char8 as BL
import Data.Fasta.ByteString.Lazy.Types
import Data.Fasta.Utility
getField :: Int -> Char -> FastaSequence -> BL.ByteString
getField field delim = (!! (field 1)) . BL.split delim . fastaHeader
compl :: FastaSequence -> FastaSequence
compl fs = fs { fastaSeq = BL.map complRules . fastaSeq $ fs }
revCompl :: FastaSequence -> FastaSequence
revCompl fs = fs { fastaSeq = BL.reverse . BL.map complRules . fastaSeq $ fs }