fgvieira / ngsF-HMM

Estimation of per-individual inbreeding tracts under a probabilistic framework
GNU General Public License v3.0
13 stars 6 forks source link

Cannot read next site from POS file #4

Closed tristanpwdennis closed 3 years ago

tristanpwdennis commented 3 years ago

Hi, a very very minor issue.

When I run ngsF-HMM on .beagle.gz and a .pos.gz files, I found I was getting the error message:

ERROR: [read_pos] cannot read next site from POS file!

When I dug into a little, I found that the .pos.gz file had a header that contributed to the line count (e.g. zcat file.pos.gz | wc -l) so that when I specified the number of sites in -n_sites, I was entering 1 more site than was actually in the file. If I removed 1 (the header) from the line count, it worked fine (and in fact even told me it found the header).

Of course this is mainly my fault for not considering that the header is not actually a site, but it may lead to some confusion and may warrant a pointer in the error message/detect header and remove from n_sites for idiots like me who try and do bioinformatics before they finish their coffee.

Thank you for the software, and others in ngsTools!

fgvieira commented 3 years ago

Hi Tristan,

thanks for your interest in ngsTools and suggestion. I'll see if I can make the error message a bit more explicit.