ngs_tools.fastq.Read

Module Contents

Classes

Quality

Represents a Phred33 quality string.

Read

Class that represents a FASTQ read. Once the class is initialized, with the

exception ngs_tools.fastq.Read.ReadError

Bases: Exception

Common base class for all non-exit exceptions.

class ngs_tools.fastq.Read.Quality(qualities: str)

Represents a Phred33 quality string.

_string

Raw quality string; for internal use only. Use string instead.

property string: str

Raw quality string

property values: str

List of quality values

property probs: str

The quality values converted to probabilities of error

__getitem__(sl: slice) Quality

Return a slice of the Quality

class ngs_tools.fastq.Read.Read(header: str, sequence: str, qualities: str)

Class that represents a FASTQ read. Once the class is initialized, with the header, sequence, and quality strings, they should not be changed (hence using @property). Only Phred33 quality scores are supported, but there is no check for this.

_header

Raw header string, including the @; for internal use only. Use header instead.

_sequence

Raw sequence string; for internal use only. Use sequence instead.

_qualities

Quality instance representing the sequence qualities; for internal use only. Use qualities instead.

property header: str

Raw header string

property sequence: str

Raw sequence string

property qualities: str

Quality instance representing the sequence qualities

property name: str

Name of the sequence, which comes immediately after the @

property attributes: str

String of read attributes. This is the substring after the first space in the header.