A SeqFrame Parquet file is ordinary Apache Parquet plus namespaced key-value
metadata on the Arrow/Parquet schema. Readers use that metadata to recover
column roles and biological semantics. Files without it are rejected by
biolm.seqframe.SeqFrame.read().
Current metadata version: ``0.1``.
See Working with SeqFrame for usage and
biolm.seqframe.SeqFrameMetadata for the Python model.
Encoding
Metadata is stored as Parquet/Arrow schema key-value pairs (byte strings):
Key |
Value |
|---|---|
|
Schema version string (currently |
|
UTF-8 JSON object describing column mapping and molecule semantics
(fields below). The JSON may also include a |
Canonical table columns
On import, SeqFrame writes (at least) these columns into the Parquet table:
Column |
Notes |
|---|---|
|
Row identity (source-derived or generated). |
|
Sequence string. |
|
|
|
|
Additional source columns (CSV/JSONL/protocol results, etc.) are preserved
alongside these. sequence_column / id_column in metadata name which
logical columns play those roles (defaults sequence / id).
seqframe.schema fields
Minimal example (JSON stored under seqframe.schema):
{
"sequence_column": "sequence",
"id_column": "id",
"molecule_type": "protein",
"created_by": "biolm-sdk/1.2.0",
"extensions": [],
"version": "0.1"
}
Required for a valid SeqFrame file
Both Parquet keys seqframe.version and seqframe.schema must be present.
Missing either causes SeqFrame.read to raise ValueError.
Fields inside ``seqframe.schema``
Field |
Required |
Notes |
|---|---|---|
|
no |
Default |
|
no |
Default |
|
no |
Default |
|
no |
Optional alphabet hint; omitted from JSON when unset. |
|
no |
Default empty. Typically |
|
no |
Default |
|
no |
Mirrors |
What is not in the schema
Directory / archive layouts (
.seqframe/), remote URIs, and multi-file datasets — those are inventory concerns for Dataset Schema Reference, not SeqFrame table metadata.Prediction/embedding column conventions (enrichment adds ordinary columns).
Lab-in-the-Loop (LLTP) envelopes (
sf.labstubs).
Relationship to datasets
A local dataset may set type: seqframe and
attrs.seqframe_path (relative Parquet path). That is dataset metadata
(Dataset Schema Reference). The Parquet file itself must still carry the SeqFrame
keys above so Dataset.open_seqframe() / SeqFrame.read succeed.
Python
from biolm import SeqFrame
from biolm.seqframe import SeqFrameMetadata, SEQFRAME_VERSION
sf = SeqFrame.from_fasta("proteins.fasta")
sf.io.to_parquet("proteins.parquet")
meta = SeqFrame.read("proteins.parquet").schema
assert meta.version == SEQFRAME_VERSION
assert meta.sequence_column == "sequence"
print(meta.molecule_type, meta.created_by)