Skip to content

Commit 98c547c

Browse files
authored
Merge pull request #20 from eggzilla/alignmentbootstrap
Alignmentbootstrap
2 parents 59b8a91 + 525a18f commit 98c547c

16 files changed

+920
-569
lines changed

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ before_script:
1111
script:
1212
- docker create --name develcontainer devel
1313
- mkdir RNAlien
14-
- docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.4.3/RNAlien-1.7.1/x/RNAlien/build/RNAlien/RNAlien RNAlien
15-
- docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.4.3/RNAlien-1.7.1/x/RNAlienStatistics/build/RNAlienStatistics/RNAlienStatistics RNAlien
16-
- docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.4.3/RNAlien-1.7.1/x/cmsearchToBed/build/cmsearchToBed/cmsearchToBed RNAlien
17-
- docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.4.3/RNAlien-1.7.1/x/RNAcentralHTTPRequest/build/RNAcentralHTTPRequest/RNAcentralHTTPRequest RNAlien
18-
- docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.4.3/RNAlien-1.7.1/x/RNAlienScan/build/RNAlienScan/RNAlienScan RNAlien
14+
- docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.6.5/RNAlien-1.8.0/x/RNAlien/build/RNAlien/RNAlien RNAlien
15+
- docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.6.5/RNAlien-1.8.0/x/RNAlienStatistics/build/RNAlienStatistics/RNAlienStatistics RNAlien
16+
- docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.6.5/RNAlien-1.8.0/x/cmsearchToBed/build/cmsearchToBed/cmsearchToBed RNAlien
17+
- docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.6.5/RNAlien-1.8.0/x/RNAcentralHTTPRequest/build/RNAcentralHTTPRequest/RNAcentralHTTPRequest RNAlien
18+
- docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.6.5/RNAlien-1.8.0/x/RNAlienScan/build/RNAlienScan/RNAlienScan RNAlien
1919
- cp LICENSE RNAlien
2020
- tar -cvzf RNAlien.tar.gz RNAlien
2121

@@ -24,6 +24,6 @@ deploy:
2424
provider: releases
2525
skip_cleanup: true
2626
api_key: $GITHUB_TOKEN
27-
file: "RNAlien.tar.gz"
27+
file: "RNAlien.tar.gz"
2828
on:
2929
tags: true

Biobase/RNAlien.hs

Lines changed: 120 additions & 55 deletions
Large diffs are not rendered by default.

Biobase/RNAlien/CMstatParser.hs

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
-- | This module contains parsing functions for Infernal programs
2+
3+
module Biobase.RNAlien.CMstatParser (
4+
module Biobase.RNAlien.Types,
5+
parseCMstat,
6+
readCMstat
7+
)
8+
where
9+
10+
import Text.ParserCombinators.Parsec
11+
import Biobase.RNAlien.Types
12+
13+
-- | parse from input filePath
14+
parseCMstat :: String -> Either ParseError CMstat
15+
parseCMstat = parse genParserCMstat "parseCMstat"
16+
17+
-- | parse from input filePath
18+
readCMstat :: String -> IO (Either ParseError CMstat)
19+
readCMstat filePath = do
20+
parsedFile <- parseFromFile genParserCMstat filePath
21+
return parsedFile
22+
23+
genParserCMstat :: GenParser Char st CMstat
24+
genParserCMstat = do
25+
manyTill anyChar (try (string "rel entropy"))
26+
_ <- newline
27+
_ <- char '#'
28+
skipMany1 (char ' ')
29+
skipMany1 (char '-')
30+
_ <- newline
31+
_ <- char '#'
32+
_ <- manyTill anyChar (try (string "#"))
33+
_ <- many1 (try (oneOf " -"))
34+
_ <- newline
35+
skipMany1 space
36+
_statIndex <- many1 digit
37+
skipMany1 space
38+
_statName <- many1 letter
39+
skipMany1 space
40+
_statAccession <- many1 (noneOf " ")
41+
skipMany1 space
42+
_statSequenceNumber <- many1 digit
43+
skipMany1 space
44+
_statEffectiveSequences <- many1 (oneOf "0123456789.e-")
45+
skipMany1 space
46+
_statConsensusLength <- many digit
47+
skipMany1 space
48+
_statW <- many1 digit
49+
skipMany1 space
50+
_statBasepaires <- many1 digit
51+
skipMany1 space
52+
_statBifurcations <- many1 digit
53+
skipMany1 space
54+
_statModel <- many1 letter
55+
skipMany1 space
56+
_relativeEntropyCM <- many1 (oneOf "0123456789.e-")
57+
skipMany1 space
58+
_relativeEntropyHMM <- many1 (oneOf "0123456789.e-")
59+
_ <- newline
60+
_ <- char '#'
61+
_ <- newline
62+
_ <- eof
63+
return $ CMstat (readInt _statIndex) _statName _statAccession (readInt _statSequenceNumber) (readDouble _statEffectiveSequences) (readInt _statConsensusLength) (readInt _statW) (readInt _statBasepaires) (readInt _statBifurcations) _statModel (readDouble _relativeEntropyCM) (readDouble _relativeEntropyHMM)
64+
--
65+
readInt :: String -> Int
66+
readInt = read
67+
68+
readDouble :: String -> Double
69+
readDouble = read

0 commit comments

Comments
 (0)