BiobaseInfernal-0.5.4.0: Infernal data structures and tools

Biobase.Infernal.Taxonomy.Import

Contents

Description

Iteratee-based importer. Provides a simple fromFile function that produces both maps in one pass.

Synopsis

Documentation

iSpeciesMap :: Monad m => Iteratee [Species] m (Map ByteString Species)Source

Provide name-based lookup as the most-common usage scenario.

TODO there are 9 duplicates in the names, let's find them and see what is going on

iTaxIdMap :: Monad m => Iteratee [Species] m (Map Int Species)Source

And a map based on taxon id

eneeSpecies :: Monad m => Enumeratee ByteString [Either String Species] m aSource

Imports taxonomy data.

mkSpecies :: Parser SpeciesSource

Given a ByteString, create a species entry.

NOTE The taxonomy format is, for each species, a line consisting of: taxid - tab - species name - tab - semicolon separated list of classification names - dot - end of line.

fromFile :: FilePath -> IO (Map ByteString Species, Map Int Species)Source

Convenience function: given a taxonomy file, produce both maps simultanously.

Testing