-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Multiple alleles are separated by a ";" insted of "," when VCF.Record is used
The vcf looks like this:
$ tail -2 test_single.vcf
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT SAMPLE
20 259054 . CTG CTC,C 2862 . . GT 0/1
If I do not use VCF.Record, the result is correct:
reader=VCF.Reader(open("test_single.vcf","r"));
fl=read(reader);
writer = open(VCF.Writer, "out1.vcf",VCF.header(reader));
write(writer,fl)
close(writer)Gives:
tail -2 out1.vcf
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT SAMPLE
20 259054 . CTG CTC,C 2862 . . GT 0/1
If I use VCF.Record:
writer = open(VCF.Writer, "out2.vcf",VCF.header(reader));
write(writer,VCF.Record(fl))
close(writer)Results in:
#CHROM POS ID REF ALT QUAL FILTER INFO SAMPLE
20 259054 . CTG CTC;C 2862 . . GT 0/1
Notice that CTC and C in ALT are separated by a ";".
I think the problem might be this:
GeneticVariation.jl/src/vcf/record.jl
Lines 188 to 191 in f61b9db
| for (i, x) in enumerate(alt) | |
| if i != 1 | |
| print(buf, ';') | |
| end |
Metadata
Metadata
Assignees
Labels
No labels