Failed to extract eigenvectors from GRM

837 views
Skip to first unread message

Victoria Glynn

unread,
Feb 21, 2022, 11:06:17 PM2/21/22
to plink2-users
Hello plink users, 

I hope this finds you well. 

I am trying to use PLINK v2.00a2LM AVX2 Intel on Compute Canada's infrastructure to run a PCA on a vcf file generated from 170 shallow whole genome sequences mapped to my reference genome. I first filtered my vcf file using vcftools and then proceeded to run the following script on our cluster:

plink2 --vcf samples_filt.vcf.gz --double-id --allow-extra-chr \

--set-missing-var-ids @:# \

--extract plink_pdam.prune.in \

--make-bed --pca --out plink_pdamPCA


However, although the genetic relationship matrix is well computed, the end of the .log file states the following: 


Extracting eigenvalues and eigenvectors... Error: Failed to extract eigenvector(s) from GRM

My full .log file is as follows:

Random number seed: 1645501726
192020 MiB RAM detected; reserving 96010 MiB for main workspace.
Using up to 48 threads (change this with --threads).
--vcf: 1371471 variants scanned.
--vcf: plink_pdamPCA-temporary.pgen + plink_pdamPCA-temporary.pvar +
plink_pdamPCA-temporary.psam written.
170 samples (0 females, 0 males, 170 ambiguous; 170 founders) loaded from
plink_pdamPCA-temporary.psam.
1371471 variants loaded from plink_pdamPCA-temporary.pvar.
Note: No phenotype data present.
--extract: 42246 variants remaining.
Calculating allele frequencies... done.
42246 variants remaining after main filters.
Constructing GRM: done.
Correcting for missingness... done.
Extracting eigenvalues and eigenvectors... Error: Failed to extract eigenvector(s) from GRM.

I am unsure if I need to add any additional commands in my script, so any further guidance would be appreciated. 

Best regards,

Victoria
 

Christopher Chang

unread,
Feb 22, 2022, 1:08:17 AM2/22/22
to plink2-users
Did you filter out low-MAF variants with something like --maf?  The PCA computation can break down if there's a single monomorphic variant.

Victoria Glynn

unread,
Feb 26, 2022, 12:31:08 AM2/26/22
to plink2-users
Hello, 

Yes, I filtered out low-MAF variants with vcftools. I am re-running my script and will let you know if the error persists. 

Thank you again. 

Best regards,

Victoria

Message has been deleted

Chris Chang

unread,
Sep 8, 2022, 11:35:04 AM9/8/22
to Sal, plink2-users
Please post a full .log file from a failing run.

On Thu, Sep 8, 2022 at 7:27 AM Sal <salih...@globalgenecorp.com> wrote:
I am having the same issue but it does not look it is --maf related.
I have each chr seperately and when I run pca on each chr on its own it completes succesfully. But when i merge the chrs into one file the script fails. 

For merging:
plink --bfile chr1 --merge-list merge-list.txt --make-bed --out tmp

For pca I use:
plink2  --bfile tmp --pca 20 --out pca_out

Any suggestions what might be the issue?


CONFIDENTIALITY INFORMATION AND DISCLAIMER
This communication is privileged and confidential and is directed to and for the use of the addressee only. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Please also notify us immediately via return email or at he...@anuva.bio and delete the original email.

Anuva Pte. Ltd. (registration number 202225723N), Global Gene Corp Pvt. Ltd., and Global Gene Corp Limited are wholly owned subsidiaries of Global Gene Corporation Pte. Ltd., 160 Robinson Road, #20-03 SBF Center, Singapore 068914.

For more information, please visit: https://anuva.bio/

--
You received this message because you are subscribed to the Google Groups "plink2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/plink2-users/1bb175a9-ef60-4ec6-80d8-729e07560bf5n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages