http://statgen.us/index.php?title=GWAS_Controlling_for_Population_Substructure&feed=atom&action=history
GWAS Controlling for Population Substructure - Revision history
2024-03-28T11:02:56Z
Revision history for this page on the wiki
MediaWiki 1.26.2
http://statgen.us/index.php?title=GWAS_Controlling_for_Population_Substructure&diff=622&oldid=prev
Zhihuiz at 15:35, 7 June 2018
2018-06-07T15:35:08Z
<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 15:35, 7 June 2018</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">__NOTITLE__</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">==GWAS Controlling for Population Substructure==</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><pre></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><pre></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>plink --file GWAS_clean4 --genome --cluster --mds-plot 10</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>plink --file GWAS_clean4 --genome --cluster --mds-plot 10</div></td></tr>
</table>
Zhihuiz
http://statgen.us/index.php?title=GWAS_Controlling_for_Population_Substructure&diff=598&oldid=prev
Serveradmin: Created page with "<pre> plink --file GWAS_clean4 --genome --cluster --mds-plot 10 #### in R mydata = read.table("mds_components.txt", header=T) mydata$pch[mydata$Group==1 ] <..."
2018-06-07T01:40:09Z
<p>Created page with "<pre> plink --file GWAS_clean4 --genome --cluster --mds-plot 10 #### in R mydata = read.table("mds_components.txt", header=T) mydata$pch[mydata$Group==1 ] <..."</p>
<p><b>New page</b></p><div><pre><br />
plink --file GWAS_clean4 --genome --cluster --mds-plot 10<br />
#### in R<br />
mydata &#61; read.table("mds_components.txt", header&#61;T)<br />
mydata$pch[mydata$Group&#61;&#61;1 ] &lt;-15<br />
mydata$pch[mydata$Group&#61;&#61;2 ] &lt;-16<br />
mydata$pch[mydata$Group&#61;&#61;3 ] &lt;-2<br />
jpeg("mds.jpeg", height&#61;500, width&#61;500)<br />
plot(mydata$C1, mydata$C2 ,pch&#61;mydata$pch)<br />
dev.off()<br />
q()<br />
######<br />
plink --file GWAS_clean4 --pheno pheno.txt --pheno-name Aff --logistic --adjust --out unadj<br />
plink --file GWAS_clean4 --genome --cluster --pca 10 header<br />
plink --file GWAS_clean4 --pheno pheno.txt --pheno-name Aff --covar plink.eigenvec --covar-name PC1 --logistic --adjust --out PC1<br />
plink --file GWAS_clean4 --pheno pheno.txt --pheno-name Aff --covar plink.eigenvec --covar-name PC1-PC2 --logistic --adjust --out PC1-PC2<br />
#### in R<br />
broadqq &lt;-function(pvals, title)<br />
{<br />
observed &lt;- sort(pvals)<br />
lobs &lt;- -(log10(observed))<br />
expected &lt;- c(1:length(observed))<br />
lexp &lt;- -(log10(expected / (length(expected)+1)))<br />
plot(c(0,7), c(0,7), col&#61;"red", lwd&#61;3, type&#61;"l", xlab&#61;"Expected (-logP)", ylab&#61;"Observed (-logP)", xlim&#61;c(0,max(lobs)), ylim&#61;c(0,max(lobs)), las&#61;1, xaxs&#61;"i", yaxs&#61;"i", bty&#61;"l", main &#61; title)<br />
points(lexp, lobs, pch&#61;23, cex&#61;.4, bg&#61;"black") }<br />
jpeg("qqplot_compare.jpeg", height&#61;1000, width&#61;500)<br />
par(mfrow&#61;c(2,1))<br />
aff_unadj&lt;-read.table("unadj.assoc.logistic", header&#61;TRUE)<br />
aff_unadj.add.p&lt;-aff_unadj[aff_unadj$TEST&#61;&#61;c("ADD"),]$P<br />
broadqq(aff_unadj.add.p,"Some Trait Unadjusted")<br />
aff_C1C2&lt;-read.table("PC1-PC2.assoc.logistic", header&#61;TRUE)<br />
aff_C1C2.add.p&lt;-aff_C1C2[aff_C1C2$TEST&#61;&#61;c("ADD"),]$P<br />
broadqq(aff_C1C2.add.p, "Some Trait Adjusted for PC1 and PC2")<br />
dev.off()<br />
gws_unadj &#61; aff_unadj[which(aff_unadj$P &lt; 0.0000001),]<br />
gws_unadj<br />
gws_adjusted &#61; aff_C1C2[which(aff_C1C2$P &lt; 0.0000001),]<br />
gws_adjusted<br />
</pre></div>
Serveradmin