Open alexomics opened 9 months ago
This should be doable!
https://doc.rust-lang.org/std/io/struct.Stdin.html implements Read
, so I think with a little tinkering we can just sub in Stdin
for File
here https://github.com/LooseLab/rftools/blob/ec1d57c3a2a63dfe9affa63d7b79cbd6dd9174de/src/split_bam.rs#L187
I agree about the Header - I don't know enough about Noodles, but I think it might just read from the start until it reaches the Footer so it might work?
Should also add the option to lock and print to Stdout, so we can pipe into something else, like samtools sort
Would be nice if you could join up
rftools
with dorado with pipes. Something like:Not sure how much work this would be, but might save some time/space? I anticipate that the BAM header might be a problem but might not?