The PCA on plink 1.9 didn’t fail. It just gave empty results for the combined vcf file.
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" )
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
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.
1 answer
Log in to answer this question.