Plink --freq function
1
1
Entering edit mode
4.3 years ago
cetin.m ▴ 50

I have a set of files, with the names yripublished.bed, yripublished.bim, yripublished.fam

I got the frequencies of SNPs in these files with the following command:

/usr/local/sw/plink-1.90/plink --bfile yripublished --bed yripublished.bed --freq

This gives an output, where each SNP is defined by its rs ID. I need positions, not rs IDs. How can I accomplish that?

plink • 2.4k views
ADD COMMENT
0
Entering edit mode

Map file for SNPs (something like yripublished.bim) would have the positions already?

ADD REPLY
0
Entering edit mode

Yes I see the positions there. But I don't know how to replace the rs IDs with them.

ADD REPLY
1
Entering edit mode

bim file and the output of --freq file match row by row, so just use paste:

paste myfile.bim myfile.freq > myResult.txt
ADD REPLY
1
Entering edit mode

.bim files don’t have a header line, while the —freq output file does, so a bit more scripting would be required.

ADD REPLY
1
Entering edit mode
4.2 years ago

Two ways to do this:

  1. Use a short shell script to paste in positions from the .bim file. If you do this, you need to account for the fact that .bim files don’t have header lines, while the --freq output file does.

  2. Use plink 2.0 --freq cols=+pos. plink 2.0 commands have optional output columns.

ADD COMMENT

Login before adding your answer.

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