ClustalParser 1.1.2 → 1.1.3
raw patch · 4 files changed
+33/−6 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ClustalParser.cabal +3/−3
- ClustalParserTest.hs +1/−1
- changelog +3/−0
- src/Bio/ClustalParser.hs +26/−2
ClustalParser.cabal view
@@ -5,7 +5,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 1.1.2+version: 1.1.3 synopsis: Libary for parsing Clustal tools output description: Currently contains parsers and datatypes for: clustalw2, clustalo, mlocarna, cmalign .@@ -36,8 +36,8 @@ source-repository this type: git- location: https://github.com/eggzilla/ClustalParser/tree/1.1.2- tag: 1.1.2+ location: https://github.com/eggzilla/ClustalParser/tree/1.1.3+ tag: 1.1.3 library -- Modules exported by the library.
ClustalParserTest.hs view
@@ -9,7 +9,7 @@ args <- getArgs let input_file = (head args) -- read Clustal outputfile- parsedinput <- readStructuralClustalAlignment input_file+ parsedinput <- readClustalAlignment input_file --parsedinput <- readStructuralClustalAlignment input_file --print (entrySequenceIdentifier (head (structuralAlignmentEntries(fromRight parsedinput)))) print (fromRight parsedinput)
changelog view
@@ -1,4 +1,7 @@ -*-change-log-*-+1.1.3 Florian Eggenhofer <florian.eggenhofer@univie.ac.at> 4. July 2015+ * Nucleotide sequences are now parsed by a unified function in line+ with IUPAC nucleotide code 1.1.2 Florian Eggenhofer <florian.eggenhofer@univie.ac.at> 3. July 2015 * Included parsing of optional field in mlocarna clustal output 1.1.1 Florian Eggenhofer <florian.eggenhofer@univie.ac.at> 2. July 2015
src/Bio/ClustalParser.hs view
@@ -150,7 +150,7 @@ genParserClustalEntrySlice = do sliceIdentifier <- many1 (noneOf " ") spacer <- many1 (char ' ')- sliceSequence <- many1 (oneOf ".SNYRUAGCT-uagct")+ sliceSequence <- parseNucleotideAlignmentEntry newline return $ ClustalAlignmentEntrySlice sliceIdentifier sliceSequence (length spacer) @@ -225,7 +225,7 @@ genParserStructuralClustalEntrySlice = do sliceIdentifier <- many1 (noneOf " ") many1 (char ' ')- sliceSequence <- many1 (oneOf ".SNYRUAGCT-uagtc")+ sliceSequence <- parseNucleotideAlignmentEntry newline return $ StructuralClustalAlignmentEntrySlice (filter (/='\n') sliceIdentifier) sliceSequence @@ -254,3 +254,27 @@ -- | Parse Clustal summary (printed to STDOUT) from file readClustalSummary :: String -> IO (Either ParseError ClustalSummary) readClustalSummary = parseFromFile genParserClustalSummary++-- | Parse nucleotide sequence. Allowed letters according to IUPAC+parseNucleotideSequence :: GenParser Char st String+parseNucleotideSequence = do+ nucleotideSequence <- many1 (oneOf "RYSWKMBDHVNATUGCryswkmbdhvnatugc") + return $ nucleotideSequence++-- | Parse nucleotide alignment entry. Allowed letters according to IUPAC and commonly used gap characters+parseNucleotideAlignmentEntry :: GenParser Char st String+parseNucleotideAlignmentEntry = do+ entry <- many1 (oneOf "~_-.RYSWKMBDHVNATUGCryswkmbdhvnatugc") + return $ entry++-- | Parse protein amino acid code sequence. Allowed letters according to IUPAC+parseProteinSequence :: GenParser Char st String+parseProteinSequence = do+ proteinSequence <- many1 (oneOf "ABCDEFGHIKLMNPQRSTVWXYZabcdefghiklmnpqrstvwxyz") + return $ proteinSequence++-- | Parse protein amino acid code alignment entry. Allowed letters according to IUPAC and commonly used gap characters+parseProteinAlignmentEntry :: GenParser Char st String+parseProteinAlignmentEntry = do+ entry <- many1 (oneOf "~_-.ABCDEFGHIKLMNPQRSTVWXYZabcdefghiklmnpqrstvwxyz") + return $ entry