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/
408 stars 123 forks source link

PLINK 1.9: Issues with --make-bed and empty .fam file #274

Closed GGarrido013 closed 3 months ago

GGarrido013 commented 3 months ago

Hello, I want to perform an ROH analysis on the rat genomic data supplied in the Ensembl database (https://www.ensembl.org/info/data/ftp/index.html?redirect=no). This is to compare with a particular rat strain that's been recently sequenced, to see if there's a change in the distribution of homozygous zones.

The problem I'm having is that when I create the .bim, .bed, and .fam files using the following code:

plink --vcf rattus_norvegicus.vcf --make-bed --out rnor

I get the error:

PLINK v1.90b7.2 64-bit (11 Dec 2023)           www.cog-genomics.org/plink/1.9/
(C) 2005-2023 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to rnor.log.
Options in effect:
  --make-bed
  --out rnor
  --vcf rattus_norvegicus.vcf

15733 MB RAM detected; reserving 7866 MB for main workspace.
Error: No samples in .vcf file.

I can circumvent this by adding the --allow-no-samples flag, but this produces an empty .fam file, which makes the ROH analysis error out:

plink --bfile rnor --allow-extra-chr --homozyg
PLINK v1.90b7.2 64-bit (11 Dec 2023)           www.cog-genomics.org/plink/1.9/
(C) 2005-2023 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to plink.log.
Options in effect:
  --allow-extra-chr
  --bfile rnor
  --homozyg

15733 MB RAM detected; reserving 7866 MB for main workspace.
9572703 variants loaded from .bim file.
Error: Nobody in .fam file.

I'm honestly a bit at loss on what to do, the data on the .vcf I downloaded looks exactly like the data on the other datasets I have, on which I can run an ROH analysis with zero problem. As you've probably guessed, I'm a newbie at this, but I haven't been able to find anyone else with the same problem.

chrchang commented 3 months ago

Usage questions should be posted in the plink2-users Google group (https://groups.google.com/g/plink2-users ).