Hi all,
I have my WGS in VCF format from nebula genomics. I've changes the chromosome notation to match clinker VCF file, normalized, decomposes and reindexed.
I successfully ran the following BCFTools command on it and the clinker VCF
bcftools annotate -a /clinvar.vcf.gz -c =ID,INFO myvcf.gz | bgzip > test2.vcf.gz
and was able to use a text editor to find all the variations I have that are in clinker
However I would prefer two differences in the output
- the output file should contain only the matching rows (matching between clinker and my vcf). the current output has every row in my vcf, it just adds the ID and INFO fields from clinker to the matching rows.
- i would prefer that the INFO from clinker be appended or added a new column, rather than overwriting the INFO in my vcf.
Is this possible? How would I do it?
1 answer
the output file should contain only the matching rows i would prefer that the INFO from clinker be appended or added a new column, rather than overwriting the INFO in my vcf.
Could be something like, don't put the whole INFO tag in annotate:
bcftools annotate -a /clinvar.vcf.gz -c 'ID,INFO/AF_ESP,INFO/RS' -O u myvcf.gz |\
bctools view -i 'INFO/RS!=""' -O z -o test2.vcf.gz
Log in to answer this question.
better: