VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

Why Science? | BCF and Binary Variant Call Storage

Three students sit around open books and worksheets at a classroom table, reading, writing and discussing the work together.

eduKateSG · Why Science?

Process large variant callsets efficiently in binary form—without losing the header dictionary, allele meanings or interpretation boundaries

Choose the closest route, then return to the full index whenever you need the wider evidence chain.

Full section index · Science Learning Hub

Science learning becomes powerful when students can tell a measured pattern from a model, a statistical decision from a mechanism, and a useful lead from a finished conclusion. Binary Call Format, or BCF, is the binary counterpart of VCF. The current canonical specification is BCF 2.2 within the VCF 4.5 document. A BCF file carries the standard VCF header in text and encodes site and genotype information in typed binary records. String identifiers are commonly represented through header dictionaries, and records may be stored in BGZF blocks for compression and indexed access. BCF improves computational efficiency; it does not strengthen a weak call, repair incompatible headers or supply clinical meaning. This guide supports Primary Science, PSLE Science, Secondary Science, O-Level Science and STEM education as a longform evidence-reading route; it is not medical advice, a laboratory protocol, an admission promise or a career guarantee.

Related eduKate reading: GA4GH VRS and computable variant representation; bcftools/csq and haplotype-aware variant consequences; gnomAD and population allele-frequency context; Science Learning Hub; Education Hub; STEM Education; Careers by Subject Capability.

Primary and official sources checked on 12 October 2026: Official VCF version 4.5 and BCF version 2.2 specification, 25 February 2026; Official BCF version 2 quick reference; Official SAMtools HTS specifications repository; 2026 Singapore–Cambridge O-Level Biology syllabus; MOE G2/G3 Lower Secondary Science teaching and learning syllabus; 2026 MOE G2 Computing syllabus. Standards, binary encodings and recommendations can change, so preserve the dated documentation, reference and software versions used.

A deeper reading route

BCF keeps the VCF data model while changing the physical representation. A program can avoid repeatedly tokenising long text rows and can store integers, floats and vectors in typed binary form. The gain is especially useful for cohorts with many samples and genotype fields. Yet any human review normally decodes selected records, so reliable conversion and header preservation remain central to transparency.

The header is both documentation and dictionary. BCF includes the familiar VCF header text, but internal records often refer to contigs, filters, INFO keys and FORMAT keys through integer dictionary positions. The specification explains that dictionary meaning depends on the presence and order of header lines unless explicit IDX values are used. Reordering or deleting definitions carelessly can change what numeric codes mean.

Each record is conceptually split into shared site data and an individual section containing genotype data for samples. This separation supports efficient processing but creates strict size, type and cardinality rules. Typed descriptors can encode scalar or vector values, missing values and end-of-vector markers. A robust reader must distinguish those states rather than turning every sentinel into zero.

BCF positions are stored internally in zero-based form even though the VCF text model presents POS as one-based. Conversion software performs that translation. Custom tools and mixed-format pipelines must make the boundary explicit, because an unnoticed off-by-one error can attach an allele to the wrong base while leaving a file structurally valid.

The specification says BCF parsers should perform BGZF encoding and must support raw and BGZF-encoded files; compression is recommended but not required. BGZF enables indexed regional access, while CSI or related index practices depend on coordinate order and exact bytes. An index is therefore a derived companion, never a substitute for validating the callset.

For students, BCF shows why abstraction matters. The readable VCF row and the efficient BCF record can express the same structured claim, just as a fraction and decimal can express the same value. Good science checks that the translation preserves meaning and remembers that a faster calculation is not a stronger conclusion.

Production BCF pipelines should test not only one successful conversion but difficult edge cases: multiple ALT alleles, variable ploidy, missing genotypes, phased values, symbolic alleles, long vectors and custom header fields. These fixtures expose dictionary, cardinality and sentinel mistakes before a population-scale run. The same suite should be repeated after library upgrades because binary compatibility and logical equivalence are related but different promises.

A four-step claim ladder for this method
StageQuestionEvidenceResponsible output
DescribeWhich VCF schema and dictionary apply?Text header, contigs, INFO and FORMAT definitionsAn interpretable binary context
EncodeHow are site and sample values stored?Typed shared and individual record sectionsEfficient binary variant records
AccessHow can large callsets be compressed and queried?BGZF, coordinate order and indexFast regional retrieval
VerifyDid representation preserve meaning?Round trips, hashes, schema and truth fixturesA trustworthy binary callset

Section 1 of 36

1. Start with the processing question

BCF is useful when a large VCF-like callset needs compact, typed and efficient computation. The scientific meaning remains the variant and genotype data model.

Working checkpoint — BCF: Write which operations need BCF and which semantics must survive. Keep binary file and index hashes, decoded header dictionary, reference, codec, commands and validation fixtures together.

For a classroom model, encode fictional variant cards with an explicit codebook.

Contents · Next section

Section 2 of 36

2. Use the current specification

The canonical VCF 4.5 document includes BCF 2.2 and is dated 25 February 2026. The repository also publishes a concise BCFv2 quick reference.

Working checkpoint — binary variant record: Pin both specification and library versions. Read every performance result beside round-trip fidelity, type preservation, missingness and sample order.

For future study, connect binary data to genetics, mathematics and computing while checking official pathways separately.

Contents · Previous section · Next section

Section 3 of 36

3. Treat BCF as VCF’s binary counterpart

BCF represents the same core site, allele, annotation and genotype concepts as VCF in binary form. File format is not an evidence grade.

Working checkpoint — typed value: Compare logical records rather than extensions. Preserve conversion failures and unsupported fields; a successfully decoded subset is not the complete callset.

For scientific writing, report BCF and VCF versions, header, reference, conversion and round-trip validation.

Contents · Previous section · Next section

Section 4 of 36

4. Check magic and version bytes

BCF starts with defined magic and major and minor version values, followed by a length-delimited header. A .bcf suffix alone is insufficient.

Working checkpoint — header dictionary: Validate type and version before decoding records. Separate typed binary efficiency from variant-call quality, biological interpretation and clinical meaning.

For students, ask how a short code finds its meaning in the shared dictionary.

Contents · Previous section · Next section

Section 5 of 36

5. Preserve the VCF header text

The BCF header contains standard VCF header lines from fileformat through #CHROM, terminated as specified. It defines names and types used later.

Working checkpoint — BGZF: Archive and diff the decoded header. Treat dictionary positions, type descriptors and coordinate translations as scientific inputs: one silent shift can change the record.

For parents, ask whether faster processing was checked for faithful translation and privacy.

Contents · Previous section · Next section

Section 6 of 36

6. Require complete definitions

BCF relies on fully typed INFO and genotype definitions in the header. An undeclared body field cannot be decoded safely by guesswork.

Working checkpoint — variant genotype: Fail conversion when schema definitions are missing or conflicting. Keep binary file and index hashes, decoded header dictionary, reference, codec, commands and validation fixtures together.

For a classroom model, encode fictional variant cards with an explicit codebook.

Contents · Previous section · Next section

Section 7 of 36

7. Understand the string dictionary

BCF commonly replaces repeated strings with integer references to a dictionary derived from header definitions. Compact codes depend on shared ordering.

Working checkpoint — BCF: Treat header order as representation-critical. Read every performance result beside round-trip fidelity, type preservation, missingness and sample order.

For future study, connect binary data to genetics, mathematics and computing while checking official pathways separately.

Contents · Previous section · Next section

Section 8 of 36

8. Use IDX with discipline

Optional IDX values can make dictionary positions explicit and help preserve codes when header entries change. If used, the numbering rules must remain consistent.

Working checkpoint — binary variant record: Validate uniqueness, continuity and implicit-versus-explicit agreement. Preserve conversion failures and unsupported fields; a successfully decoded subset is not the complete callset.

For scientific writing, report BCF and VCF versions, header, reference, conversion and round-trip validation.

Contents · Previous section · Next section

Section 9 of 36

9. Treat PASS as a defined dictionary value

The specification gives PASS a defined implicit position in the filter dictionary. A custom encoder that treats it like an arbitrary string can break interoperability.

Working checkpoint — typed value: Test PASS, dot and named failures separately. Separate typed binary efficiency from variant-call quality, biological interpretation and clinical meaning.

For students, ask how a short code finds its meaning in the shared dictionary.

Contents · Previous section · Next section

Section 10 of 36

10. Map contigs by dictionary

Binary records use contig identifiers from the header dictionary. A numeric chromosome code means nothing outside that exact header.

Working checkpoint — header dictionary: Resolve rid values before displaying coordinates. Treat dictionary positions, type descriptors and coordinate translations as scientific inputs: one silent shift can change the record.

For parents, ask whether faster processing was checked for faithful translation and privacy.

Contents · Previous section · Next section

Section 11 of 36

11. Separate shared and individual data

A BCF record contains shared site information and may contain individual genotype data for all samples. Genotype data can be absent when the source has none.

Working checkpoint — BGZF: Do not infer samples merely from a site section. Keep binary file and index hashes, decoded header dictionary, reference, codec, commands and validation fixtures together.

For a classroom model, encode fictional variant cards with an explicit codebook.

Contents · Previous section · Next section

Section 12 of 36

12. Read record lengths safely

Shared and individual sections are length-delimited. Corrupt or malicious lengths can cause overreads, excessive allocation or record desynchronisation.

Working checkpoint — variant genotype: Bound every allocation and confirm section endpoints. Read every performance result beside round-trip fidelity, type preservation, missingness and sample order.

For future study, connect binary data to genetics, mathematics and computing while checking official pathways separately.

Contents · Previous section · Next section

Section 13 of 36

13. Understand zero-based internal POS

BCF stores position internally as zero based, while VCF text displays the first base as position 1. Correct codecs translate at the boundary.

Working checkpoint — BCF: Add explicit off-by-one fixtures to every custom converter. Preserve conversion failures and unsupported fields; a successfully decoded subset is not the complete callset.

For scientific writing, report BCF and VCF versions, header, reference, conversion and round-trip validation.

Contents · Previous section · Next section

Section 14 of 36

14. Read rlen with allele context

The reference length field supports interval calculations but must be interpreted with REF and structural-variant conventions. It is not a universal biological event length.

Working checkpoint — binary variant record: Compare rlen, REF and any END or SVLEN annotations. Separate typed binary efficiency from variant-call quality, biological interpretation and clinical meaning.

For students, ask how a short code finds its meaning in the shared dictionary.

Contents · Previous section · Next section

Section 15 of 36

15. Decode typed values

BCF uses type descriptors for integers, floats, characters and vectors. The descriptor may include or precede a vector length.

Working checkpoint — typed value: Reject values that violate the header-declared type. Treat dictionary positions, type descriptors and coordinate translations as scientific inputs: one silent shift can change the record.

For parents, ask whether faster processing was checked for faithful translation and privacy.

Contents · Previous section · Next section

Section 16 of 36

16. Distinguish missing from end of vector

BCF defines sentinel representations for missing values and for padding shorter vectors to a common width. Neither should become a measured zero.

Working checkpoint — header dictionary: Preserve both states through analytics and text conversion. Keep binary file and index hashes, decoded header dictionary, reference, codec, commands and validation fixtures together.

For a classroom model, encode fictional variant cards with an explicit codebook.

Contents · Previous section · Next section

Section 17 of 36

17. Use the smallest valid integer type

Encoders can choose compact integer widths while respecting reserved sentinel values and range limits. Overflow changes data silently if unchecked.

Working checkpoint — BGZF: Range-check before narrowing every value. Read every performance result beside round-trip fidelity, type preservation, missingness and sample order.

For future study, connect binary data to genetics, mathematics and computing while checking official pathways separately.

Contents · Previous section · Next section

Section 18 of 36

18. Preserve floating-point special values

BCF defines binary representations for missing and vector-end floating values. General numeric libraries can mishandle payload-specific NaNs.

Working checkpoint — variant genotype: Test sentinels before ordinary arithmetic. Preserve conversion failures and unsupported fields; a successfully decoded subset is not the complete callset.

For scientific writing, report BCF and VCF versions, header, reference, conversion and round-trip validation.

Contents · Previous section · Next section

Section 19 of 36

19. Encode alleles and IDs faithfully

REF, ALT and IDs belong to the shared site section and must preserve ordering because genotype allele indexes depend on ALT order.

Working checkpoint — BCF: Round-trip multi-allelic and symbolic examples. Separate typed binary efficiency from variant-call quality, biological interpretation and clinical meaning.

For students, ask how a short code finds its meaning in the shared dictionary.

Contents · Previous section · Next section

Section 20 of 36

20. Encode INFO by dictionary and type

Each INFO entry uses a dictionary key and typed value. The header’s Number rule still governs allele-related cardinality.

Working checkpoint — binary variant record: Validate Number=A, R, G and variable-length values. Treat dictionary positions, type descriptors and coordinate translations as scientific inputs: one silent shift can change the record.

For parents, ask whether faster processing was checked for faithful translation and privacy.

Contents · Previous section · Next section

Section 21 of 36

21. Encode FORMAT across samples

FORMAT fields identify a typed layout repeated across samples, often padded to a maximum vector width. Sample order comes from the header.

Working checkpoint — typed value: Check every sample count and padding boundary. Keep binary file and index hashes, decoded header dictionary, reference, codec, commands and validation fixtures together.

For a classroom model, encode fictional variant cards with an explicit codebook.

Contents · Previous section · Next section

Section 22 of 36

22. Decode GT specially

BCF genotype alleles are encoded values that also carry phase information. They are not raw VCF allele numbers stored unchanged.

Working checkpoint — header dictionary: Use the specification formula and phased fixtures. Read every performance result beside round-trip fidelity, type preservation, missingness and sample order.

For future study, connect binary data to genetics, mathematics and computing while checking official pathways separately.

Contents · Previous section · Next section

Section 23 of 36

23. Keep ploidy visible

Different samples can have different allele counts, requiring padding in a common FORMAT vector. End-of-vector markers preserve ploidy boundaries.

Working checkpoint — BGZF: Do not count padding as an allele. Preserve conversion failures and unsupported fields; a successfully decoded subset is not the complete callset.

For scientific writing, report BCF and VCF versions, header, reference, conversion and round-trip validation.

Contents · Previous section · Next section

Section 24 of 36

24. Use BGZF deliberately

BCF may be raw or BGZF encoded; compression is recommended but not required. A reader must support the encodings required by the specification.

Working checkpoint — variant genotype: Detect encoding from bytes and test both modes. Separate typed binary efficiency from variant-call quality, biological interpretation and clinical meaning.

For students, ask how a short code finds its meaning in the shared dictionary.

Contents · Previous section · Next section

Section 25 of 36

25. Sort and index the exact file

Regional indexes assume coordinate order and point into one exact byte stream. Header edits or recompression can invalidate offsets.

Working checkpoint — BCF: Regenerate and hash the index after rewriting BCF. Treat dictionary positions, type descriptors and coordinate translations as scientific inputs: one silent shift can change the record.

For parents, ask whether faster processing was checked for faithful translation and privacy.

Contents · Previous section · Next section

Section 26 of 36

26. Round-trip semantically

BCF-to-VCF conversion can change textual formatting while preserving values. A valid comparison normalises presentation and checks records, types and missingness.

Working checkpoint — binary variant record: Use field-aware diffs instead of plain text alone. Keep binary file and index hashes, decoded header dictionary, reference, codec, commands and validation fixtures together.

For a classroom model, encode fictional variant cards with an explicit codebook.

Contents · Previous section · Next section

Section 27 of 36

27. Merge headers before records

Combining BCF files requires reconciling contig, FILTER, INFO and FORMAT dictionaries plus sample identities. Concatenating bytes cannot safely merge schemas.

Working checkpoint — typed value: Create one validated unified header and remap codes. Read every performance result beside round-trip fidelity, type preservation, missingness and sample order.

For future study, connect binary data to genetics, mathematics and computing while checking official pathways separately.

Contents · Previous section · Next section

Section 28 of 36

28. Connect to Primary Science

A codebook can replace repeated long labels with short numbers, but the numbers are meaningless when separated from the codebook.

Working checkpoint — header dictionary: Use fictional categories and swap the codebook to show the risk. Preserve conversion failures and unsupported fields; a successfully decoded subset is not the complete callset.

For scientific writing, report BCF and VCF versions, header, reference, conversion and round-trip validation.

Contents · Previous section · Next section

Section 29 of 36

29. Connect to Secondary Science

Binary storage demonstrates that representation can change while the underlying scientific claim stays the same. Verification checks whether translation preserved meaning.

Working checkpoint — BGZF: Compare one VCF row with its decoded BCF fields. Separate typed binary efficiency from variant-call quality, biological interpretation and clinical meaning.

For students, ask how a short code finds its meaning in the shared dictionary.

Contents · Previous section · Next section

Section 30 of 36

30. Connect to mathematics

Base-two representation, typed ranges, sentinel values, zero- versus one-based coordinates and variable-length vectors connect BCF to discrete mathematics.

Working checkpoint — variant genotype: Trace one position and genotype through encoding and decoding. Treat dictionary positions, type descriptors and coordinate translations as scientific inputs: one silent shift can change the record.

For parents, ask whether faster processing was checked for faithful translation and privacy.

Contents · Previous section · Next section

Section 31 of 36

31. Connect to computing

Binary parsing, schemas, compression, indexing and fuzz testing show how careful software engineering protects genomic evidence.

Working checkpoint — BCF: Test truncation, invalid lengths and dictionary conflicts. Keep binary file and index hashes, decoded header dictionary, reference, codec, commands and validation fixtures together.

For a classroom model, encode fictional variant cards with an explicit codebook.

Contents · Previous section · Next section

Section 32 of 36

32. Connect to pathways

BCF work connects genetics, high-performance computing, cloud systems and data stewardship and can illuminate STEM pathways.

Working checkpoint — binary variant record: Check current official qualifications separately. Read every performance result beside round-trip fidelity, type preservation, missingness and sample order.

For future study, connect binary data to genetics, mathematics and computing while checking official pathways separately.

Contents · Previous section · Next section

Section 33 of 36

33. Did you know?

A BCF record can store positions internally from zero while the corresponding VCF line displays positions from one; the codec performs a deliberate coordinate translation.

Working checkpoint — typed value: Test the first base and one-base intervals explicitly. Preserve conversion failures and unsupported fields; a successfully decoded subset is not the complete callset.

For scientific writing, report BCF and VCF versions, header, reference, conversion and round-trip validation.

Contents · Previous section · Next section

Section 34 of 36

34. Write a reader-ready binary report

Name BCF and VCF versions, header dictionaries, reference, callers, conversion tools, compression, sorting, indexes, hashes and validation.

Working checkpoint — header dictionary: Keep a decoded representative record beside the binary workflow. Separate typed binary efficiency from variant-call quality, biological interpretation and clinical meaning.

For students, ask how a short code finds its meaning in the shared dictionary.

Contents · Previous section · Next section

Section 35 of 36

35. Build a validation ladder

Check magic, version, header, dictionary IDs, lengths, typed values, sentinels, positions, genotypes, BGZF, sorting and index retrieval.

Working checkpoint — BGZF: Stop before interpretation at the first failed layer. Treat dictionary positions, type descriptors and coordinate translations as scientific inputs: one silent shift can change the record.

For parents, ask whether faster processing was checked for faithful translation and privacy.

Contents · Previous section · Next section

Section 36 of 36

36. Finish with a reproducible bundle

Deliver BCF and index hashes, decoded header, reference identifiers, conversion commands, environment, round-trip comparisons, validation logs and bounded outputs.

Working checkpoint — variant genotype: Make every binary value reconstructable as a defined VCF concept. Keep binary file and index hashes, decoded header dictionary, reference, codec, commands and validation fixtures together.

For a classroom model, encode fictional variant cards with an explicit codebook.

Contents · Previous section · Continue to the Science Learning Hub

Discover more from eduKate Singapore

Subscribe now to keep reading and get access to the full archive.

Continue reading