What's new in 0.10¶
Altar 0.10 promotes all 17 workspace distributions (altar, altar-identity, and 15 model and source bindings) to 4 - Beta and introduces DataFrame-oriented Python helpers, a local DuckDBScoreStore, single-scan BigQuery WarehouseExportSession exports, typed cross-model reducers, declarative LineageEquivalence, and a unified AltarError hierarchy.
Python DataFrame API and local stores¶
- One-call variant scoring (
score_variants,score_variants_sync): Accepts a list ofchr:pos:ref:altstrings, apandas.DataFrameorpyarrow.Table, or a VCF/TSV path; prepares cache misses, runs the model, persists rows when a store is supplied, and returns a tidypandas.DataFrame. - DataFrame annotation lookups (
fetch_annotations_df,annotations_to_dataframe): Queries multipleAnnotationSourceinstances concurrently and returns a mergedDataFramewith declared column ordering. - Local analytical store (
DuckDBScoreStore): File-backed or in-memory analytical store registered undertype = "duckdb"(and importable fromaltar.results), alongsideSqliteScoreStoreandBigQueryScoreStore. Stores accept nativepandas.DataFrameandpyarrow.Tablebatches directly. - Single-pass FASTA and file helpers:
ReferenceGenomeRunInputs.from_fastacomputes or reuses verification digests in one pass, andResourceReference.from_fileconstructs content-addressed resource references directly from local files. - Root exception hierarchy (
AltarError): Every Altar domain error subclassesaltar.AltarError.
Exports and BigQuery warehouse sessions¶
- Single-scan
WarehouseExportSessionwithresume_key:BigQueryScoreStore.warehouse_export(...)stages job annotations and clustered model rows once acrossexport_wide_tsv,export_wide_parquet,export_long_dataset,export_prioritized_ndjson, andexport_augmentation_buckets. Passingresume_keyretains completed staged tables for 24 hours so retries skip re-scanning base tables (session.resumed). - Server-side wide TSV up to 10,000 columns:
export_wide_tsvpre-pivots<=2,000-column model slices server-side in BigQuery whenever inline SQL would exceed BigQuery's query-text limit, keeping exports up to BigQuery's 10,000-column table ceiling 100% server-side and composing shards in parallel viaStorage.compose_gzip_files. Layouts exceeding 10,000 columns raiseWideExportColumnLimitExceededunlessallow_bucket_fallback=Trueis passed. - Striped wide Parquet (
altar-wide/1):export_wide_parquetandrender_wide_datasetwrite chromosome-partitionedvariants/plus 4,000-columnstripes/Parquet files for multi-thousand-model cohorts, readable as one lazy table throughopen_wide_dataset. - Unified long datasets (
altar-long/1):export_long_datasetwrites per-schemascores/Parquet partitions and an optional deduplicatedvariants/partition across one or multiple stores (stores=). - Compact lineage provenance: Wide TSV/Parquet and prioritized NDJSON omit per-cell
<prefix>_score_lineage_idcolumns by default (include_lineage_ids=Trueopts in) and record per-modelaccepted_lineage_idsand exactobserved_lineage_countsin_models.jsonand dataset manifests. - Typed
CrossModelReducersummaries:TopModel,MaxAbs, andCountWherecompile into single-pass SQL reductions on BigQuery and run identically in Python on local stores. - Lean and selective v2 augmentation buckets:
render_augmentation_bucketssupportsinclude_model_scores=False | True | Sequence[str]forwrite_augmented_vcf.
Declarative lineage equivalence¶
LineageEquivalence: Model bindings declare compatible container image digests or service versions (runtime_classes), retired images (delisted_runtimes), compatible binding versions (equivalent_plugin_versions), and newly added default configuration fields (defaulted_configuration_fields).- Display-label stability: Non-scientific
ScoreColumn.labeledits no longer changeScoreLineage.same_lineage. See Score reuse and lineage.
Broader genome, FASTA, and runtime support¶
- Ensembl FASTAs and non-human contigs: Variant ingestion, left-alignment, and model runtimes resolve Ensembl numeric contig headers (
>1,>X), lowercase VCF/TSV alleles, and non-human nuclear contigs (chr1..99,chrW/Z, Drosophila, yeast), reusing<fasta>.faiindices when present. - 1-based variant validation (
altar-validate-v3):validate_variantvalidates 1-based VCF andVariantKeypositions directly. - Binding and backend additions:
build_multi_fold_scoring_planinaltar.models,altar-sei-resources, generalizedaltar-chrombpnet-resources,e2g_atlasannotation-source registration,SqlDialect.SQLITEpredicate compilation, Modal task cancellation (CancelsTasks), and Kubernetes RFC-1123 label sanitization.
For complete release-by-release notes, see CHANGELOG.md.