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

Faster create_pseudobulks function. #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ghuls
Copy link

@ghuls ghuls commented Dec 13, 2023

Faster create_pseudobulks function, by assuming that a lot of consecutive values will have the same value. Also streches of zeros are not stored at all.

Based on:
https://github.com/aertslab/single_cell_toolkit/blob/c15038ddf1322fd4957396c16bb7782ad2e6629e/fragments_to_bw.py#L263C1-L372C82

Faster create_pseudobulks function, by assuming that a lot of consecutive
values will have the same value. Also streches of zeros are not stored at all.

Based on:
  https://github.com/aertslab/single_cell_toolkit/blob/c15038ddf1322fd4957396c16bb7782ad2e6629e/fragments_to_bw.py#L263C1-L372C82
@jmschrei
Copy link
Owner

Thanks. I'll take a look soon. How much faster is it? Can you add in the documentation a reference to the code in single_cell_toolkit?

@ghuls
Copy link
Author

ghuls commented Dec 14, 2023

It depends on how many ranges of the same value you have in a row.
For fragments_to_bw it was at least 10 times faster, if I remember correctly.

Do you have a pseudobulk bw file I can test with (as your distribution of values might be different than what I tested with in fragments_to_bw?

@jmschrei
Copy link
Owner

Thanks for looking into it. Any of the fragments files under scATAC_clusters.zip should be good for testing: https://zenodo.org/records/8313962

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