Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insertion became deletion after liftover #7

Open
nzhun opened this issue Apr 11, 2024 · 1 comment
Open

insertion became deletion after liftover #7

nzhun opened this issue Apr 11, 2024 · 1 comment

Comments

@nzhun
Copy link

nzhun commented Apr 11, 2024

here is an example, an insertion was liftovered to a deletion. hg37 chr19:54754990_C/CGG, was liftovered to be: hg38 chr19:54251125:CGG/C

@freeseek
Copy link
Owner

BCFtools/liftover correctly handles indels swaps between references, as opposed to Picard/LiftoverVcf or CrossMap/VCF who cannot do this. You can use the tool to observe this behavior. This is what the variant looks like in hg19:

$ echo -e "##fileformat=VCFv4.2\n##contig=<ID=chr19>\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\nchr19\t54754990\t.\tC\tCGG\t.\t.\t." | bcftools +liftover -- -c hg19ToHg38.over.chain.gz -s hg19.fa | bcftools view -H
chr19	54754990	.	CGGC	CGGGGC	.	.	.

In hg19 the reference allele is two G's and the alternate allele is four G's. When you liftover to hg38:

$ echo -e "##fileformat=VCFv4.2\n##contig=<ID=chr19>\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\nchr19\t54754990\t.\tC\tCGG\t.\t.\t." | bcftools +liftover -- -c hg19ToHg38.over.chain.gz -s hg19.fa -f hg38.fa --no-left-align | bcftools view -H
Lines   total/swapped/reference added/rejected:	1/1/0/0
chr19	54251125	.	CGGGGC	CGGC	.	.	SWAP=1

In hg38 the reference allele is four G's and the alternate allele is two G's so that what was before the alternate allele is now the reference allele, as it should be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants