Possible to merge three plink bim, bed and fam files?
1
0
Entering edit mode
7 weeks ago
salman_96 ▴ 30

Hi, I am using plink1.9 and trying to merge three plink binary files. They are all controls.

Test_1.bim Test_1.bed Test_1.fam

Test_2.bim Test_2.bed Test_2.fam

Test_3.bim Test_3.bed Test_3.fam

I am using
plink1.9 --noweb --bfile Test_1 --bmerge Test_2.bim Test_2.bed Test_2.fam Test_3.bim Test_3.bed Test_3.fam --make-bed --out All_controls

I get this error Error: --bmerge accepts at most 3 parameters.

Because I am using 6 parameters. If I use 3 parameters, I may lose some information. Please assist

bmerge Plink1.9 • 238 views
ADD COMMENT
0
Entering edit mode
7 weeks ago
4galaxy77 ▴ 710

Create a list.txt like

Test_2
Test_3

Then run:

plink --bfile Test_1 --merge-list list.txt --make-bed --out All_controls
ADD COMMENT
0
Entering edit mode

Should the list.txt file have only two of .bim files of all six files. COuld you suggest how do I make it in Linux.

Best regards

ADD REPLY
0
Entering edit mode

Hi Salman. plink files come in sets of 3. Each set has a .bed, .bim and .fam file. For example, your dataset Test_2 will have a Test_2.bim, Test_2.bed, Test_2.fam file. When you run a plink command, you only need to specify the prefix (i.e. whatever comes before the .bim, .bed or .fam). So you only need a list of prefixes - in this case, just Test_2 and Test_3.

ADD REPLY
0
Entering edit mode

Hi sorry for the confusion but I did not understand about creating a list.txt file. What would this file have?

I have 3 plink set of files of controls that I want to merge. How do I create list.txt file?

Could you just please help me how do I create this list.txt file ?

Regards

ADD REPLY
0
Entering edit mode

All list.txt needs to be is what I posted in the original answer. Did you try and run that? If you are still unsure then read this https://www.cog-genomics.org/plink/1.9/data#merge_list

ADD REPLY

Login before adding your answer.

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