bcftools icon indicating copy to clipboard operation
bcftools copied to clipboard

bcftools annotate --merge-logic error with Ref, ALT columns available

Open EveTC opened this issue 3 years ago • 1 comments

Hello,

I am trying to join duplicate positions that are created when I break down MNPs to SNPs. I seem to get two records one classed as an MNP and the ohter a SNP, that have the same CHROM:POS:REF:ALT but different tag info. I thought that bcftools annotate --merge-logic would be good for this purpose.

However I get the error below when I run bcftools annotate --merge-logic on my vcf:

Error: BEG,END (or FROM,TO) columns or REF,ALT columns are expected with the --merge-logic option.

Yet my multi-sample vcf does have REF and ALT columns:

#CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT  index_01_barcode_22_PA-3-MH-02  index_02_barcode_04_PA-4-RCHP-14 ....

Am I missing a command here or is this a bug? Thank you for your help, in advance!

EveTC avatar May 04 '21 10:05 EveTC

The command annotate is intended for something else. I am not sure what you are trying to do. Merge the constituent SNVs back to a MNV, such as in the following example, or something else?

input:
1  A  C
2  A  C

output:
1 AA CC

pd3 avatar May 24 '21 13:05 pd3