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

Allow using multiple threads to (de)compress hts files #74

Merged
merged 6 commits into from
May 28, 2024
Merged

Conversation

milkschen
Copy link
Owner

@milkschen milkschen commented May 23, 2024

Updates the --threads (-t) logic to allow using multiple threads to (de)compress HTS files. This can improve thread scaling.

The threads are split into two pools: lift (--lift_threads) and hts (--hts_threads). Users can specify them explicitly, or leverage the auto thread inference algorithm: with t threads assigned to leviosam2, max(1, t/4) threads are assigned to HTS and the rest are assigned to the lift core.

@mrvollger
Copy link

This would be great! One suggestion, I would set the default number of (de)compression threads to be the max of 1 and 25% of the total requested threads.

This isn't a perfect heuristic, but after playing with samtools on a lot of different systems and use cases, I find myself almost always doing this.

@milkschen milkschen marked this pull request as ready for review May 28, 2024 06:41
@milkschen milkschen changed the title Use multiple threads for hts files Allow using multiple threads to (de)compress hts files May 28, 2024
@milkschen
Copy link
Owner Author

@mrvollger many thanks for the suggestion! I updated the PR to apply the logic.

@milkschen
Copy link
Owner Author

Link to the issue: #72

@milkschen milkschen merged commit db9d89e into main May 28, 2024
22 checks passed
@milkschen milkschen deleted the hts_threads branch May 28, 2024 07:13
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.

2 participants