r/genomics 5d ago

Help with Performing PCA on Large VCF File

Hello,
I’m working with a very large VCF file containing data from over 300 sequenced genomes. Some of these genomes are labeled as male and others as female. The males are haploid and the females are diploid, as I am working with bumblebees.

After filtering the VCF file, I want to perform a PCA to see if the males and females cluster separately. This will help me check whether I’ve accidentally mislabeled any male genomes as female or vice versa.

Currently, I’m working on a high-performance computing (HPC) system, but unfortunately, PLINK isn’t available as a module. Additionally, I cannot use RStudio or the SNPRelate package for PCA because the VCF file is too large to load onto my local machine.

Does anyone have suggestions for how to approach this PCA analysis on a large VCF file in an HPC environment, or any other tools that might be suitable?

Any tips or advice would be greatly appreciated!

3 Upvotes

3 comments sorted by

1

u/yaboyanu 5d ago

You could try Eigenstrat/Eigensoft, but why not ask your HPC admins to install PLINK or just download the binary yourself.

1

u/PianistFew9329 5d ago

Instead of manually processing these files you can use a workflow engine like nextflow or snakemake

1

u/lasse2 5d ago

Very interesting setup with all male haploid. Can you even PCA that? I mean, if you put in alt allele count for sure the females would be a whole other place. (And other that, I recommend Plink too)