You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use rust-htslib to parse multiple regions in parallel. The bam files are read within a function call and the function is mapped into a .par_iter() chain. I expect the bam files are closed automatically after each loop. However, htslib keep opening new files and cause a too many open files error.
I tried to use rust-htslib to parse multiple regions in parallel. The bam files are read within a function call and the function is mapped into a
.par_iter()
chain. I expect the bam files are closed automatically after each loop. However, htslib keep opening new files and cause atoo many open files
error.The code are within this repo:
https://github.com/y9c/mpileup/blob/12d8a589676c1d773425de0987666c29b4430394/src/base.rs#L426-L441
And the bug and be trigger by the following example.
cargo run base -t ./test/large_region.bed -r ./test/reference.fa -i test/sample1.bam test/sample2.bam > /dev/null
I am not sure if I am using htslib in a wrong way. Could you help me with this? Thank you.
The text was updated successfully, but these errors were encountered: