Skip to content

Norm replacing reference base should be included in old-rec-tag #2357

@davmlaw

Description

@davmlaw

Thanks for all your hard work making a great tool!

While processing a normalized VCF I want to see if the reference base was replaced

I think if norm changes the variant via replacing reference base it should write out the --old-rec-tag - this seems to fit with the help "Annotate modified records with INFO/STR indicating the original variant"

Example, running --check-ref=s --old-rec-tag=BCFTOOLS_OLD_VARIANT

NC_000004.12	51382327	14565929	N	<DEL>	.	.	SVLEN=-2000;SVTYPE=DEL;END=51384327
NC_000004.12	89258449	14565930	N	<DUP>	.	.	SVLEN=20474;SVTYPE=DUP;END=89278923

Output:

NC_000004.12	51382326	14565929	a	<DEL>	.	.	SVLEN=-2000;SVTYPE=DEL;END=51384326;BCFTOOLS_OLD_VARIANT=NC_000004.12|51382327|c|<DEL>
NC_000004.12	89258449	14565930	t	<DUP>	.	.	SVLEN=20474;SVTYPE=DUP;END=89278923

problems:
1st record should be NC_000004.12|51382327|N|<DEL> showing old record but is NC_000004.12|51382327|c|<DEL> (POST ref replace)
2nd record should have INFO field record was modified

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions