Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

[REQUEST] Better progress bar when querying #17

Open
ggirelli opened this issue Mar 24, 2021 · 0 comments
Open

[REQUEST] Better progress bar when querying #17

ggirelli opened this issue Mar 24, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ggirelli
Copy link
Owner

Currently, when querying with an indexed database, the script uses the total number of records for the chromosome as the total for building a progress bar via tqdm. It should fairly easy to use a better estimate of the number of reads in a region by using the start position of the bin containing the region start, and the last position of the bin containing the region end. This could be achieved by querying the index with something like: DataBase.get_chromosome(bytes_chromosome_label).index[end_position].

Sadly, the __getitem__ method of ChromosomeIndex currently only returns the start position of a bin, instead of both start/end. This should be expanded, which requires some minor refactoring.

The number of records would then be (end_byte_position-start_byte_position)/record_size_in_bytes.

@ggirelli ggirelli added the enhancement New feature or request label Mar 24, 2021
@ggirelli ggirelli added this to the v1.0.1 milestone Mar 24, 2021
@ggirelli ggirelli self-assigned this Mar 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant