-
Notifications
You must be signed in to change notification settings - Fork 13
PCA
Lizhong Wang edited this page Apr 24, 2017
·
8 revisions
Short for Principal Component Analysis , calculate with smartpca
in EIGENSOFT.
Run like this: smartpca -p smartpca.par >smartpca.par.log
.
Prepare a parameter file smartpca.par
like this:
# input
genotypename: input.ped
snpname: input.map
indivname: input.pedind
# output
evecoutname: PCAout.evec
evaloutname: PCAout.eigenvalues
# PC number
numoutevec: 4
# outlier
numoutlieriter: 0
altnormstyle: NO
numoutlierevec: 10
outliersigmathresh: 6
# Multi-threading
numthreads: 10
# output EIGENSTRAT files
outputformat: EIGENSTRAT
genotypeoutname: input.EIGENSTRAT.geno
snpoutname: input.EIGENSTRAT.snp
indivoutname: input.EIGENSTRAT.ind
More parameters of smartpca
.
twstats -t EIG4.2/POPGEN/twtable -i PCAout.eigenvalues -o PCAout.eigenvalues.TWstatistics
# plot PC1 and PC2
ploteig -i PCAout.evec -c 1:2 -p poplist -o PCAout.plot.xtxt -x
More of ploteig
.
Welcome!
「如无必要,勿增实体」