How to generate text file having SNP list from bim file in plink?
1
0
Entering edit mode
6.4 years ago

I have generated a bim file having about 24 million SNPs, how do I make a text file from it containing only the SNP names list so that I can use it to extract sample data from data set in fam format?

SNP • 3.1k views
ADD COMMENT
1
Entering edit mode
6.4 years ago
Vivek ★ 2.7k
awk '{print $2}' your_file.bim > snplist.txt

Would work to give you a SNP list but I don't clearly understand what you are trying to do after that. If you are looking to subset a dataset for individuals you need to specify the individuals you want to keep/remove to PLINK.

ADD COMMENT
0
Entering edit mode

Thank you very much for your answer. I shall try it out, I am novice in this field, trying to filter out individuals in a data set using plink having all the 24 million SNPs. These set of SNPs were found out to be present in both data sets in my study.

ADD REPLY
0
Entering edit mode

Thank you very much again! It worked.

ADD REPLY

Login before adding your answer.

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