databio / gtars

Performance-critical tools to manipulate, analyze, and process genomic interval data. Primarily focused on building tools for geniml - our genomic machine learning python package.
3 stars 2 forks source link

Bypass filesystem with uniwig using fifos #32

Open nsheff opened 1 month ago

nsheff commented 1 month ago

We could process the 3 to bigwig in parallel like this

mkfifo starts.wig
mkfifo ends.wig
mkfifo core.wig

wigToBigWig -clip starts.wig `refgenie seek hg38/fasta.chrom_sizes` starts.bw &
wigToBigWig -clip ends.wig `refgenie seek hg38/fasta.chrom_sizes` ends.bw &
wigToBigWig -clip core.wig `refgenie seek hg38/fasta.chrom_sizes` core.bw &

cargo run uniwig ... --starts starts.wig --ends ends.wig --core core.wig     

rm starts.wig
rm ends.wig
rm core.wig

could probably do this from within rust: https://docs.rs/nix/latest/nix/unistd/fn.mkfifo.html