Sequence-centric dataframes over Parquet, with DuckDB-backed query and enrichment.
Install the optional extra:
$ pip install "biolm-sdk[seqframe]"
(The same DuckDB / pandas / pyarrow stack is also included in biolm-sdk[pipeline].)
A SeqFrame is to biological sequences what a DataFrame is to tabular data. It is complementary to Managing datasets: datasets inventory bags of files; SeqFrame queries, filters, and enriches sequence tables.
Quick start
from biolm import SeqFrame
sf = SeqFrame.from_fasta("proteins.fasta")
sf = sf.query.filter("length < 300").query.limit(10)
sf.io.to_parquet("filtered.parquet")
sf2 = SeqFrame.read("filtered.parquet")
Namespaced APIs
sf.query—filter,select,join,sort,limit,group_bysf.io—to_fasta,to_csv,to_jsonl,to_parquetsf.bio— length / type helpers (translateneeds biopython)sf.models—predict/embedvia the BioLM APIsf.protocols— run a protocol and join results (default join keyid;query.joindefaults tosequence_hash)sf.lab— LLTP convert helpers (to_lltp/from_lltp/merge); orchestration is Lab-in-the-Loop (LLTP) (biolm.lab/biolm lab)
Datasets bridge
Write a SeqFrame into a local dataset (type: seqframe) and open it again:
from biolm.datasets import DatasetClient
client = DatasetClient()
ds = sf.to_dataset("my-proteins", client=client, tags=["design"])
sf2 = ds.open_seqframe()
# or: SeqFrame.from_dataset(ds)
Resolution uses attrs.seqframe_path when set, otherwise exactly one
.parquet file under the dataset.
Parquet metadata (seqframe.version / seqframe.schema) is documented in
SeqFrame Metadata Schema Reference.
Lab-in-the-loop (LLTP) submit / status / results live in Lab-in-the-Loop (LLTP).
See biolm.seqframe package and biolm.seqframe.