skbio.format.sequences.format_fastq_record

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

Format a FASTQ record

Note

Deprecated in scikit-bio 0.2.0-dev format_fastq_record will be removed in scikit-bio 0.3.0. It is replaced by write, which is a more general method for serializing FASTQ-formatted files. write supports multiple file formats by taking advantage of scikit-bio’s I/O registry system. See skbio.io for more details.

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