Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions apis/java/src/main/java/io/tiledb/libvcfnative/LibVCFNative.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,24 +881,6 @@ Java_io_tiledb_libvcfnative_LibVCFNative_tiledb_1vcf_1bed_1file_1get_1last_1erro
return result;
}

JNIEXPORT jint JNICALL
Java_io_tiledb_libvcfnative_LibVCFNative_tiledb_1vcf_1reader_1set_1enable_1progress_1estimation(
JNIEnv* env,
jclass self,
jlong readerPtr,
jboolean enableProgressEstimation) {
(void)self;
tiledb_vcf_reader_t* reader = (tiledb_vcf_reader_t*)readerPtr;
if (reader == 0) {
return TILEDB_VCF_ERR;
}

int32_t rc = tiledb_vcf_reader_set_enable_progress_estimation(
reader, enableProgressEstimation);

return rc;
}

JNIEXPORT jint JNICALL
Java_io_tiledb_libvcfnative_LibVCFNative_tiledb_1vcf_1reader_1set_1debug_1print_1vcf_1regions(
JNIEnv* env, jclass self, jlong readerPtr, jboolean printVCFRegions) {
Expand Down
9 changes: 0 additions & 9 deletions apis/java/src/main/java/io/tiledb/libvcfnative/LibVCFNative.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@ public static final native int tiledb_vcf_reader_set_tiledb_stats_enabled(

public static final native String tiledb_vcf_version();

public static final native int tiledb_vcf_reader_set_enable_progress_estimation(
long readerPtr, boolean enableProgressEstimation);

public static final native int tiledb_vcf_reader_set_debug_print_vcf_regions(
long readerPtr, boolean printVCFRegions);

Expand Down
11 changes: 0 additions & 11 deletions apis/java/src/main/java/io/tiledb/libvcfnative/VCFReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -588,17 +588,6 @@ public String version() {
return LibVCFNative.tiledb_vcf_version();
}

public VCFReader setEnableProgressEstimation(boolean enableProgressEstimation) {
int rc =
LibVCFNative.tiledb_vcf_reader_set_enable_progress_estimation(
this.readerPtr, enableProgressEstimation);
if (rc != 0) {
String msg = getLastErrorMessage();
throw new RuntimeException("Error setting enableProgressEstimation: " + msg);
}
return this;
}

public VCFReader setDebugPrintVCFRegions(boolean debugPrintVCFRegions) {
int rc =
LibVCFNative.tiledb_vcf_reader_set_debug_print_vcf_regions(
Expand Down
3 changes: 0 additions & 3 deletions apis/python/src/tiledbvcf/binding/libtiledbvcf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ PYBIND11_MODULE(libtiledbvcf, m) {
&Reader::set_tiledb_tile_cache_percentage)
.def("set_check_samples_exist", &Reader::set_check_samples_exist)
.def("version", &Reader::version)
.def(
"set_enable_progress_estimation",
&Reader::set_enable_progress_estimation)
.def("set_debug_print_vcf_regions", &Reader::set_debug_print_vcf_regions)
.def("set_debug_print_sample_list", &Reader::set_debug_print_sample_list)
.def(
Expand Down
9 changes: 0 additions & 9 deletions apis/python/src/tiledbvcf/binding/reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -616,15 +616,6 @@ std::string Reader::version() {
return version_str;
}

void Reader::set_enable_progress_estimation(
const bool& enable_progress_estimation) {
auto reader = ptr.get();
check_error(
reader,
tiledb_vcf_reader_set_enable_progress_estimation(
reader, enable_progress_estimation));
}

void Reader::set_debug_print_vcf_regions(const bool& print_vcf_regions) {
auto reader = ptr.get();
check_error(
Expand Down
3 changes: 0 additions & 3 deletions apis/python/src/tiledbvcf/binding/reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,6 @@ class Reader {
/** Get Version info for TileDB VCF and TileDB. */
std::string version();

/** Set disable progress estimation */
void set_enable_progress_estimation(const bool& enable_progress_estimation);

/** Set print vcf regions in verbose mode */
void set_debug_print_vcf_regions(const bool& print_vcf_regions);

Expand Down
12 changes: 0 additions & 12 deletions apis/python/src/tiledbvcf/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ def read_arrow(
skip_check_samples: bool = False,
set_af_filter: str = "",
scan_all_samples: bool = False,
enable_progress_estimation: bool = False,
) -> pa.Table:
"""
Read data from the dataset into a PyArrow Table.
Expand Down Expand Up @@ -312,8 +311,6 @@ def read_arrow(
variants with AF > 0.1, set this to ">0.1".
scan_all_samples
Scan all samples when computing internal allele frequency.
enable_progress_estimation
**DEPRECATED** - This parameter will be removed in a future release.

Returns
-------
Expand Down Expand Up @@ -342,7 +339,6 @@ def read_arrow(
self.reader.set_check_samples_exist(not skip_check_samples)
self.reader.set_af_filter(set_af_filter)
self.reader.set_scan_all_samples(scan_all_samples)
self.reader.set_enable_progress_estimation(enable_progress_estimation)

if bed_file is not None:
self.reader.set_bed_file(bed_file)
Expand Down Expand Up @@ -534,7 +530,6 @@ def read(
skip_check_samples: bool = False,
set_af_filter: str = "",
scan_all_samples: bool = False,
enable_progress_estimation: bool = False,
) -> pd.DataFrame:
"""
Read data from the dataset into a Pandas DataFrame.
Expand Down Expand Up @@ -563,8 +558,6 @@ def read(
set_af_filter
Filter variants by internal allele frequency. For example, to include
variants with AF > 0.1, set this to ">0.1".
enable_progress_estimation
**DEPRECATED** - This parameter will be removed in a future release.

Returns
-------
Expand Down Expand Up @@ -592,7 +585,6 @@ def read(
self.reader.set_check_samples_exist(not skip_check_samples)
self.reader.set_af_filter(set_af_filter)
self.reader.set_scan_all_samples(scan_all_samples)
self.reader.set_enable_progress_estimation(enable_progress_estimation)

if bed_file is not None:
self.reader.set_bed_file(bed_file)
Expand All @@ -606,7 +598,6 @@ def export(
samples_file: str = None,
bed_file: str = None,
skip_check_samples: bool = False,
enable_progress_estimation: bool = False,
merge: bool = False,
output_format: str = "z",
output_path: str = "",
Expand All @@ -632,8 +623,6 @@ def export(
variants with AF > 0.1, set this to ">0.1".
scan_all_samples
Scan all samples when computing internal allele frequency.
enable_progress_estimation
**DEPRECATED** - This parameter will be removed in a future release.
merge
Merge samples to create a combined VCF file.
output_format
Expand Down Expand Up @@ -661,7 +650,6 @@ def export(

self.reader.set_regions(",".join(regions))
self.reader.set_check_samples_exist(not skip_check_samples)
self.reader.set_enable_progress_estimation(enable_progress_estimation)
self.reader.set_merge(merge)
self.reader.set_output_format(output_format)
self.reader.set_output_path(output_path)
Expand Down
14 changes: 0 additions & 14 deletions libtiledbvcf/src/c_api/tiledbvcf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -783,20 +783,6 @@ int32_t tiledb_vcf_reader_set_verbose(
return TILEDB_VCF_OK;
}

int32_t tiledb_vcf_reader_set_enable_progress_estimation(
tiledb_vcf_reader_t* reader, bool enable_progress_estimation) {
if (sanity_check(reader) == TILEDB_VCF_ERR)
return TILEDB_VCF_ERR;

if (SAVE_ERROR_CATCH(
reader,
reader->reader_->set_enable_progress_estimation(
enable_progress_estimation)))
return TILEDB_VCF_ERR;

return TILEDB_VCF_OK;
}

int32_t tiledb_vcf_reader_set_buffer_percentage(
tiledb_vcf_reader_t* reader, const float buffer_percentage) {
if (sanity_check(reader) == TILEDB_VCF_ERR)
Expand Down
8 changes: 0 additions & 8 deletions libtiledbvcf/src/c_api/tiledbvcf.h
Original file line number Diff line number Diff line change
Expand Up @@ -1013,14 +1013,6 @@ TILEDBVCF_EXPORT int32_t tiledb_vcf_reader_read_from_allele_count(
TILEDBVCF_EXPORT int32_t tiledb_vcf_reader_set_output_dir(
tiledb_vcf_reader_t* reader, const char* output_dir);

/**
* Sets verbose mode on or off
* @param reader VCF reader object
* @param verbose setting
*/
TILEDBVCF_EXPORT int32_t tiledb_vcf_reader_set_enable_progress_estimation(
tiledb_vcf_reader_t* reader, bool enable_progress_estimation);

/**
* Sets the percentage of buffer size to tiledb memory budget
* @param reader VCF reader object
Expand Down
6 changes: 0 additions & 6 deletions libtiledbvcf/src/cli/tiledbvcf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -861,12 +861,6 @@ void add_export(CLI::App& app) {
add_logging_options(cmd, args->log_level, args->log_file);
cmd->add_flag("-v,--verbose", args->verbose, "Enable verbose output");
CLI::deprecate_option(cmd, "--verbose", "--log-level debug");
cmd->add_flag(
"--enable-progress-estimation",
args->enable_progress_estimation,
"Enable progress estimation in verbose mode. Progress estimation "
"can sometimes cause a performance impact, so enable this with "
"consideration.");
cmd->add_flag(
"--debug-print-vcf-regions",
args->debug_params.print_vcf_regions,
Expand Down
67 changes: 5 additions & 62 deletions libtiledbvcf/src/read/reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -706,29 +706,6 @@ bool Reader::next_read_batch_v2_v3() {
// Get estimated records for verbose output
read_state_.total_query_records_processed = 0;
read_state_.query_estimated_num_records = 1;
if (params_.enable_progress_estimation) {
if (dataset_->metadata().version == TileDBVCFDataset::Version::V2) {
read_state_.query_estimated_num_records =
read_state_.query->est_result_size(
TileDBVCFDataset::DimensionNames::V2::end_pos) /
tiledb_datatype_size(
dataset_->data_array()
->schema()
.domain()
.dimension(TileDBVCFDataset::DimensionNames::V2::end_pos)
.type());
} else {
read_state_.query_estimated_num_records =
read_state_.query->est_result_size(
TileDBVCFDataset::DimensionNames::V3::start_pos) /
tiledb_datatype_size(
dataset_->data_array()
->schema()
.domain()
.dimension(TileDBVCFDataset::DimensionNames::V3::start_pos)
.type());
}
}

return true;
}
Expand Down Expand Up @@ -935,18 +912,6 @@ bool Reader::next_read_batch_v4() {
read_state_.total_query_records_processed = 0;
read_state_.query_estimated_num_records = 1;

if (params_.enable_progress_estimation) {
read_state_.query_estimated_num_records =
read_state_.query->est_result_size(
TileDBVCFDataset::DimensionNames::V4::start_pos) /
tiledb_datatype_size(
dataset_->data_array()
->schema()
.domain()
.dimension(TileDBVCFDataset::DimensionNames::V4::start_pos)
.type());
}

return true;
}

Expand Down Expand Up @@ -1154,26 +1119,11 @@ bool Reader::read_current_batch() {
complete = process_query_results_v2();
}

if (params_.enable_progress_estimation &&
read_state_.query_estimated_num_records > 0) {
LOG_INFO(
"Processed {} cells in {:.3f} sec. Reported {} cells. Approximately "
"{:.1f}% completed with query cells.",
read_state_.query_results.num_cells(),
utils::chrono_duration(processing_start_timer),
read_state_.last_num_records_exported - old_num_exported,
std::min(
100.0,
read_state_.total_query_records_processed /
static_cast<double>(read_state_.query_estimated_num_records) *
100.0));
} else {
LOG_INFO(
"Processed {} cells in {:.3f} sec. Reported {} cells.",
read_state_.query_results.num_cells(),
utils::chrono_duration(processing_start_timer),
read_state_.last_num_records_exported - old_num_exported);
}
LOG_INFO(
"Processed {} cells in {:.3f} sec. Reported {} cells.",
read_state_.query_results.num_cells(),
utils::chrono_duration(processing_start_timer),
read_state_.last_num_records_exported - old_num_exported);

// Return early if we couldn't process all the results.
if (!complete)
Expand Down Expand Up @@ -2808,13 +2758,6 @@ void Reader::set_check_samples_exist(const bool check_samples_exist) {
params_.check_samples_exist = check_samples_exist;
}

void Reader::set_enable_progress_estimation(
const bool& enable_progress_estimation) {
LOG_DEBUG(
"setting enable_progress_estimation to {}", enable_progress_estimation);
params_.enable_progress_estimation = enable_progress_estimation;
}

void Reader::set_debug_print_vcf_regions(const bool print_vcf_regions) {
params_.debug_params.print_vcf_regions = print_vcf_regions;
}
Expand Down
11 changes: 0 additions & 11 deletions libtiledbvcf/src/read/reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@ struct ExportParams {
// because we have to fetch the list of samples from the VCF header array
bool check_samples_exist = true;

// Should we skip trying to estimate the number of records and percent
// complete? This is useful when you want verbose but not the performance
// impact.
bool enable_progress_estimation = false;

// Debug parameters for optional debug information
struct DebugParams debug_params;

Expand Down Expand Up @@ -521,12 +516,6 @@ class Reader {
*/
void set_scan_all_samples(bool scan_all_samples);

/**
* Sets disabling of progress estimation in verbose mode
* @param enable_progress_estimation setting
*/
void set_enable_progress_estimation(const bool& enable_progress_estimation);

/**
* Percentage of buffer size to tiledb memory budget
* @param buffer_percentage
Expand Down