PCA for combined set

1

hello all,

i am trying to plot the PCA values for our GWAS study using plink. below is the code used and results:

plink --vcf local_chr2.vcf.gz --maf 0.001 --indep-pairwise 50 5 0.2 --vcf-half-call missing --out chr2-clean
plink --vcf local_chr2.vcf.gz --genome gz --out local_chr2.vcf-2 --vcf-half-call missing --extract chr2-clean.prune.in
plink --vcf local_chr2.vcf.gz --extract chr2-clean.prune.in --pca var-wts --vcf-half-call missing --out chr2-clean

the chart from the R code is below

pcs = read.table( "~/Desktop/chr2-clean.eigenvec" )
plot( pcs[,3], pcs[,4], xlab = "PC1", ylab = "PC2" )

Rplot for local GWAS

then i went on to compare the PCA values against the 1000 genome. for this I merged the the two vcf files using bcftools using the following code:
bcftools merge *vcf.gz -Oz -o Merged.vcf.gz

when running the plink PCA command on the merged version i got an empty PCA plot

plink --vcf Merged.vcf.gz --extract chr2-clean.prune.in --pca var-wts --vcf-half-call missing --out merged.with.1000G

PCA plot for merged vcf

any help on what i did wrong? i am so confused? is it because i used bcftools to merge? because for verification i also plotted PCA for the 1000 genome values and the diagram was fine.


plink


bcftools


vcf


PCA

• 129 views

Have you tried using plink 2.0 for PCA? It should give you a relevant error message when it fails.


Login
before adding your answer.

Traffic: 2355 users visited in the last hour



Source link