- Fix build problem caused by the recent textproc/hs-tagsoup update

- Port PORTREVISION
- Tidy up pkg-descr

Reported by:	LambdaBSD-exp
Approved by:	jacula (maintainer)
This commit is contained in:
Gabor Pali 2010-05-20 10:39:45 +00:00
parent b4625464ef
commit 955308f810
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=254641
3 changed files with 65 additions and 2 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= bio
PORTVERSION= 0.4
PORTREVISION= 1
CATEGORIES= science haskell
MAINTAINER= jacula@gmail.com

View File

@ -0,0 +1,61 @@
--- ./Bio/Alignment/BlastXML.hs.orig 2009-06-16 12:30:17.000000000 +0200
+++ ./Bio/Alignment/BlastXML.hs 2010-05-20 12:08:16.000000000 +0200
@@ -20,6 +20,8 @@
import Control.Parallel
import Data.List (isPrefixOf)
+type STag = Tag String
+
-- | Parse BLAST results in XML format
readXML :: FilePath -> IO [BlastResult]
readXML fp = do
@@ -38,7 +40,7 @@
in rest `par` first : if null rest then [] else breaks p rest
breaks _ [] = []
-getFrom :: [Tag] -> String -> String
+getFrom :: [STag] -> String -> String
getFrom list tag = let xs = sections (isTagOpenName tag) list
in if null xs || null (head xs) || (null . drop 1 . head) xs
then error ("Couldn't find tag '"++show tag++"' in\n"++showSome list)
@@ -47,11 +49,11 @@
x -> error ("Unexpeced tag: "++ show x)
-- Use pattern match since 'length' is strict, defeating the purpose.
-showSome :: [Tag] -> String
+showSome :: [STag] -> String
showSome a@(_:_:_:_:_:_:_) = (init . show . take 5 $ a)++" ... ]"
showSome a = show a
-xml2br :: [Tag] -> [[Tag]] -> BlastResult
+xml2br :: [STag] -> [[STag]] -> BlastResult
xml2br h is = BlastResult { blastprogram = get "BlastOutput_program"
, blastversion = bv
, blastdate = bd
@@ -64,7 +66,7 @@
where (bv,bd) = B.break (=='[') $ get "BlastOutput_version"
get = B.pack . getFrom h
-iter2rec :: [[Tag]] -> BlastRecord
+iter2rec :: [[STag]] -> BlastRecord
iter2rec (i:hs) = BlastRecord
{ query = B.pack $ get "Iteration_query-def"
, qlength = read $ get "Iteration_query-len"
@@ -73,7 +75,7 @@
where get = getFrom i
iter2rec [] = error "iter2rec: got empty list of sections!"
-hit2hit :: [Tag] -> BlastHit
+hit2hit :: [STag] -> BlastHit
hit2hit hs = BlastHit
{ subject = B.pack $ get "Hit_def"
, slength = read $ get "Hit_len"
@@ -82,7 +84,7 @@
where get = getFrom hs
-hsp2match :: [Tag] -> BlastMatch
+hsp2match :: [STag] -> BlastMatch
hsp2match ms = BlastMatch
{ bits = read $ get "Hsp_bit-score"
, e_val = read $ get "Hsp_evalue"

View File

@ -1,5 +1,6 @@
This is a collection of Haskell data structures and algorithms useful for
building bioinformatics-related tools and utilities.
This is a collection of Haskell data structures and algorithms useful
for building bioinformatics-related tools and utilities.
Current list of features includes: a Sequence data type supporting
protein and nucleotide sequences and conversion between them.