SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
PLINK: bed to vcf conversion bsmith030465 General 0 04-21-2015 12:01 PM
Create VCF file from .bim, .fam and .bed files meher Bioinformatics 0 08-05-2014 01:05 AM
Weir And Cockerham Fst from PLINK(bed/bim/fam) input files themysticgeek Bioinformatics 0 06-26-2014 01:09 AM
merge bed files Fernas Bioinformatics 0 05-19-2014 01:26 PM
merge BED files from two lanes? alittleboy Bioinformatics 1 08-19-2013 12:25 AM

Reply
 
Thread Tools
Old 06-20-2016, 11:25 AM   #1
bsmith030465
Member
 
Location: ca

Join Date: Nov 2014
Posts: 11
Default PLINK: merge bed/bim/fam files error

Hi,

I was trying to merge several files (each chr has separate file) into one big file. I gave the following command:

plink --noweb --bfile T2.chr1 --merge-list mylist.txt --make-bed --out T2

but get the following error:

ERROR: Cannot merge files. Check your MAP files.


mylist.txt contains:

T2.chr2.bed T2.chr2.bim T2.chr2.fam
T2.chr3.bed T2.chr3.bim T2.chr3.fam
T2.chr4.bed T2.chr4.bim T2.chr4.fam
.
.


All the individual .fam files appear to be identical (same file size).

What am I doing wrong?

thanks.
bsmith030465 is offline   Reply With Quote
Old 06-30-2016, 03:54 AM   #2
dickie_ho
Member
 
Location: Newcastle Australia

Join Date: Mar 2013
Posts: 26
Default

Hey mate

First suggestion I would be using plink 1.9 (don't have to worry about the annoying --noweb )

Try a process of elimination.. do a basic loop to to merge each chromosome separately until you find the troublesome file

But if it is error is related to a map file I am unsure why it is asking for that format.. you could try to --recode the data into Ped format and try merging...

Just make sure in your mylist.txt that you use a tab separator

This is a basic script out of one of my pipelines that might help you or might be totally useless but here it is anyways

for i in {1..22}

do

plinknew --ped chr"$i".ped --map chr"$i".map --make-bed --noweb --out chr"$i"

done



ls *.bed > bed.txt
ls *.bim > bim.txt
ls *.fam > fam.txt

paste bed.txt bim.txt fam.txt | column -s $'\t' -t > merge.temp.list

grep -v -w "chr1." merge.temp.list > merge.list

plinknew --bfile chr1 --merge-list merge.list --make-bed --out P67_raw

Hope that helps in some way

Cheers
dickie_ho is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 10:03 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO