fill-tags issue for specific sample name
hello,
I have a vcf file, which sample name is like “A1”,“C1”;
when I using the filter-tag plugins,it turns out error for group files,maybe you could rewrite the check code
/mnt/lustre/users/sanger-dev/app/bioinfo/dna/bcftools-1.17/bcftools +fill-tags --threads 8 -Oz -o pop.hwe.vcf.gz /mnt/lustre/sanger-dev_workspaceDnaEvolutionV2/20230530/Basic_FX2023022000012_16sample_yxy_2ezr/VcfPreprocess/output/vcf_filter/loci_filtered.vcf.gz -- -S /mnt/lustre/users/sanger-dev/sg-users/yexiaoya/task/FX2023022000012/16.group -t HWE
Could not parse the file2: C1 C
I have already change the code plugins/fill-tags.c like this
166 char *back=str.s;
167 char *smpl=strtok(str.s,"\t");
168 char *pop_names=strtok(NULL,"\t");
169 str.s=back;
170 //while(p)
171 //{
172 // printf("%s\n",p);
173 // p=strtok(NULL,"\t");
174 //}
175 //char *pop_names = str.s + str.l - 1;
176 //while ( pop_names >= str.s && isspace(*pop_names) ) pop_names--;
177 //if ( pop_names <= str.s ) error("Could not parse the file: %s\n", str.s);
178 //pop_names[1] = 0; // trailing spaces
179 //while ( pop_names >= str.s && !isspace(*pop_names) ) pop_names--;
180 //if ( pop_names <= str.s ) error("Could not parse the file1: %s\n", str.s);
181
182 //char *smpl = pop_names++;
183 //while ( smpl >= str.s && isspace(*smpl) ) smpl--;
184 //char *names= str.s++;
185 //if ( smpl <= str.s) error("Could not parse the file2: %s\n", str.s);
186 //smpl[1] = 0;
187 //smpl = str.s;
the error is gone!
thank you!
You seem to be using some older version of the plugin? Even though the command line you are showing suggests that you are at the version 1.17, the code there looks quite different from what you commented out: https://github.com/samtools/bcftools/blob/116a87cae219a1e14e5cc0b2c6331749f9a3bd41/plugins/fill-tags.c#L166-L187
If this is not a version mismatch and the environment variable BCFTOOLS_PLUGINS really points to the correct location, it would be helpful to have a small test case to reproduce and debug the error.
well, I have already check the issue is still exists
We still need a test case to reproduce the problem, unable to proceed without it, sorry.