This is a test version of Biostars. For the public version, visit https://www.biostars.org.
ANGSD hwrite error (wrong size)

I am using the program "ANSGD" (http://www.popgen.dk/angsd/index.php/Main_Page) to generate a site frequency spectrum (SFS: angsd -bam bam.filelist -doSaf 1 -anc file.fasta -GL 2 -P 32 -fold 1 -out file.angsd.fold, then "realSFS") from multiple .bam files and ultimately calculate theta values (-doThetas). However after >24hours of processing, four files are generated: .arg (0bytes), .saf.gz(33GB), .saf.idx (0bytes) and.saf.pos.gz (1.3GB) - and I receive an odd error.

The err file is rather large and mostly contains lines like:

PROBS at: JH418018.1 11959669

-> Printing at chr: JH418018.1 pos:11984630 chunknumber 3478300

-> Printing at chr: JH418018.1 pos:12010538 chunknumber 347840 ...

[E::bgzf_flush] hwrite error (wrong size)

[E::bgzf_flush] hwrite error (wrong size)

[E::bgzf_flush] hwrite error (wrong size) ...

Does anyone know what this error means? Or have any suggestions on how I might be able to troubleshoot it??

software error snp

ANGSD has a lot of bugs hanging around. You might try contacting the developers.

1 answer

[E::bgzf_flush] hwrite error (wrong size)

This message means that bgzf_flush() has not been able to write all the data it wanted to to a bgzipped file, likely because you have run out of disk space or quota.

You're getting it a zillion times because ANGSD doesn't check the return codes when it writes its output files, instead just assuming writing succeeded. Ideally it would check, output its own more precise error message, and abort.

Log in to answer this question.