SequenceRecord Class
SequenceRecord is the lightweight record type returned by SequenceReader.get_records(), holding a single sequence's id, sequence, quality, and source format.
Class Signature
SequenceRecord
Constructor Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
seq |
str |
Required | The sequence string. |
id |
str |
Required | The record identifier. |
qual |
str or None |
Required | Per-base quality string. None for FASTA records, which don't carry quality scores. |
format |
str |
Required | Source format of the record, e.g. "Fasta" or "Fastq". |
Direct Construction
SequenceRecord instances are normally produced by SequenceReader.get_records() rather than constructed directly, but the class can be instantiated manually since all four fields are plain, required arguments.
Attributes
All attributes are readable and writable.
| Attribute | Type | Description |
|---|---|---|
seq |
str |
The sequence string. |
id |
str |
The record identifier. |
qual |
str or None |
Per-base quality string, or None if unavailable (e.g. FASTA records). |
format |
str |
Source format of the record. |
Methods
.__str__()
Returns a human-readable summary of the record, invoked implicitly by str() and print().
- None
str: A multi-line summary containingid,format, the first 20 characters ofseqfollowed by"...", andqual.