Processor
A processor converts raw structure files on disk into Awkward Array records
that Bioverse can shard and index. Processors walk a directory tree, filter by
file extension (.pdb, .cif, …), and parse each file in parallel via
process_file().
Adapters call processors during download() to
turn downloaded archives into uniform records before a dataset is released.
Different processors handle different file formats; see
Processors.
- class bioverse.processor.Processor[source]
Bases:
ABCParse raw structure files into Awkward Array records.
Processors convert files on disk (PDB, mmCIF, SDF, …) into uniform
ak.Recordobjects that adapters can shard intoBatchinstances. Subclasses declare supported extensions viavalid_extensionsand implementprocess_file().Call
process()to walk a directory tree and parse all matching files in parallel.Examples
from bioverse.processors.pdb import PdbProcessor records = PdbProcessor.process("/data/pdb_structures") for record in records: print(record.scene_id, len(record.residue_token))