bio-0.3.3.2: A bioinformatics librarySource codeContentsIndex
Bio.Sequence.Fasta
Contents
Reading and writing plain FASTA files
Reading and writing quality files
Combining FASTA and quality files
Counting sequences in a FASTA file
Helper function for reading your own sequences
Description
This module incorporates functionality for reading and writing sequence data in the Fasta format. Each sequence consists of a header (with a > prefix) and a set of lines containing the sequence data.
Synopsis
readFasta :: FilePath -> IO [Sequence]
writeFasta :: FilePath -> [Sequence] -> IO ()
hReadFasta :: Handle -> IO [Sequence]
hWriteFasta :: Handle -> [Sequence] -> IO ()
readQual :: FilePath -> IO [Sequence]
writeQual :: FilePath -> [Sequence] -> IO ()
hWriteQual :: Handle -> [Sequence] -> IO ()
readFastaQual :: FilePath -> FilePath -> IO [Sequence]
hWriteFastaQual :: Handle -> Handle -> [Sequence] -> IO ()
writeFastaQual :: FilePath -> FilePath -> [Sequence] -> IO ()
countSeqs :: FilePath -> IO Int
mkSeqs :: [ByteString] -> [Sequence]
Reading and writing plain FASTA files
readFasta :: FilePath -> IO [Sequence]Source
Lazily read sequences from a FASTA-formatted file
writeFasta :: FilePath -> [Sequence] -> IO ()Source
Write sequences to a FASTA-formatted file. Line length is 60.
hReadFasta :: Handle -> IO [Sequence]Source
Lazily read sequence from handle
hWriteFasta :: Handle -> [Sequence] -> IO ()Source
Write sequences in FASTA format to a handle.
Reading and writing quality files
readQual :: FilePath -> IO [Sequence]Source
Read quality data for sequences to a file.
writeQual :: FilePath -> [Sequence] -> IO ()Source
Write quality data for sequences to a file.
hWriteQual :: Handle -> [Sequence] -> IO ()Source
Combining FASTA and quality files
readFastaQual :: FilePath -> FilePath -> IO [Sequence]Source
Read sequence and associated quality. Will error if the sequences and qualites do not match one-to-one in sequence.
hWriteFastaQual :: Handle -> Handle -> [Sequence] -> IO ()Source
writeFastaQual :: FilePath -> FilePath -> [Sequence] -> IO ()Source
Write sequence and quality data simulatnously This may be more laziness-friendly.
Counting sequences in a FASTA file
countSeqs :: FilePath -> IO IntSource
Helper function for reading your own sequences
mkSeqs :: [ByteString] -> [Sequence]Source
Convert a list of FASTA-formatted lines into a list of sequences. Blank lines are ignored. Comment lines start with are allowed between sequences (and ignored). Lines starting with > initiate a new sequence.
Produced by Haddock version 2.4.2