vgteam / libvgio

A dynamic library that provides io for the vg toolkit.
Other
8 stars 7 forks source link

Fix multithreaded GAM read #71

Open adamnovak opened 2 months ago

adamnovak commented 2 months ago

I had to turn off multithreaded GAM read because this would break on Mac:

vg construct -r test/1mb1kgp/z.fa -v test/1mb1kgp/z.vcf.gz > z.vg
vg sim -n 10000 -s 23 -a -x z.vg > sim.gam
# This fails
vg stats -a sim.gam
# This works
vg view -aj sim.gam | wc -l

Especially with --threads 1 to vg stats, I would get a signal 11 inside the wrapper code that makes a C++ input stream an hFILE implementation that htslib can read, if I enabled multithreading on the BGZF.

I probably need to make a small test C program or a test case in libvgio to make sure bgzf_mt isn't somehow broken on Mac, and gradually add more stuff to it until I can figure out what is going on.

I turned off multithreading in libvgio commit cb4a54c693436b78c015c30057899ead43f61f30.

adamnovak commented 4 days ago

I don't think we actually need this for the paper, so I am kicking it off the paper board.