Plink: Losing FAM file data when merging multiple BED files
2
0
Entering edit mode
5 months ago
acererak ▴ 10

I have multiple BED/BIM/FAM files (one for each chromosome) and I'm creating a master set of files for downstream analysis (extracting SNPS).

I am using the command: plink --bfile myfile1 --merge-list all_my_files.txt --make-bed --out mymerged

my_files.txt has the format:

file2.bed file2.bim file2.fam 
 ... 
fileK.bed fileK.bim fileK.fam

The problem is the resulting mymerged.fam file has the following information:

-1 -1 0 0 0 -9
-2 -2 0 0 0 -9
-3 -3 0 0 0 -9
-4 -4 0 0 0 -9
...

Each of the fam files in all_my_files.txt have real fid and iid values, etc.

What is wrong with my merge such that the fid and iid values from the individual FAM files are not propogating to the merged FAM file?

I also tried a --bmerge of just the CHR1 and CHR2 files and I had the same issue.

Any thoughts? Thanks!

plink software error snp • 236 views
ADD COMMENT
2
Entering edit mode
5 months ago

Look more carefully at your input .fam files. You’ll find a -1 -1 row, a -2 -2 row, etc.

—merge-list sorts .fam IDs in “natural sorted” order.

ADD COMMENT
0
Entering edit mode
5 months ago
acererak ▴ 10

oops! That was it. Thanks @chrchang523

ADD COMMENT

Login before adding your answer.

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