E:\cde:E:\E:\cdplink-1E:\plink-1plink–filetest1.Map更新Plink--sheep--filedata--update-mapposition.txt--recode--outdata1Chrnew.txt--update-chr--recode--outdata2Position:SNPcodeandpositionChrnew:SNPcodeandChr.2.SNPmergePlink--filedata1--mergedata2.peddata2.map--recode--outmerge3.提取SNP位点Plink--filedata--extract50kSNP.txt--recode--outdata150kSNP.txt:50k中的SNP名4.QualitycontrolCallrate98%/99%Plink--filesheep--geno0.02--recode--outsheepgenoPlink--filesheepgeno--mind0.01--recode--outsheepmindMAF0.05Plink--filesheepmind--maf0.05--recode--outsheepmafHardy-Weinbergequilibrium0.0001Plink--filesheepmaf--hwe0.0001--recode--outsheephweExcludetheSNPmarkerswitheitherchromosomeorbothunknownPlink--sheep--filesheephwe--extract4newsnp.txt--recode--outsheep4Note:制作4newsnp.txt(包含chromosome和base-pairposition都为0的SNP)Toidentifysampleduplicationorhalf-sibsorcloserPlink–sheep–filesheep4–genome–max0.85Note:Checkthegenomefile5.LDqualitycontrolPlink–sheep--filesheep4–indep-pairwise100250.2–outsheepld0.2Plink--sheep--filesheep4--indep-pairwise100250.05--outsheepld0.05Plink--filesheep4--ld-window-r20.2--outsheepldr0.2输出结果为dataprunein和datapruneout(质控时,要去除X染色体)将dataprunein转化为ped和mapPlink--sheep--file114hwe--extract114sheep0.05.prune.in--recode--outsheepforpca6.PCA-PCA的三个文件:Plink--sheep--filedata(生成LD的文件)--extractdata(LD).prune.in--recode--outsheepforpca1sheepforpca.ped改为5.ped2sheepforpca.map改为5.pedsnp3将sheepforpca制作成二进制文件输出5bplink--filehapmap1--make-bed--outhapmap1结果为5b.farm即为ped文件的前6列,将5b.farm改名为5.pedindNote:5.pedind文件中要将第六列-9换成familyID.参数文件Genotypename:5.pedSnpname:5.pedsnpIndivame:5.pedindEvecoutname:5.pca.evecEvaloutname:5.evalAltnormstyle:NONumoutevec:3Numoutlieriter:5Numoutlierevec:10Outliersigmathresh:6.0Qtmode:NO将上述文件拷贝到eigensoft/bin文件夹内打开命令CdEIG5.01/bin作图命令./smartpca–p5.par./ploteig–I5.pca.evec–c1:2–pAL:BSB:…Tiberan–x5-0即可得到PCA在5.pca.evec文件中可以看到主成分占的比例。7原始SNP数据转化成map和ped文件data=read.csv(E:/SNP/zang.csv)(data=read.csv(E:/SNP/chicken.csv)Ta=t(data)write.table(Ta,file=E:/snp/1.txt,quote=FALSE,sep=,na=0)检查命令:--Compound–genotypes8:近交系数计算,多态性含量,HoHe哈温P值)plink--filefilename--het--outfilename1plink--filefilename--homozyg--outfilename1plink--filefilename--hardy--outfilename1(Plink--filefilename–hardy,结果为plink.hwe)9:ADZE软件计算Ar和pArPlink转化成structure1Plink--filefilename--recode-structure--outfilename12用PGDspider转化ped文件为structure结构。将plink转化的位点信息粘贴到PGDspider转化的文件中全基因组关联分析plink--filedata--removemylist.txt--recode--outfilenameplink--sheep--filefilename--outname–assocplink--sheep--filefilename--outname--assoc--adjustR软件中绘制manhattan图先安装qqman软件library(qqman)results-read.table(D:/plink/plink1/plink.assoc,T)manhattan(results,ylim=c(0,10),col=c(blue4,orange3))R软件中绘制qq-plot图library(qqman)results-read.table(D:/plink/plink1/plink.assoc,T)qq(results$P)用其他关联分析方法:plink--sheep--filemar--outmar-model--model--model-trend--adjustLD分析(haploview)1info文件生成:plink--filehu-M2--recodeHV--outhu-M2HVR安装GenABELInstallpackages(GenABEL)Installpackages(MASS)Installpackages(GenABEL.data)加载安装包Library(MASS)Library(GenABEL.data)Library(GenABEL)在使用GenABEL前需要准备4个文件Ped、map、phen(当ped中含有多个表型时用到)、praw1生成tped、tfram文件Plink–filename–transpose–recode–outgwa-gabel当多个表型时还还需要—pheophenol.phen–pheno-name2制作praw文件格式idsexphen(sex:female=0,male=1phencase=1control=0)“Sss12”10“Sss18”11GLMtestTestb-scan.glm(‘phen~CRSNP’,family=binomial(),data=b.dat)2scoretestTestb.qt-qtscore(phen,data=b.dat,trait=”binomial”)Test.qt@lambda