This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Plink --merge-list only outputting fam

I am attempting to merge Plink files towards an algorithm I am using (CookHLA). I have already made the bed/bim/fam files for my vcf files. Now, I want to merge them into a single file so I can progress with the algorithm.

To do this, I am running the following line of code:

plink --bfile 0002 --merge-list PLINK_UniqueNames --make-bed --threads 4 --out Merged_Plink_files

0002 refers to the first set of plink out (I am unsure what to use as a reference). I am getting lots of warnings about non ATGC variants, ie '.'.

My issue is that only a fam file is outputted when I need the full set. I was hoping for some assistance. I admittedly do not have much experience with Plink so any assistance would be appreciated.

Contents of the fam file (just a few lines):

0002    0002    0   0   0   -9
0005    0005    0   0   0   -9
0007    0007    0   0   0   -9
0008    0008    0   0   0   -9
0009    0009    0   0   0   -9
001 001 0   0   0   -9
plink bash

What is PLINK_UniqueNames ? --merge-list requires a file, every row in that file refers to separate plink file:

--merge-list <filename>

This allows you to merge more than one fileset to the reference fileset. (Also, this can be used without a reference; in that case, the newly created fileset is then treated as the reference by most other PLINK operations.) The parameter must be the name of a text file specifying one fileset per line.

  • If a line contains only one name, it is assumed to be the prefix for a binary fileset.
  • If a line contains exactly two names, they are assumed to be the full filenames for a text fileset (.ped, then .map). These filesets may not contain multi-character alleles.
  • If a line contains exactly three names, they are assumed to be the full filenames for a binary fileset (.bed, then .bim, then .fam).

Alternatively, you can use bcftools to merge all vcfs into one, then use plink to read that one merged vcf.

That is a file that contains the prefix to all the files

Rather than further pursuing this path, I am taking a step back and merging the VCF files and then using plink, which I did not consider before. This removes the need to work with extra processing steps.

1 answer

If plink is only generating a .fam, that implies that an error occurred. Yet you did not post a .log containing the error message, or describing what happened at all.

Log in to answer this question.