This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Possible to merge three plink bim, bed and fam files?

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

1 answer

Create a list.txt like

Test_2
Test_3

Then run:

plink --bfile Test_1 --merge-list list.txt --make-bed --out All_controls

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

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.

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

Log in to answer this question.