samtools / bcftools

This is the official development repository for BCFtools. See installation instructions and other documentation here http://samtools.github.io/bcftools/howtos/install.html
http://samtools.github.io/bcftools/
Other
682 stars 240 forks source link

fill-tags plugin bug for special sample names #1931

Open ivistang opened 1 year ago

ivistang commented 1 year ago

Hi there, For a sample group file like below, fill-tags would show an unexpect error exit : "Could not parse the file2: C2 c".

C2 c
C3 c
C4 c

Actually, I succeeded to fix the problem by changing line 175 in fill-tags.c from

if ( smpl <= str.s+1 ) error("Could not parse the file: %s\n", str.s);

to

if ( smpl <= str.s ) error("Could not parse the file: %s\n", str.s);

. I wonder if this is a proper solution for the problem. Thanks for any help!

Best, Ivis

pd3 commented 1 year ago

This looks like a duplicate of #1933.

The current code does not contain an error message "Could not parse the file2:", could you please check if you get an error with the latest version of bcftools (1.17) and if yes, provide a small test case to reproduce the problem?