Rename Chromosome position/Notation in VCF file
1
0
Entering edit mode
4.0 years ago
tothepoint ▴ 800

Hope this question find your attention. I have seen and tried different post related to renaming VCF file. I have some related issue but these fix not working for me. My vcf have chromosome position started from 1 ,2,3. I need chr1, chr2, chr3. I tried with awk command but it gave miserable output. Is there a way to rename chromosome number from 1 to chr1 in vcf file.

Assembly SNP vcf next-gen genome • 2.9k views
ADD COMMENT
1
Entering edit mode
4.0 years ago
bari.ballew ▴ 460

There are numerous ways to do this, many of which are described here: VCF files: Change Chromosome Notation

ADD COMMENT
0
Entering edit mode

Thankyou for the response. This post work exactly opposite.

I found perl able to solve the purpose.

 perl -pe 's/^([^#])/chr\1/' mycvf.vcf > newvcf.vcf
ADD REPLY

Login before adding your answer.

Traffic: 2607 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