bigtools icon indicating copy to clipboard operation
bigtools copied to clipboard

Support specifying bed(Graph) input files as .gz

Open jackh726 opened this issue 1 year ago • 4 comments
trafficstars

jackh726 avatar May 24 '24 18:05 jackh726

Hi @jackh726

This seems like a great potential tool, but my bed files tend to be very large, so it would be awesome if you allowed for compressed input (maybe through https://github.com/luizirber/niffler).

Mostly commenting so I'll get an update if there is progress.

Cheers, Mitchell

mrvollger avatar Jul 19 '24 15:07 mrvollger

Cool crate! I had expected to just use the flate2 decompress, but may try niffler instead (for the extra support).

I'll work on getting this in this weekend - it's ultimately a fairly small addition, I just need to get to it.

jackh726 avatar Jul 19 '24 16:07 jackh726

Awesome, great news!

Overall I agree it should be pretty easy as it has been easy in some other "bed" crates I have worked in e.g.: https://github.com/noamteyssier/gia/pull/58/files

Cheers!

mrvollger avatar Jul 19 '24 18:07 mrvollger

Hi @jackh726,

I have been playing with the tool, and it seems that streaming input to bedtobigbed works, which is awesome, but I just wanted to double-check that this is intended to work generally?

bgzip -cd large.bed.gz -@ 16 | bigtools bedtobigbed -s start -a my.as - hg38.analysisSet.chrom.sizes out.bb 

If it is supported, then this is an excellent workaround for compressed files for now.

Cheers, Mitchell

mrvollger avatar Jul 19 '24 20:07 mrvollger