chrchang / plink-ng

A comprehensive update to the PLINK association analysis toolset. Beta testing of the first new version (1.90), focused on speed and memory efficiency improvements, is finishing up. Development is now focused on building out support for multiallelic, phased, and dosage data in PLINK 2.0.
https://www.cog-genomics.org/plink/2.0/
404 stars 122 forks source link

Problem with combining different samples into a single plink 1 file for later input #269

Closed sbird1000 closed 3 months ago

sbird1000 commented 3 months ago

I am trying to combine a total of 5 aDNA samples (full genome) into a single file for the purpose of further analysis in ADMIXTOOLS2. At the moment, I have separate .vcf and separate .bed, .bim and .fam files for each DNA sample.

I tried using the following code:

plink2 --pmerge-list ~/plink2/EAS_merge_file.txt --bfile --make-bed --out EAS_Kent_all

Here is the text file of plink1 files to be merged:

~/data/plink2/EAS001uc ~/data/plink2/EAS002uc ~/data/plink2/EAS004uc ~/data/plink2/EAS005uc ~/data/plink2/EAS006uc

This was the output:

"Logging to EAS_Kent_all.log.

Options in effect: --bfile --make-bed --out EAS_Kent_all --pmerge-list /home/steve/plink2/EAS_merge_file.txt

Start time: Sun May 26 16:04:57 2024 Error: Missing --bfile argument."

Then I tried the same run but without --bfile. Here is the result:

plink2 --pmerge-list ~/plink2/EAS_merge_file.txt --make-bed --out EAS_Kent_all

PLINK v2.00a3 SSE4.2 (18 Feb 2022) www.cog-genomics.org/plink/2.0/ (C) 2005-2022 Shaun Purcell, Christopher Chang GNU General Public License v3

Logging to EAS_Kent_all.log. Options in effect: --make-bed --out EAS_Kent_all --pmerge-list /home/steve/plink2/EAS_merge_file.txt

Start time: Sun May 26 16:16:04 2024 9663 MiB RAM detected; reserving 4831 MiB for main workspace. Using up to 6 compute threads. --pmerge-list: 5 filesets specified. Error: Failed to open ~/data/plink2/EAS001uc.psam : No such file or directory. End time: Sun May 26 16:16:04 2024

So, I am asking plink2 to generate a single file using the Plink1 format, but plink2 is looking for a .psam file, which is not there. Also, I am not clear on what the file for --bfile should be called since the prefix names for all five aDNA files are different.

How can I get these five sample files into one bed/bim/fam file set?

Thank you for your help!

chrchang commented 3 months ago

Please post basic usage questions to the plink2-users Google group (https://groups.google.com/g/plink2-users ).