module Bio.ViennaRNAParserLibrary (
parseNucleotideSequence,
parseNucleotideAlignmentEntry,
parseProteinSequence,
parseProteinAlignmentEntry,
readInt,
readDouble
) where
import Text.ParserCombinators.Parsec
readDouble :: String -> Double
readDouble = read
readInt :: String -> Int
readInt = read
parseNucleotideSequence :: GenParser Char st String
parseNucleotideSequence = do
nucleotideSequence <- many1 (oneOf "RYSWKMBDHVNATUGCryswkmbdhvnatugc")
return $ nucleotideSequence
parseNucleotideAlignmentEntry :: GenParser Char st String
parseNucleotideAlignmentEntry = do
entry <- many1 (oneOf "~_-.RYSWKMBDHVNATUGCryswkmbdhvnatugc")
return $ entry
parseProteinSequence :: GenParser Char st String
parseProteinSequence = do
proteinSequence <- many1 (oneOf "ABCDEFGHIKLMNPQRSTVWXYZabcdefghiklmnpqrstvwxyz")
return $ proteinSequence
parseProteinAlignmentEntry :: GenParser Char st String
parseProteinAlignmentEntry = do
entry <- many1 (oneOf "~_-.ABCDEFGHIKLMNPQRSTVWXYZabcdefghiklmnpqrstvwxyz")
return $ entry