Question: PLINK: merge .bed files
1
gravatar for bsmith030465
5.0 years ago by
bsmith030465150
United States
bsmith030465150 wrote:

Hi,

I had a set of .bed,.bim, .fam files (myfile1.bed, myfile2.bed, ...) that I wanted to merge to get one file in .bed , bim, fam format.

I am trying:

<p>plink --file myfile1 --merge-list all_my_files.txt --make-bed --out mymerged</p>

 

where all_my_files.txt is a file containing the filepaths for the files I want merged (myfile2, myfile3, ....)

However, I get the following error:

<p>ERROR: No file [ myfile1.ped ] exists.</p>

 

How can I specify that I want my bed (and not ped) files merged into a new bed file?

 

many thanks!

plink • 18k views
ADD COMMENTlink modified 5.0 years ago by deepue130 • written 5.0 years ago by bsmith030465150
1

Aren't you merging binary files? You should use --bfile:

plink --bfile myfile1 --merge-list all_my_files.txt --make-bed --out mymerged
ADD REPLYlink modified 8 months ago by RamRS27k • written 5.0 years ago by alesssia560

Hi alesssia,

Thanks for that. My command is now:

plink --bfile myfile1 --merge-list all_my_files.txt --make-bed --out mymerged

and my all_my_files.txt now contains:

myfile10.bed
myfile10.bim
myfile10.fam
myfile11.bed
myfile11.bim
myfile11.fam
.
.
.

Does this look like the right command, and does my file list contain the correct nomenclature/order of the files?

thanks!!

ADD REPLYlink modified 8 months ago by RamRS27k • written 5.0 years ago by bsmith030465150
1

http://pngu.mgh.harvard.edu/~purcell/plink/dataman.shtml#mergelist

ADD REPLYlink written 5.0 years ago by alesssia560

Hi Alesssia,

thanks!

ADD REPLYlink written 5.0 years ago by bsmith030465150
0
gravatar for deepue
5.0 years ago by
deepue130
Finland
deepue130 wrote:
plink --bfile myfile1 --bmerge-list all_my_files.txt --make-bed --out mymerged

should work.

ADD COMMENTlink modified 8 months ago by RamRS27k • written 5.0 years ago by deepue130

The --merge-list (without a preceding b) flag is also used to merge multiple binary filesets; see alesssia's link.

Note that you cannot split a fileset across multiple lines of the --merge-list file; i.e. bsmith030465's sample all_my_files.txt is not in the correct input format. Either fully spell out all three filenames on the same line in .bed-.bim-.fam order, or include just the common prefix (this latter mode is only supported by PLINK 1.9).

ADD REPLYlink modified 8 months ago by RamRS27k • written 4.9 years ago by chrchang5237.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 826 users visited in the last hour