Allow users to skip updating aggregate stats when deleting samples#880
Open
alancleary wants to merge 6 commits intomainfrom
Open
Allow users to skip updating aggregate stats when deleting samples#880alancleary wants to merge 6 commits intomainfrom
alancleary wants to merge 6 commits intomainfrom
Conversation
…s classes This can be used to note that the allele count and variant stats arrays weren't updated when a sample was deleted from the dataset. It notes this by adding the sample to the arrays' "skipped_delete_samples" metadata field, which can be used to update the stats at a later time as long as the dataset hasn't been consolidated and vacuumed.
…mples() When this boolean is true, the skip_delete_sample() static method of the AlleleCount and VariantStats classes is called for each sample being deleted, instead of updating these stats arrays using the DeleteExporter.
…parameter This parameter is passed to TileDBVCFDataset::delete_samples() when Writer::delete_samples() is called. A unit test was added to test the skip aggregate stats functionality in the TileDBVCFDataset class via the Writer class's skip_aggregate_stats ingestion parameter.
This allows users to use the skip aggregate stats functionality now available via the TileDBVCFDataset and Writer classes. CLI tests were added to cover this new flag.
This allows the Writer's skip_aggregate_stats ingestion parameter to be set via the C API.
… the Python API This uses the tiledb_vcf_writer_set_skip_aggregate_stats hook in the C API to skip updating allele count and variant stats when deleting samples. Python tests were added to cover this new parameter.
Member
|
can we make sure "double deletions" don't have unintended consequences, the second one should fail |
spirpinias
approved these changes
Apr 1, 2026
spirpinias
left a comment
There was a problem hiding this comment.
great work, Alan. Much appreciate the haste!
leipzig
approved these changes
Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently the delete samples code path is quite slow because all of the records for the samples being deleted need to be scanned so that the allele count and variant stats arrays can be updated. This PR adds a
--skip-aggregate-statsflag to thedeleteCLI command and askip_aggregate_statsparameter toDataset.delete_samples()in the Python API to allow users to skip updating the allele count and variant stats arrays when deleting samples.On a test dataset containing records from 50 VCFs, using this feature when deleting 2 samples changed the run-time from 22 minutes to less then 1 second.