bioinformatics-toolkit 0.3.0 → 0.3.1
raw patch · 11 files changed
+30/−96 lines, 11 files
Files
- LICENSE +1/−1
- bioinformatics-toolkit.cabal +1/−1
- src/Bio/Data/Bed.hs +0/−12
- src/Bio/Data/Fasta.hs +3/−17
- src/Bio/GO/GREAT.hs +2/−4
- src/Bio/GO/Parser.hs +8/−8
- src/Bio/RealWorld/ENCODE.hs +2/−15
- src/Bio/RealWorld/UCSC.hs +0/−13
- src/Bio/Utils/Functions.hs +0/−12
- src/Bio/Utils/Misc.hs +4/−4
- src/Bio/Utils/Overlap.hs +9/−9
LICENSE view
@@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 Kai Zhang+Copyright (c) 2014-2016 Kai Zhang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
bioinformatics-toolkit.cabal view
@@ -1,5 +1,5 @@ name: bioinformatics-toolkit-version: 0.3.0+version: 0.3.1 synopsis: A collection of bioinformatics tools description: A collection of bioinformatics tools license: MIT
src/Bio/Data/Bed.hs view
@@ -1,17 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-}------------------------------------------------------------------------------------ |--- Module : $Header$--- Copyright : (c) 2014 Kai Zhang--- License : MIT---- Maintainer : kai@kzhang.org--- Stability : experimental--- Portability : portable---- functions for processing BED files--------------------------------------------------------------------------------- module Bio.Data.Bed ( BEDLike(..)
src/Bio/Data/Fasta.hs view
@@ -1,18 +1,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-}------------------------------------------------------------------------------------ |--- Module : $Header$--- Copyright : (c) 2014 Kai Zhang--- License : MIT --- Maintainer : kai@kzhang.org--- Stability : experimental--- Portability : portable---- Functions for processing Fasta files---------------------------------------------------------------------------------- module Bio.Data.Fasta ( FastaLike(..) , fastaReader@@ -24,10 +12,9 @@ import Conduit class FastaLike f where- fromFastaRecord :: ( B.ByteString -- ^ record header- , [B.ByteString] -- ^ record body- )- -> f+ -- | Convert a FASTA record, consisting of a record header and a record body,+ -- to a specific data type+ fromFastaRecord :: (B.ByteString, [B.ByteString]) -> f readFasta :: FilePath -> Source (ResourceT IO) f readFasta fl = fastaReader fl =$= mapC fromFastaRecord@@ -35,7 +22,6 @@ -- | non-stream version, read whole file in memory readFasta' :: FilePath -> IO [f] readFasta' fl = runResourceT $ readFasta fl $$ sinkList--- writeFasta :: FilePath -> [f] -> IO () {-# MINIMAL fromFastaRecord #-} instance BioSeq s a => FastaLike (s a) where
src/Bio/GO/GREAT.hs view
@@ -30,10 +30,8 @@ instance Default AssocRule where def = BasalPlusExtension 5000 1000 1000000 -type Gene a = ( ( B.ByteString -- ^ chromosome- , Int -- ^ tss- , Bool -- ^ is forward stranded- ), a)+-- | A Gene consists of the chromosome name, TSS, strandness and an associated value.+type Gene a = ((B.ByteString, Int, Bool), a) -- | given a gene list and the rule, compute the rulatory domain for each gene getRegulatoryDomains :: AssocRule -> [Gene a] -> [(BED3, a)]
src/Bio/GO/Parser.hs view
@@ -4,16 +4,16 @@ , readOWLAsMap ) where -import Control.Arrow ((&&&))+import Control.Arrow ((&&&)) import qualified Data.ByteString.Lazy.Char8 as L-import qualified Data.HashMap.Strict as M-import Data.Maybe-import qualified Data.Text as T-import Data.Text.Encoding (encodeUtf8)-import Text.XML.Expat.Proc-import Text.XML.Expat.Tree+import qualified Data.HashMap.Strict as M+import Data.Maybe+import qualified Data.Text as T+import Data.Text.Encoding (encodeUtf8)+import Text.XML.Expat.Proc+import Text.XML.Expat.Tree -import Bio.GO+import Bio.GO readOWL :: FilePath -> IO [GO] readOWL fl = do
src/Bio/RealWorld/ENCODE.hs view
@@ -1,18 +1,5 @@ {-# LANGUAGE OverloadedStrings #-}------------------------------------------------------------------------------------ |--- Module : $Header$--- Description : Search and download data from ENCODE project--- Copyright : (c) Kai Zhang--- License : MIT --- Maintainer : kai@kzhang.org--- Stability : experimental--- Portability : portable---- Search and download data from ENCODE project---------------------------------------------------------------------------------- module Bio.RealWorld.ENCODE ( KeyWords(..) , search@@ -53,8 +40,8 @@ import Bio.RealWorld.ID -data KeyWords = KeyWords (S.Seq String) -- ^ terms- (S.Seq String) -- ^ constraints+-- | Terms and constraints.+data KeyWords = KeyWords (S.Seq String) (S.Seq String) instance Default KeyWords where def = KeyWords S.empty $ S.fromList ["frame=object", "limit=all"]
src/Bio/RealWorld/UCSC.hs view
@@ -1,17 +1,4 @@ {-# LANGUAGE OverloadedStrings #-}------------------------------------------------------------------------------------ |--- Module : $Header$--- Description : Search and download data from ENCODE project--- Copyright : (c) Kai Zhang--- License : MIT---- Maintainer : kai@kzhang.org--- Stability : experimental--- Portability : portable---- resources from UCSC--------------------------------------------------------------------------------- module Bio.RealWorld.UCSC ( UCSCGene(..)
src/Bio/Utils/Functions.hs view
@@ -1,17 +1,5 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-}------------------------------------------------------------------------------------ |--- Module : $Header$--- Copyright : (c) 2014 Kai Zhang--- License : MIT---- Maintainer : kai@kzhang.org--- Stability : experimental--- Portability : portable---- some useful functions--------------------------------------------------------------------------------- module Bio.Utils.Functions ( ihs
src/Bio/Utils/Misc.hs view
@@ -7,10 +7,10 @@ , binBySizeOverlap ) where -import Data.ByteString.Char8 (ByteString)-import Data.ByteString.Lex.Fractional (readSigned, readExponential)-import Data.ByteString.Lex.Integral (readDecimal)-import Data.Maybe (fromMaybe)+import Data.ByteString.Char8 (ByteString)+import Data.ByteString.Lex.Fractional (readExponential, readSigned)+import Data.ByteString.Lex.Integral (readDecimal)+import Data.Maybe (fromMaybe) readInt :: ByteString -> Int readInt x = fst . fromMaybe errMsg . readSigned readDecimal $ x
src/Bio/Utils/Overlap.hs view
@@ -4,16 +4,16 @@ , coverage ) where -import qualified Data.ByteString.Char8 as B-import qualified Data.IntervalMap.Strict as IM-import qualified Data.HashMap.Strict as M-import qualified Data.Vector.Unboxed as V+import Bio.Data.Bed+import Conduit+import Control.Monad+import qualified Data.ByteString.Char8 as B+import Data.Function+import qualified Data.HashMap.Strict as M+import qualified Data.IntervalMap.Strict as IM+import Data.List+import qualified Data.Vector.Unboxed as V import qualified Data.Vector.Unboxed.Mutable as VM-import Data.List-import Data.Function-import Bio.Data.Bed-import Control.Monad-import Conduit -- | convert lines of a BED file into a data structure - A hashmap of which the -- | chromosomes, and values are interval maps.