diff options
author | pgj <pgj@FreeBSD.org> | 2010-05-20 18:39:45 +0800 |
---|---|---|
committer | pgj <pgj@FreeBSD.org> | 2010-05-20 18:39:45 +0800 |
commit | d1cd4c950bc12254856ca6039dfd77c603c053d2 (patch) | |
tree | 01f3bb07b9c09200b92a3d3f73cd5045526d94fd /science | |
parent | 2ba9711e19e051b78705cf44fb1105d08aa873d2 (diff) | |
download | freebsd-ports-gnome-d1cd4c950bc12254856ca6039dfd77c603c053d2.tar.gz freebsd-ports-gnome-d1cd4c950bc12254856ca6039dfd77c603c053d2.tar.zst freebsd-ports-gnome-d1cd4c950bc12254856ca6039dfd77c603c053d2.zip |
- 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)
Diffstat (limited to 'science')
-rw-r--r-- | science/hs-bio/Makefile | 1 | ||||
-rw-r--r-- | science/hs-bio/files/patch-Bio__Alignment__BlastXML.hs | 61 | ||||
-rw-r--r-- | science/hs-bio/pkg-descr | 5 |
3 files changed, 65 insertions, 2 deletions
diff --git a/science/hs-bio/Makefile b/science/hs-bio/Makefile index bab8f9f710f5..dc4c59ea63f1 100644 --- a/science/hs-bio/Makefile +++ b/science/hs-bio/Makefile @@ -7,6 +7,7 @@ PORTNAME= bio PORTVERSION= 0.4 +PORTREVISION= 1 CATEGORIES= science haskell MAINTAINER= jacula@gmail.com diff --git a/science/hs-bio/files/patch-Bio__Alignment__BlastXML.hs b/science/hs-bio/files/patch-Bio__Alignment__BlastXML.hs new file mode 100644 index 000000000000..a10e513c21a6 --- /dev/null +++ b/science/hs-bio/files/patch-Bio__Alignment__BlastXML.hs @@ -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" diff --git a/science/hs-bio/pkg-descr b/science/hs-bio/pkg-descr index 4d255476072e..a43395813f95 100644 --- a/science/hs-bio/pkg-descr +++ b/science/hs-bio/pkg-descr @@ -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. |