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