fill-tags issue for specific sample name
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- c
- Domain
- bioinformatics, cli
Research direction
Start in plugins/fill-tags.c around the parsing code shown near lines 166-186, then reproduce the provided bcftools +fill-tags command with the group file containing sample names such as A1 and C1. Done means the filter-tags plugin accepts those sample names without the reported “Could not parse” error while processing HWE.
Written by the indexing model from the issue text.
Description
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!
- Dominant language
- C
- Stars
- 891
- Forks
- 277
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from samtools/bcftools
-
needs-feedback
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 45/100
-
htslib-dependent P2: Desirable
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
needs-feedback requires-test-case
Difficulty 3/5 1-2 days Newbie friendliness 55/100
All issues in samtools/bcftools
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100