Merge files in Plink
1
0
Entering edit mode
2.7 years ago
Max ▴ 10

Welcome...

I have Est1000HGDP data and this data is in a PLINK format:

Est1000HGDP.bed

Est1000HGDP.bim

Est1000HGDP.fam

I have other data from the study by Henn et al. 2012 in the same format:

Henn.bed

Henn.bim

Henn.fam

And I want to merge these files with each other, and unfortunately I tried many commands and failed!

Plink • 1.5k views
ADD COMMENT
1
Entering edit mode
2.7 years ago

plink --bfile Est1000HGDP --bmerge Henn --make-bed --out <new prefix> should work? --bmerge documentation

ADD COMMENT
0
Entering edit mode

First, thanks for the reply.

Second, yes, the process succeeded and the files were merged, but the merged files disappear after a short time of creation, and only these .log & .nosex files remain

ADD REPLY
0
Entering edit mode

but the merged files disappear after a short time of creation

Please explain this in better detail, if you can? It may help to post the status messages, and any warning or error messages that you receive. Also, please let us know on which system you run PLINK, which version you use, and how it is loaded / installed.

ADD REPLY
1
Entering edit mode

Thank you Kevin...

ADD REPLY
0
Entering edit mode

First I use PLINK on Linux Mint 20.2: https://linuxmint.com/download.php

Secondly, the version of PLINK I used is 1.90: https://www.cog-genomics.org/plink/

As for the way to work, we put PLINK next to the data in one folder and then use the commands like this, for example:

./plink --bfile Est1000HGDP --bmerge Henn --make-bed --out Embeddedfiles

Finally, in terms of errors, this is the message that appears to me after the files disappear:

Random number seed: 1628440936
14835 MB RAM detected; reserving 1917 MB for main workspace.
489 people loaded from Est1000HGDP.fam.
3 people to be merged from Henn.fam.
Of these, 3 are new, while 0 are present in the base dataset.
597573 markers loaded from Est1000HGDP.bim.
597573 markers to be merged from Henn.bim.
Of these, 0 are new, while 597573 are present in the base dataset.
Performing single-pass merge (492 people, 597573 variants).
Merged fileset written to Embeddedfiles-merge.bed + Embeddedfiles-merge.bim + Embeddedfiles-merge.fam .
597573 variants loaded from .bim file.
492 people (311 males, 180 females, 1 ambiguous) loaded from .fam.
Ambiguous sex ID written to Embeddedfiles.nosex .
492 phenotype values loaded from .fam.
Error: When ambiguous-sex samples with phenotype data are present,
--make-bed/--make-just-fam/--recode/--write-covar usually cannot be combined
with other commands.  Split them across multiple PLINK runs, or use
--allow-no-sex/--must-have-sex.
End time: Sun Aug  8 18:42:20 2021

Thanks in advance...

ADD REPLY
1
Entering edit mode

The error message tells you that you need to either provide sex information, or add —allow-no-sex to your command line.

ADD REPLY
0
Entering edit mode

I used this:

./plink --bfile Est1000HGDP --bmerge Henn --make-bed --allow-no-sex --out Embeddedfiles

And I got this:

Error: Failed to open Est1000HGDP.

ADD REPLY
1
Entering edit mode

Can you post the full and exact .log file? That error message implies that you ran a slightly different command.

ADD REPLY
0
Entering edit mode

Ok you did it!

After I used this command, everything remained normal and working properly:

./plink --bfile Est1000HGDP --bmerge Henn --make-bed --must-have-sex --out Embeddedfiles

I can't help but thank you, thank you very much

ADD REPLY

Login before adding your answer.

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