This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to generate text file having SNP list from bim file in plink?

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

1 answer

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.

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.

Log in to answer this question.