Convert Indel format in vcf
2
1
Entering edit mode
8.9 years ago
mavershang ▴ 60

Hi there,

Say I have a insertion (on GRCh37) in format

1    866511    rsXXXXXX    -    CCCT  INFO_Field_BLABLA

Is there any existing tools I can use to include the previous ref nucleotide and convert it to

1    866510    rsXXXXXX    A   ACCCT  INFO_Field_BLABLA

Thanks in advance

indel SNP • 2.5k views
ADD COMMENT
0
Entering edit mode
8.9 years ago

Hi, you can retrieve the reference allele at a specific position using samtools faidx (or bedtools getfasta) and then, playing with a little bit of scripting, you should arrange this information to get your desired output format.

ADD COMMENT
0
Entering edit mode
8.9 years ago
Danielk ▴ 640

Bcftools will do that for you. Check out the command bcftools norm.

Edit: It's possible that vt normalize or GATK LeftAlignAndTrimVariants might also work for this.

ADD COMMENT
0
Entering edit mode

The program failed with error "core dump". So finally I wrote my own code to solve the problem. Thanks

ADD REPLY

Login before adding your answer.

Traffic: 1860 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6