Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

potential solution for skipping sort #70

Closed
wants to merge 2 commits into from

Conversation

donaldcampbelljr
Copy link
Member

@ClaudeHu try this branch and see if it:
a. shortens time significantly,
b. provides the same answer for your presorted bed files

The original C++ implementation of uniwig does sort the starts and ends in memory regardless of the sort flag being set.

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

Attention: Patch coverage is 51.85185% with 13 lines in your changes missing coverage. Please review.

Project coverage is 61.20%. Comparing base (df443c2) to head (05dc754).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
gtars/src/uniwig/cli.rs 0.00% 7 Missing ⚠️
gtars/src/uniwig/mod.rs 33.33% 4 Missing ⚠️
gtars/src/uniwig/utils.rs 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #70      +/-   ##
==========================================
- Coverage   61.27%   61.20%   -0.08%     
==========================================
  Files          37       37              
  Lines        6102     6119      +17     
==========================================
+ Hits         3739     3745       +6     
- Misses       2363     2374      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ClaudeHu
Copy link
Member

It greatly improved running time

real	13m21.378s
user	14m30.424s
sys	2m28.003s

@donaldcampbelljr
Copy link
Member Author

donaldcampbelljr commented Jan 27, 2025

Just to clarify after speaking with Claude, two things improved the time:

  1. building with the release flag
  2. re-sorting the bed file before using
    I will close this PR and Branch for now as it is probably unnecessary

@nsheff
Copy link
Member

nsheff commented Jan 27, 2025

two questions:

  1. why should re-sorting the bed file before using it have changed anything, if the sort is supposedly happening internally as well?
  2. Would it be helpful if uniwig prompted the user or gave a warning if the file was out of order? (seems like it should be a moot point, but I'm confused)

@nleroy917
Copy link
Member

Curious if we could complete the experiment (if its even worth it):

No-Release Release
Unsorted
Sorted

Fill in the values here to figure out what was the important factor

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.

4 participants