Dataset builders (altar.builders)¶
altar.builders provides streaming readers, chromosome-run checks, minimal allele normalization, and partitioned Parquet writers used by annotation bindings to build dataset releases.
Maturity: 17 Stable, 6 Provisional (23 exports total). Related guides: Add an annotation source · Publish a dataset release.
Summary¶
Functions¶
| Symbol | Description | Maturity |
|---|---|---|
add_release_argument |
Add --release, the upstream data release a builder reads, to parser; its value is args.release. |
Provisional |
build_inputs |
Resolve a builder's inputs: local files, URIs, and standard input once as STDIN, named stdin_name. |
Stable |
build_output |
Make output an empty directory for the body of the with, and delete what the body wrote if it fails. |
Stable |
canonical_chromosome_runs |
Split a batch of records into runs on one chromosome: (canonical chromosome, start, stop) row ranges. |
Provisional |
check_unique_keys |
Reject a unique_key written twice in a partition of output, across inputs or by trimming. |
Stable |
minimal_representations |
Trim a batch of alleles as minimal_representation trims each: return their positions, REFs and ALTs. |
Provisional |
require_rows |
Reject a build that wrote no rows: an empty dataset is a wrong input, not an annotation of nothing. | Stable |
storage_option_connection |
Return a connection with the storage options a builder's KEY=VALUE arguments give, or None for none. |
Provisional |
Classes and contracts¶
| Symbol | Description | Maturity |
|---|---|---|
BuildInput |
One input VCF: a local file, a URI read through fsspec, or standard input when both path and uri are unset. |
Stable |
BuildOutput |
Where a builder writes its dataset: a local directory, or a URI that each input's files are uploaded to. | Provisional |
OpenInput |
A text view of one input, whose compression is read from its first bytes rather than its name. | Stable |
ParquetReleaseMetadata |
How one binding records its data release in the key-value metadata of every Parquet file it builds. | Stable |
PartitionedWriter |
Write one input's rows to <output>/<partition_column>=<chromosome>/<stem>.parquet, one file per chromosome. |
Stable |
RecordOrder |
Require sorted input: each chromosome contiguous, positions non-decreasing within it, no key twice at one. | Stable |
Exceptions and warnings¶
| Symbol | Description | Maturity |
|---|---|---|
TruncatedInputError |
A bgzipped input ended without bgzip's end-of-file block: a download or stream was cut short. | Stable |
Constants¶
| Symbol | Description | Maturity |
|---|---|---|
BUILDER_VERSION_METADATA_FIELD |
The metadata field that records the installed version of the binding that built a dataset. | Stable |
DEFAULT_INPUT_ATTEMPTS |
How many times a builder reads a remote input, or uploads a built file, before it gives up (BuildOutput). |
Provisional |
DEFAULT_STDIN_NAME |
The output name standard input takes when the caller gives none. | Stable |
GENOME_BUILD_METADATA_FIELD |
The metadata field that records the genome build of a dataset's coordinates. | Stable |
LAYOUT_METADATA_FIELD |
The metadata field that records which of a binding's file layouts a dataset has (ParquetReleaseMetadata.layout). |
Stable |
RELEASE_METADATA_FIELD |
The metadata field that records the upstream release a dataset was built from. | Stable |
STDIN |
The input name that reads standard input, so a host can stream a VCF from storage the builder never opens. | Stable |
VARIANT_ID_COLUMN |
The column every built file keys its rows by; by default check_unique_keys rejects a value that occurs twice. |
Stable |
Functions API¶
The dataset-builder kit: the shared pieces of a binding's script that builds an annotation release.
A binding that publishes a precomputed dataset, such as an allele-keyed Parquet release, builds it with these names
from :mod:altar.builders, the supported import path. The modules under altar.plugins that define them are not
public API. The annotation sources that read a built release are in :mod:altar.sources.
A builder lists its inputs (BuildInput, build_inputs; STDIN and DEFAULT_STDIN_NAME for standard
input), opens each through OpenInput (a truncated download raises TruncatedInputError), and writes partitioned
Parquet with PartitionedWriter into the directory build_output prepares, which it clears again if the build
fails. RecordOrder requires sorted input, check_unique_keys refuses a key written twice and require_rows a
build that wrote no rows. Every built file records its release as
ParquetReleaseMetadata, under the RELEASE_METADATA_FIELD, GENOME_BUILD_METADATA_FIELD,
BUILDER_VERSION_METADATA_FIELD and LAYOUT_METADATA_FIELD keys, and keys its rows by VARIANT_ID_COLUMN.
A builder's URI output, its retry count and its storage-option parser (BuildOutput, DEFAULT_INPUT_ATTEMPTS,
storage_option_connection) and the shared --release option (add_release_argument) are provisional and
listed in __provisional__. So is the batch path the AlphaMissense and SpliceAI builders read and write with:
canonical_chromosome_runs and minimal_representations here, and the methods OpenInput.header_lines,
OpenInput.tsv_batches, OpenInput.convert_batches, RecordOrder.advance_batch and
PartitionedWriter.append_batch.
add_release_argument
¶
Add --release, the upstream data release a builder reads, to parser; its value is args.release.
help is the option's help text.
build_inputs
¶
build_inputs(
input_paths: Sequence[str | PathLike[str]],
stdin_name: str | None = None,
*,
connection: Connection | None = None,
) -> list[BuildInput]
Resolve a builder's inputs: local files, URIs, and standard input once as STDIN, named stdin_name.
A URI such as gs://bucket/chr1.vcf.bgz or https://host/chr1.vcf.gz is read in place through fsspec,
opened with connection.storage_options(uri), or with the provider's ambient credentials when there is no
connection; its name is the last segment of its path. A file:// URI is a local file. A missing fsspec or
provider raises an ImportError that names the Altar extra to install.
Raises ValueError when there is no input, standard input is listed twice, stdin_name is given without
STDIN or is not a bare file name, or two inputs would write the same output name; and FileNotFoundError
when a file or a URI does not exist.
build_output
¶
build_output(
output: Path,
*,
overwrite: bool,
partition_column: str,
label: str,
) -> Iterator[Path]
Make output an empty directory for the body of the with, and delete what the body wrote if it fails.
The directory must be empty or absent. With overwrite, a previous build there, <partition_column>=*
directories of Parquet files and nothing else, is deleted first; anything else is refused, naming label as
the build that would not have written it. If the body raises, the output is removed when this call created
it, and emptied otherwise.
canonical_chromosome_runs
¶
Split a batch of records into runs on one chromosome: (canonical chromosome, start, stop) row ranges.
Each spelling is canonicalized once with canonical_chromosome, so 1 and chr1 side by side are one run,
and an invalid name raises its VariantIdentityError. Sorted input has one run per chromosome in a batch;
feed each run's positions to RecordOrder.advance_batch. Provisional, like BuildOutput.
check_unique_keys
¶
check_unique_keys(
output: Path,
*,
unique_key: Sequence[str] = (VARIANT_ID_COLUMN,),
) -> None
Reject a unique_key written twice in a partition of output, across inputs or by trimming.
unique_key is variant_id alone for a dataset of one row per allele, or variant_id and the columns that
tell an allele's records apart, such as a transcript. Keys never span chromosomes, so each
<partition_column>=* directory is checked on its own.
minimal_representations
¶
minimal_representations(
positions: Array, references: Array, alternates: Array
) -> tuple[Array, Array, Array]
Trim a batch of alleles as minimal_representation trims each: return their positions, REFs and ALTs.
The alleles must already have a key ([ACGTN]+, uppercase, REF and ALT different). Only alleles whose REF and
ALT both have more than one base can share a base to trim, so the others are returned as they are and only
those are trimmed, one at a time. Provisional, like BuildOutput.
require_rows
¶
Reject a build that wrote no rows: an empty dataset is a wrong input, not an annotation of nothing.
read says what the build consumed, such as "3 records read, 3 skipped", and hint what to check.
storage_option_connection
¶
storage_option_connection(
pairs: Sequence[str],
) -> Connection | None
Return a connection with the storage options a builder's KEY=VALUE arguments give, or None for none.
A value that reads as JSON other than a string takes that type, so anon=true is a boolean and
target_options={"auto_mkdir": true} a mapping; any other value is a string. Credentials never come from a command line: a key that would carry one,
such as secret or token (other than gcsfs's token=anon and its other credential modes), is refused,
and the provider's ambient credentials are used instead. Provisional, like BuildOutput.
Classes and contracts API¶
The dataset-builder kit: the shared pieces of a binding's script that builds an annotation release.
A binding that publishes a precomputed dataset, such as an allele-keyed Parquet release, builds it with these names
from :mod:altar.builders, the supported import path. The modules under altar.plugins that define them are not
public API. The annotation sources that read a built release are in :mod:altar.sources.
A builder lists its inputs (BuildInput, build_inputs; STDIN and DEFAULT_STDIN_NAME for standard
input), opens each through OpenInput (a truncated download raises TruncatedInputError), and writes partitioned
Parquet with PartitionedWriter into the directory build_output prepares, which it clears again if the build
fails. RecordOrder requires sorted input, check_unique_keys refuses a key written twice and require_rows a
build that wrote no rows. Every built file records its release as
ParquetReleaseMetadata, under the RELEASE_METADATA_FIELD, GENOME_BUILD_METADATA_FIELD,
BUILDER_VERSION_METADATA_FIELD and LAYOUT_METADATA_FIELD keys, and keys its rows by VARIANT_ID_COLUMN.
A builder's URI output, its retry count and its storage-option parser (BuildOutput, DEFAULT_INPUT_ATTEMPTS,
storage_option_connection) and the shared --release option (add_release_argument) are provisional and
listed in __provisional__. So is the batch path the AlphaMissense and SpliceAI builders read and write with:
canonical_chromosome_runs and minimal_representations here, and the methods OpenInput.header_lines,
OpenInput.tsv_batches, OpenInput.convert_batches, RecordOrder.advance_batch and
PartitionedWriter.append_batch.
BuildInput
dataclass
¶
BuildInput(
path: Path | None,
name: str,
uri: str | None = None,
storage_options: Mapping[str, Any] = dict(),
)
One input VCF: a local file, a URI read through fsspec, or standard input when both path and uri are unset.
storage_options open a URI's filesystem; they never enter equality or the text of the input.
name
instance-attribute
¶
The file name, or the name standard input stands for, which names the output and is checked by pattern.
stem
property
¶
Return the output name: name without its .vcf or .tsv, .gz, and .bgz suffixes.
label
property
¶
Return how messages name this input; a URI is named without its query, which may hold a signature.
BuildOutput
¶
BuildOutput(
output: str | PathLike[str],
*,
partition_column: str,
label: str,
metadata: Mapping[str, str],
connection: Connection | None = None,
unique_key: Sequence[str] = (VARIANT_ID_COLUMN,),
)
Where a builder writes its dataset: a local directory, or a URI that each input's files are uploaded to.
output is a local path, a file:// URI, or a URI such as gs://bucket/gnomad-4.1.1-genomes, opened with
connection.storage_options(output) or with the provider's ambient credentials when there is no connection.
Every file the build writes records metadata, its partition directories are <partition_column>=<value>,
and label names the build in messages. unique_key names the columns no two rows of a partition may share
(check_unique_keys): variant_id alone for one row per allele, or variant_id and a column such as a
transcript for a dataset with several records per allele. Provisional: the shape is expected to
change.
Use open around the build. Each input is built by build_input, which reads a remote input again from the
start when its stream fails or is cut short, at most attempts times. A local output is written in place, as
build_output writes it. For a URI output, each input is built in a local scratch directory (under
TMPDIR), its keys are checked there (check_unique_keys), and each finished file is uploaded under a
temporary name and committed, then deleted locally, so the scratch holds one input's files at a time. A
reader of the output never sees a partial file.
A URI output records its progress under _altar_build/ until the build finishes, so running the same
command again after a crash resumes it: the inputs whose files were all committed are skipped (resume), and
the others are built again. An instance is picklable, so worker processes build and upload their own inputs.
resumed
instance-attribute
¶
The names of the inputs resume skipped, because an unfinished build had already committed them.
remote
property
¶
Return whether the output is a URI that files are uploaded to, rather than a local directory.
open
¶
Prepare the output for the body of the with, which builds every input and checks the build.
A local output behaves as build_output: it must be empty or absent, or hold a previous build that
overwrite deletes first, and a failed body deletes everything the build wrote.
A URI output must be empty or absent, or hold an unfinished build of the same release (one whose
_altar_build/build.json records the same metadata, apart from the builder version), which is resumed.
With overwrite, a previous build there, finished or not, is deleted first. Either way, anything a build
does not write (files outside <partition_column>=*/*.parquet and _altar_build/) is refused, and so
is, without overwrite, a finished build or an unfinished build of another release. A failed body keeps
the files already committed, so the same command resumes the build; when the body succeeds,
_altar_build/ is deleted and the output is a finished build.
resume
¶
resume(inputs: Sequence[BuildInput]) -> list[BuildInput]
Return the inputs still to build, in order; set resumed to the names of those skipped.
An input is skipped when the unfinished build open resumes committed every file it wrote. Each one
skipped is logged. A local output, or a fresh one, skips nothing.
build_input
¶
build_input(
source: BuildInput,
attempt: Callable[[Path], Built],
*,
attempts: int = DEFAULT_INPUT_ATTEMPTS,
) -> Built
Build one input with attempt, which writes its files under the directory it is given and lists them.
attempt must delete what it wrote when it fails. When it fails on a remote input with a cut-short or
failed stream (TruncatedInputError, a stream that ended inside a gzip member, or a transient network
error), it is called again on an empty directory after a pause, up to attempts calls in all; after
that an OSError names the input and the last error. Any other error, and any error on a local file or
standard input, is raised at once.
For a local output, attempt writes into the output and its result is returned as it is. For a URI
output, it writes into a fresh scratch directory; the keys in each of its partition files are checked to be
unique, each file is uploaded and committed (each upload tried up to attempts times) and deleted
locally, the input is recorded as committed, and the result's files are replaced by the URIs of the
uploaded files. Must be called inside open, in this process or in a worker process given this instance.
check_unique_keys
¶
Reject a unique_key written twice in a partition of the output, across inputs or by trimming.
A local output is checked in full (check_unique_keys). A URI output's files were each checked before
they were uploaded, so only partitions that hold several files, from several inputs, are checked again,
by reading their key columns from the output; a build of one input per chromosome reads nothing. A
failure leaves the build unfinished: fix the inputs and rebuild with overwrite.
OpenInput
¶
OpenInput(source: BuildInput)
A text view of one input, whose compression is read from its first bytes rather than its name.
Use it as a context manager and read either text, line by line, or header_lines and then tsv_batches,
which parse the rest of the input in bulk; the two views share one stream, so a builder uses one or the other.
Standard input is left open on exit. A URI is streamed through its fsspec filesystem in blocks, never
downloaded whole. After reading to the end, check_complete rejects a bgzipped input that was cut short.
header_lines
¶
Yield the input's lines one at a time, read without reading ahead, so tsv_batches starts after them.
Stop iterating at the last header line; the lines the caller took are not parsed again. Provisional, like
BuildOutput.
tsv_batches
¶
tsv_batches(
column_names: Sequence[str],
*,
block_size: int = _BATCH_BYTES,
) -> Iterator[RecordBatch]
Parse the rest of the input as tab-separated text into record batches of string columns.
Each batch holds the lines of about block_size bytes, parsed by PyArrow's CSV reader on its own threads,
so memory stays bounded however large the input. Every line must have exactly the named columns; there is
no quoting, an empty line is skipped, and an empty field is the empty string, never null. A line with
another number of columns raises ValueError naming the input and the line. A stream that fails or ends
early raises the error the stream raised, such as the EOFError of a cut-short gzip member, which
BuildOutput.build_input retries for a remote input. Provisional, like BuildOutput.
convert_batches
¶
convert_batches(
column_names: Sequence[str],
convert: Callable[[RecordBatch, int], T],
*,
workers: int | None = None,
block_size: int = _BATCH_BYTES,
) -> Iterator[T]
Parse the rest of the input with tsv_batches and yield convert(batch, first_line) for each, in order.
first_line numbers the batch's first row among the data rows, from 1, so convert can name a line in
an error. The conversions run on workers threads (by default up to 8), which overlap because Arrow's
compute releases the GIL, while this generator reads the next batches; at most twice workers batches
are in flight, so memory stays bounded. convert must not change shared state: do what depends on the
order of the input, such as RecordOrder and PartitionedWriter, with the results as they are yielded.
An error raised by convert is raised when its batch's turn comes, and the batches after it are not
converted. Provisional, like BuildOutput.
check_complete
¶
Raise TruncatedInputError if a bgzipped input ended without bgzip's end-of-file block.
ParquetReleaseMetadata
dataclass
¶
ParquetReleaseMetadata(
prefix: str,
distribution: str,
label: str,
command: str,
layout: str | None = None,
)
How one binding records its data release in the key-value metadata of every Parquet file it builds.
prefix namespaces the keys, as in altar_popfreq.; the fields under it are the binding's own, such as a
version and a dataset, or RELEASE_METADATA_FIELD and GENOME_BUILD_METADATA_FIELD. write adds
BUILDER_VERSION_METADATA_FIELD, the installed version of distribution. label names the data in messages
and command is the builder a rejected file should be rebuilt with.
layout names the file layout the binding's source reads, for a binding whose builder changed its columns or
partitions after datasets were built with the old ones. write records it as LAYOUT_METADATA_FIELD, and
read_dataset and check reject a file that records this binding's metadata but another layout, or none,
telling the reader to rebuild it, before they compare any release field: a file of the old layout would
otherwise be read wrong. A file with none of the binding's metadata is refused as before. A binding
whose files never changed layout leaves it None, and nothing is written or checked.
write
¶
Return the metadata to write into a file: fields under prefix, layout, and the builder's version.
read
¶
read(
path: str | PathLike[str],
*,
storage_options: Mapping[str, Any] | None = None,
) -> dict[str, str]
Return the fields a Parquet file records under prefix, without the prefix.
path is a local path or a URI, read as ParquetAllelicRecordBackend reads its dataset, with
storage_options passed to a remote filesystem. Only the file's footer is read.
read_dataset
¶
read_dataset(
dataset: str | PathLike[str],
*,
required: Sequence[str],
storage_options: Mapping[str, Any] | None = None,
) -> dict[str, str]
Return the fields the first Parquet file under dataset records, which must include required.
dataset is a file or a directory searched recursively, as a local path or a URI with storage_options
for its filesystem (see read); the first file in sorted order is read, and a binding's source then holds
the dataset to the release it names with check. For a remote dataset, the next check of the same
dataset with the same options reuses this read instead of listing the dataset and reading the footer
again, so a source that takes its release from the dataset and then checks it reads one footer. Raises
FileNotFoundError when there is no Parquet file and ValueError, naming the missing fields and the
builder to rebuild with, when the file does not record every required field or has another layout.
check
¶
check(
dataset: str | PathLike[str],
expected: Mapping[str, str],
*,
storage_options: Mapping[str, Any] | None = None,
all_files: bool = False,
) -> None
Raise ValueError if the first Parquet file under dataset, or with all_files any, is not expected.
A file fails when it records none of expected's fields, or other values for them, or another layout
than this metadata's. dataset is a file or
a directory searched recursively, as a local path or a URI with storage_options for its filesystem (see
read); a dataset with no Parquet file is left to the backend. Only footers are read.
By default only the first file in sorted order is checked, which is what a source does when it opens a
dataset: a release is identified at the release level, so a later file built from another release is
not caught there, and opening a remote dataset of many files costs one footer read rather than one per
file. When the last read_dataset of the same remote dataset has not been checked yet, its read is
reused and nothing is read. all_files reads every file's footer, as altar pull does to verify a copy
it makes.
PartitionedWriter
¶
PartitionedWriter(
output: Path,
stem: str,
*,
schema: Schema,
partition_column: str,
row_group_rows: int,
metadata: Mapping[str, str],
parquet_options: Mapping[str, Any] | None = None,
)
Write one input's rows to <output>/<partition_column>=<chromosome>/<stem>.parquet, one file per chromosome.
Each row holds every column of schema; the file records metadata in its schema and is written in row
groups of row_group_rows with zstd compression. A file is created when its chromosome's first row arrives
and is written under a .partial name until commit renames it, so a reader never sees a file in progress.
parquet_options are further keyword arguments to pyarrow.parquet.ParquetWriter, such as
use_dictionary=["chr", "score"] and column_encoding={"pos": "DELTA_BINARY_PACKED"} for a column of
increasing positions; they may override compression. Without them a file is written exactly as before the
option existed. Provisional, like append_batch.
append
¶
Buffer one row of chromosome's file.
append_batch
¶
Buffer a table or record batch of chromosome's rows, as append would buffer each row in turn.
The batch holds every column of schema, in any order and with any other columns ignored, each of a type
that casts to the schema's; a non-nullable column must hold no null. Rows keep their order, and the file's
row groups are the same as if the rows had come one at a time, so a builder may mix the two. An empty
batch creates no file. Provisional, like BuildOutput.
commit
¶
Finish every file and return their paths, in the order their chromosomes first appeared.
RecordOrder
¶
Require sorted input: each chromosome contiguous, positions non-decreasing within it, no key twice at one.
Call advance with each record's chromosome and position, then claim with each allele key it yields. A
key is (position, reference, alternate) after trimming, so a trimmed key may move past the record's
position; a key repeated across positions is caught by check_unique_keys over the finished output. kind
names the input format in messages, such as "TSV".
advance
¶
Move to the next record, rejecting one out of order.
advance_batch
¶
Move past a run of records on one chromosome at once, as advance would for each position in turn.
Rejects the same out-of-order record, with the same message, as advance called once per position.
Provisional, like BuildOutput.
claim
¶
Record an allele key at the current position, rejecting one already written there.
Exceptions and warnings API¶
The dataset-builder kit: the shared pieces of a binding's script that builds an annotation release.
A binding that publishes a precomputed dataset, such as an allele-keyed Parquet release, builds it with these names
from :mod:altar.builders, the supported import path. The modules under altar.plugins that define them are not
public API. The annotation sources that read a built release are in :mod:altar.sources.
A builder lists its inputs (BuildInput, build_inputs; STDIN and DEFAULT_STDIN_NAME for standard
input), opens each through OpenInput (a truncated download raises TruncatedInputError), and writes partitioned
Parquet with PartitionedWriter into the directory build_output prepares, which it clears again if the build
fails. RecordOrder requires sorted input, check_unique_keys refuses a key written twice and require_rows a
build that wrote no rows. Every built file records its release as
ParquetReleaseMetadata, under the RELEASE_METADATA_FIELD, GENOME_BUILD_METADATA_FIELD,
BUILDER_VERSION_METADATA_FIELD and LAYOUT_METADATA_FIELD keys, and keys its rows by VARIANT_ID_COLUMN.
A builder's URI output, its retry count and its storage-option parser (BuildOutput, DEFAULT_INPUT_ATTEMPTS,
storage_option_connection) and the shared --release option (add_release_argument) are provisional and
listed in __provisional__. So is the batch path the AlphaMissense and SpliceAI builders read and write with:
canonical_chromosome_runs and minimal_representations here, and the methods OpenInput.header_lines,
OpenInput.tsv_batches, OpenInput.convert_batches, RecordOrder.advance_batch and
PartitionedWriter.append_batch.
TruncatedInputError
¶
Bases: ValueError
A bgzipped input ended without bgzip's end-of-file block: a download or stream was cut short.
A remote input that ends this way is read again (BuildOutput.build_input); a local file is rejected.
Constants API¶
The dataset-builder kit: the shared pieces of a binding's script that builds an annotation release.
A binding that publishes a precomputed dataset, such as an allele-keyed Parquet release, builds it with these names
from :mod:altar.builders, the supported import path. The modules under altar.plugins that define them are not
public API. The annotation sources that read a built release are in :mod:altar.sources.
A builder lists its inputs (BuildInput, build_inputs; STDIN and DEFAULT_STDIN_NAME for standard
input), opens each through OpenInput (a truncated download raises TruncatedInputError), and writes partitioned
Parquet with PartitionedWriter into the directory build_output prepares, which it clears again if the build
fails. RecordOrder requires sorted input, check_unique_keys refuses a key written twice and require_rows a
build that wrote no rows. Every built file records its release as
ParquetReleaseMetadata, under the RELEASE_METADATA_FIELD, GENOME_BUILD_METADATA_FIELD,
BUILDER_VERSION_METADATA_FIELD and LAYOUT_METADATA_FIELD keys, and keys its rows by VARIANT_ID_COLUMN.
A builder's URI output, its retry count and its storage-option parser (BuildOutput, DEFAULT_INPUT_ATTEMPTS,
storage_option_connection) and the shared --release option (add_release_argument) are provisional and
listed in __provisional__. So is the batch path the AlphaMissense and SpliceAI builders read and write with:
canonical_chromosome_runs and minimal_representations here, and the methods OpenInput.header_lines,
OpenInput.tsv_batches, OpenInput.convert_batches, RecordOrder.advance_batch and
PartitionedWriter.append_batch.
BUILDER_VERSION_METADATA_FIELD
module-attribute
¶
The metadata field that records the installed version of the binding that built a dataset.
DEFAULT_INPUT_ATTEMPTS
module-attribute
¶
How many times a builder reads a remote input, or uploads a built file, before it gives up (BuildOutput).
DEFAULT_STDIN_NAME
module-attribute
¶
The output name standard input takes when the caller gives none.
GENOME_BUILD_METADATA_FIELD
module-attribute
¶
The metadata field that records the genome build of a dataset's coordinates.
LAYOUT_METADATA_FIELD
module-attribute
¶
The metadata field that records which of a binding's file layouts a dataset has (ParquetReleaseMetadata.layout).
RELEASE_METADATA_FIELD
module-attribute
¶
The metadata field that records the upstream release a dataset was built from.
STDIN
module-attribute
¶
The input name that reads standard input, so a host can stream a VCF from storage the builder never opens.
VARIANT_ID_COLUMN
module-attribute
¶
The column every built file keys its rows by; by default check_unique_keys rejects a value that occurs twice.