LooseLab / rftools

Tools for post processing readfish data
MIT License
1 stars 0 forks source link

pipelines #10

Open alexomics opened 9 months ago

alexomics commented 9 months ago

Would be nice if you could join up rftools with dorado with pipes. Something like:

dorado basecaller hac pod5s/ | rftools split-bam --bam-file - --unblocked-read-ids ...

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?

Adoni5 commented 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?

Adoni5 commented 9 months ago

Should also add the option to lock and print to Stdout, so we can pipe into something else, like samtools sort