Filtering BIM, BED, and FAM files
1
1
Entering edit mode
7.2 years ago
Mazza ▴ 40

Hi all,

I am very new in this filed and really appriciate whoever can help me with this question. I was wondering if you how I can filter my bfiles( BIM, BED, FAM) for a subset of my SNPs. I have my BIM , BED, FAM files. But I do not need all SNPs available so I filterd my BIM file by AWK commands but I do not know how to match my BED file with the new BIM file created. Please tell me how should I do it? thank you very much in advance.

BED genotyping Plink • 4.4k views
ADD COMMENT
3
Entering edit mode
7.2 years ago
cpc5 ▴ 50

you should create a list of your snps and use plink's filtering option. I believe it goes something like :

plink --bfile <yourfile> --remove [snps.txt] --out<newset>

this should also subset your BED file

ADD COMMENT
0
Entering edit mode

Dear cpc5,

Thank you very much. That was a wonderful hint. I actually used the following script and it worked properly! plink --bfile <yourfile> --extract [snps.txt] --make-bed --out <newset>

I could not figure it out without your hint!

Many Thanks

ADD REPLY
1
Entering edit mode

glad it helped. for the record: the bed file is tightly knit to the bim and fam file, so if you want to filter individuals you also have to make a list of family Id.s

ADD REPLY
0
Entering edit mode

If the question has been solved then accept @cpc5's answer (green check mark) to provide closure to the thread.

ADD REPLY

Login before adding your answer.

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