aboutsummaryrefslogtreecommitdiff
path: root/science/hs-bio
diff options
context:
space:
mode:
authorGabor Pali <pgj@FreeBSD.org>2010-05-20 10:39:45 +0000
committerGabor Pali <pgj@FreeBSD.org>2010-05-20 10:39:45 +0000
commit955308f810174318d041bc9500c0a91c760e774a (patch)
tree2ecb349f2828b5412822efbf196989cefaf4b601 /science/hs-bio
parentb4625464ef3e0449c2bae66b413e9568f481bd5e (diff)
downloadports-955308f810174318d041bc9500c0a91c760e774a.tar.gz
ports-955308f810174318d041bc9500c0a91c760e774a.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)
Notes
Notes: svn path=/head/; revision=254641
Diffstat (limited to 'science/hs-bio')
-rw-r--r--science/hs-bio/Makefile1
-rw-r--r--science/hs-bio/files/patch-Bio__Alignment__BlastXML.hs61
-rw-r--r--science/hs-bio/pkg-descr5
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.