Hi, I was trying to use vg gamsort to sort and index the gam file so as to use vg chunk later. I get the following error when I run gamsort


[E::bgzf_flush] File write failed (wrong size)

[E::bgzf_flush] File write failed (wrong size)

terminate called without an active exception


I think this is because it is running out of space in the temporary directory. I am not sure where this tmp directory is or if I have access to it, as I work in a shared cluster. Is there a way to specific the tmp directory as it is possible for vg index? I got the same error while running vg index but was able to rectify it using the -b option. While vg index allows indexing of a sorted gam file, mine comes directly from vg map so don't think it is sorted. 

Thanks!
`vg gamsort`, as well as most other vg commands, takes the temporary directory from environment variables. The primary variable is `TMPDIR`, but vg also checks a number of other variables (`TMP`, `TEMP`, `TEMPDIR`, `USERPROFILE`) if that has not been set. If everything else fails, vg falls back to `/tmp`.

The main exception are temporary files created by external libraries. We try to make the libraries use the same directory vg uses, but that's not always possible.