View Source Bio.IO.FastQ (bio_elixir v0.2.0)

Allow the input/output of FASTQ formatted files.

This implementation references the documentation from NCBI and uses the Phred scoring 33 offset by default.

Link to this section Summary

Functions

Read a FASTQ formatted file into memory

Link to this section Types

@type quality_encoding() :: :phred_33 | :phred_64 | :decimal
@type read_opts() :: {:quality_encoding, quality_encoding()} | {:type, module()}

Link to this section Functions

Link to this function

read(filename, opts \\ [])

View Source
@spec read(filename :: Path.t(), opts :: [read_opts()]) ::
  {:ok, [{struct(), struct()}]} | {:error, File.posix()}

Read a FASTQ formatted file into memory

Returns a list of tuples where the first struct is the type from the type option, and the second is a Bio.IO.QualityScore struct.

options

Options

  • type - The module for the Sequence type that you want the returned value in. Defaults to Bio.Sequence.DnaStrand. Module should implement the Bio.Behaviours.Sequence behaviour.
  • quality_encoding - Determines the encoding of the quality scores.