-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Hi @jackh726,
Thank you for your work on bigtools!
I am currently exploring using bigtools to create bigwig files in one of our rust crates (https://github.com/databio/gtars). Our crate would create intermediate bigwigs before merging them into a single bigwig as a final result.
I thought the best way would be to call the the public function bigwigmerge
from bigwigmerge.rs
and pass a constructed BigWigMergeArgs
struct to the function. However, while the BigWigMergeArgs
struct is public, some of the fields are private and I am unable to edit these fields from within another crate.
I also looked at a second option, where I merge the values and write them using BigWigWrite<File>
's wrtie function:
let all_values = ChromGroupReadImpl {
iter: Box::new(iter),
};
outb.write(all_values, runtime)?;
However, all values is a private struct that implements the necessary BBIDataSource
trait.
I guess my questions for you are:
- Should I be approaching this differently? I could have the user run
bigwigmerge [OPTIONS] <OUTPUT>
after using our crate, but I thought it would be nicer and less clunky to do this behind the scenes for the user. - Could we make the ChromGroupReadImpl struct public? I believe this might be the simplest solution to using the bigtools merge code in another external crate.