Question: Merging bed bim fam files from chromosome 1 to 22 at one time
0
gravatar for khn
12 months ago by
khn100
khn100 wrote:

Hello,

I am trying to merge multiple bed bim fam files (each chromosome has separate file) into one file.

plink --allow-no-sex --bfile XX.chr1 --merge-list mylist.txt --make-bed --out XX.ch1-22

This does not work.

mylist.txt contains:

XX.chr2.bed XX.chr2.bim XX.chr2.fam
XX.chr3.bed XX.chr3.bim XX.chr3.fam
XX.chr4.bed XX.chr4.bim XX.chr4.fam
...
XX.chr22.bed XX.chr22.bim XX.chr22.fam

Thank you in advance!

snp genome • 1.1k views
ADD COMMENTlink modified 12 months ago by Pierre Lindenbaum119k • written 12 months ago by khn100

Is plink giving you an error? Otherwise, please define "does not work".

ADD REPLYlink written 12 months ago by Devon Ryan89k

Yes, it says that "cannot open the file XX.chr2.fam". What would you think is wrong?

ADD REPLYlink written 12 months ago by khn100

Does that file exist?

ADD REPLYlink written 12 months ago by Devon Ryan89k

Yes. I changed the txt file to csv file, but it still says "Error: Failed to open XX.chr2.fam."

ADD REPLYlink modified 12 months ago • written 12 months ago by khn100

Message is as below... What would you think is wrong??

* MB RAM detected; reserving MB for main workspace. .ped scan complete (for binary autoconversion). Performing single-pass .bed write ( variants, * people). --file: XX.ch1-22-temporary.bed + XX.ch1-22-temporary.bim + xx.ch1-22-temporary.fam written. Error: Failed to open XX.ch2.fam.

ADD REPLYlink written 12 months ago by khn100

@khn How did you solve this problem? I am also new to plink. I am facing the same problem. How can we merge multiple binary files of different chromosomes using plink?

ADD REPLYlink written 12 weeks ago by bk1130
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: 774 users visited in the last hour