Plink --freq function
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?
• 3,639 views
•
link
1 answer
Two ways to do this:
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
.bimfiles don’t have header lines, while the--freqoutput file does.Use plink 2.0
--freq cols=+pos. plink 2.0 commands have optional output columns.
• 0 views
•
link
Log in to answer this question.
Map file for SNPs (something like
yripublished.bim) would have the positions already?Yes I see the positions there. But I don't know how to replace the rs IDs with them.
bim file and the output of
--freqfile match row by row, so just usepaste:.bim files don’t have a header line, while the —freq output file does, so a bit more scripting would be required.