Question: Plink --freq function
1
gravatar for cetin.m
8 months ago by
cetin.m50
cetin.m50 wrote:

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 • 371 views
ADD COMMENTlink modified 7 months ago by chrchang5237.3k • written 8 months ago by cetin.m50

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

ADD REPLYlink modified 8 months ago • written 8 months ago by zx87549.6k

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

ADD REPLYlink written 8 months ago by cetin.m50
1

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

paste myfile.bim myfile.freq > myResult.txt
ADD REPLYlink written 8 months ago by zx87549.6k
1

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

ADD REPLYlink written 7 months ago by chrchang5237.3k
1
gravatar for chrchang523
7 months ago by
chrchang5237.3k
United States
chrchang5237.3k wrote:

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 COMMENTlink modified 7 months ago by zx87549.6k • written 7 months ago by chrchang5237.3k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1613 users visited in the last hour