This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Rename Chromosome position/Notation in VCF file

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

1 answer

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

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

Log in to answer this question.