Plink update name flag, setting column names
1
1
Entering edit mode
3.6 years ago
salman_96 ▴ 70

Hi

I am trying to convert snp coordinates to rsIDs by using the flag --update-name, I am not sure if I am using it correctly, my command is:

 plink1.9 --bfile files --update-name snps_coordinates_rs_IDs  [1] [2] --out Test_update_name

I am using [1] [2] to dedicate columns. The snp_coordinate file looks like this. The first column has coordinates the second has rsIDs

1:48899:G:A     rs974664996
1:114531:G:C    rs918310516
1:133360:T:C    rs974682326
1:541281:GGGCCAACCACAGGACA:G    rs752188509
1:564782:T:C    rs879089824
1:636747:C:T    rs974667799

My .bim file has coordinates which I want to convert to rsIDs. I am getting this output

Error: Invalid --update-name column number.

Am I missing column names Please assist

plink update-name • 5.5k views
ADD COMMENT
2
Entering edit mode
3.6 years ago
  1. Remove the square brackets from your command line. See the "Interpreting our flag usage summaries" section under https://www.cog-genomics.org/plink/1.9/general_usage .
  2. Swap the order of the two numbers: "2 1" instead of "1 2". The --update-name usage summary is "--update-name <filename> [new ID col. number] [old ID col.] [skip]"; the new-ID column number comes BEFORE the old-ID column number. Or you could just remove the column numbers entirely, since "2 1" corresponds to the default behavior (this is mentioned in the first paragraph of the --update-name documentation).
ADD COMMENT
0
Entering edit mode

Hi I have done that but my .bim file has coordinates instead of rsIDs I was expecting rsIDs

The snp_coorinates file look like this

rs2281304       1:6147134:C:A,G,T
rs11584419      1:6147341:A:C
rs2273043       1:6149053:C:T
rs2273042       1:6149122:G:A

The files.bim file looks like this

1       1:851390:G:T    0       851390  T       G
1       1:852758:G:C    0       852758  C       G
1       1:853239:A:G    0       853239  G       A

The generated .bim file is also similar to previous .bim file, I was expecting rs IDs but looks like this

1       1:730087:T:C    0       730087  C       T
1       1:752721:A:G    0       752721  A       G
1       1:754105:C:T    0       754105  T       C
ADD REPLY
0
Entering edit mode

Please reread the second half of my answer.

ADD REPLY
0
Entering edit mode

Hi when I do not add 1 and 2 in the plink command I get results but the bim in results have same coordinates instead I was expecting rsIDs. I have edited my previous comment too (the rsIDs and coordinate file has columns inverted now)

When I use --update-name 2 1 I get error Failed to open 2 when I use --update-name 1 2 it says Failed to open 1

ADD REPLY
0
Entering edit mode

Why did you remove the filename from your --update-name command?

ADD REPLY
0
Entering edit mode

Hi, I was able to solve this issue Thank you for help.

ADD REPLY
0
Entering edit mode

I have a question. Should snps_coordinates_rs_IDs file only have two columns or we can use a reference file of more than two columns and specify only the column of our interest??

ADD REPLY
0
Entering edit mode

Please ask a separate new question.

https://www.biostars.org/new/post/

ADD REPLY

Login before adding your answer.

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