Skip to content

vcf adjustments for rastair#6

Merged
killercup merged 4 commits intomainfrom
vcf-fixes
Apr 7, 2026
Merged

vcf adjustments for rastair#6
killercup merged 4 commits intomainfrom
vcf-fixes

Conversation

@killercup
Copy link
Copy Markdown
Member

No description provided.

killercup and others added 4 commits April 6, 2026 20:16
Replaces ryu (max precision) with a %g-compatible formatter that
produces identical output to htslib/bcftools:
- 35.89775 → "35.8978" (6 significant digits)
- 60.0 → "60" (drops trailing .0)
- 0.777778 → "0.777778"
- 99.0 → "99" (integer-like floats)

This ensures seqair VCF text output is byte-compatible with htslib
for float formatting, enabling precise output comparison.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New VcfRecordBuilder methods that take &[i32] / &[f32] instead of
Vec<Option<i32>> / Vec<Option<f32>> for the common case where all
values are present (no missing). Wraps in Some internally.

Eliminates verbose .iter().map(|&v| Some(v)).collect() at every
call site in rastair's field translation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
InfoValue::IntegerArray, FloatArray, StringArray and SampleValue arrays
now use SmallVec<T, 4> instead of Vec<T>. Per-allele arrays (typically
1-3 elements) are inline — no heap allocation.

info_string() now accepts impl Display, allowing callers to pass any
displayable type without manually converting to SmolStr.

info_integer_array/info_float_array accept impl Into<SmallVec> for
flexible construction from Vec, SmallVec, or array literals.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@killercup killercup added this pull request to the merge queue Apr 7, 2026
Merged via the queue into main with commit 2a0422a Apr 7, 2026
3 checks passed
@killercup killercup deleted the vcf-fixes branch April 7, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant