How should we merge the Chromosome and position columns of a vcf and or .map file to have the ID column without dots?
1
0
Entering edit mode
5.5 years ago
jaafari.omid ▴ 80

Hi dears all,

I have a .map file (from plink) and of course before that a .vcf file which the ID column is just dot. So when I want to do GWAS using GenABEL package I get face with an error and apparently it is because of the marker ID column that all of them are dots. So I must have actually specific ids. What I have to do is just create SNP IDs by merging the Chromosome and position like following:

Chromosome      Marker ID     Genetic distance   Physical position
NC_031965.2     NC_031965.2_20711       0       20711
NC_031965.2     NC_031965.2_20746         0       20746
NC_031965.2     NC_031965.2_20814         0       20814

But practically I do not know how to do it, neither for plink files nor for the vcf file. So I will be so grateful if you can help me to solve this problem. Here is how my .map file looks and as it can be seen the second column is dots:

> head myplink-1.map
    NC_031965.2     .       0       20711
    NC_031965.2     .       0       20746
    NC_031965.2     .       0       20814
    NC_031965.2     .       0       20840
    NC_031965.2     .       0       21008
    NC_031965.2     .       0       21206
    NC_031965.2     .       0       21324
    NC_031965.2     .       0       21342
    NC_031965.2     .       0       21446
    NC_031965.2     .       0       21516

Any advice and help is appreciated in advance.

Regards,

Omid

SNP vcf plink • 1.2k views
ADD COMMENT
1
Entering edit mode
5.5 years ago

You can do this using bcftools annotate.

ADD COMMENT
1
Entering edit mode

Thank you very much for your direction. I wanted to give it a try but apprently it needs vcf files indexed by tabix already. So first I should give index to my vcf file and then use bcftools annotate.

Thank you very much for your great help.

Regards,

Omid

ADD REPLY

Login before adding your answer.

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