skbio.format.sequences.format_fastq_record

skbio.format.sequences.format_fastq_record(seqid, seq, qual, phred_offset=33)[source]

Format a FASTQ record

Parameters:

seqid : bytes

The sequence ID

seq : bytes or subclass of BiologicalSequence

The sequence

qual : np.array of int8

The quality scores

phred_offset : int, either 33 or 64

Set a phred offset

Returns:

bytes : a string representation of a single FASTQ record

Examples

>>> from skbio.format.sequences import format_fastq_record
>>> from numpy import array, int8
>>> seqid = 'seq1'
>>> seq = 'AATTGG'
>>> qual = array([38, 38, 39, 39, 40, 40], dtype=int8)
>>> print format_fastq_record(seqid, seq, qual),
@seq1
AATTGG
+
GGHHII