sequence-formats-1.6.7.0: A package with basic parsing utilities for several Bioinformatic data formats.
Safe HaskellSafe-Inferred
LanguageHaskell2010

SequenceFormats.Fasta

Description

Module to read and parse through a Fasta file. The Fasta format is defined here: https://en.wikipedia.org/wiki/FASTA_format

Synopsis

Documentation

readNextFastaEntry :: MonadIO m => Producer ByteString m () -> m (Chrom, Producer ByteString m (Producer ByteString m ())) Source #

This function takes a Bytestring-Producer over a Fasta-file, reads in the first header and then returns a produer over its sequence. The return of that producer is the Bytestring-Producer of the rest of the fasta file.

loadFastaChrom :: Handle -> Chrom -> IO (Producer ByteString IO ()) Source #

A function to select out a specific chromosome from a Fasta File. Expects a file handle to the file and a chromosome. Note that by Chromosome I simply denote a fasta header line, as is the case for example for the human reference genome. Returns a Bytestring-Producer over the single sequence followed the specified header (the chromosome).