-
Notifications
You must be signed in to change notification settings - Fork 2
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
Implement uniwig
#1
Comments
@edward9065 is going to try to implement this. @nsheff he will need help with the algorithm if at all possible. Is there pseudocode anywhere? Or an algorithm figure? |
Per discussion, much of the key code that needs to be ported is here: https://github.com/databio/uniwig/blob/master/src/uniwig.cpp I noticed that uniwig relies on a C library, https://github.com/jackh726/bigtools |
Opened a PR to begin reviewing WIP. Where this is currently 'stuck':
Example code:
Original code bins regions using |
I need to really look into it, but this kind of sounds like an error in their library? Or should we implement the |
See the return types for these two functions: Then, when you go to use the write function, it requires |
Per discussion, we should rethink writing to a bigwig file as we do not need to use these files in the genome browser. Instead, this implementation should focus on taking either a combined bed file or a directory of bed files and create something similar to a wiggle file,i.e. do not worry about capturing the libBigWig functionality or attempting to implement items from For inspiration of basic algorithm in Rust: https://github.com/databio/rustwig/blob/master/src/exact.rs |
I've ported the core functionality from the above rustwig repository. We should determine what output file we want. I believe this to be higher priority before proceeding with covering the other gaps (sorted vs unsorted, reading a list of beds instead of a single, etc). We've discussed implementing zarr, though I haven't yet looked at the various Rust implementations to check their maturity. This project had a release as recently as March 2024: https://github.com/LDeakin/zarrs A simple, short term option, could be to make the output file1.unibed
Open to other suggestions, especially if there is already an existing file format that makes more sense. |
This is great! Are you ready for a review of the code? |
Not quite yet. Earlier today, we discussed potentially just converting these to |
Gotcha 👍🏼 Just lmk |
This still needs python bindings before it can properly be closed. |
What do we want the ergonomics to be like here? from gtars.uniwig import uniwig
uniwig(
combined_bed="/path/to/file.bed",
smooth_size=10,
step_size=5,
...
) Could it be that simple? Does it need a python interface then? |
Once we release the newest uniwig changes to master branch, we can close this issue and create new ones that are more specific to future enhancements. |
To enable
universe
creation, we will need to portuniwig
over to this package and offer it up as acli
, a library crate interface, and ideally a python interface.The text was updated successfully, but these errors were encountered: