<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://statgen.us/index.php?action=history&amp;feed=atom&amp;title=AdvGeneMap2016Commands</id>
		<title>AdvGeneMap2016Commands - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://statgen.us/index.php?action=history&amp;feed=atom&amp;title=AdvGeneMap2016Commands"/>
		<link rel="alternate" type="text/html" href="http://statgen.us/index.php?title=AdvGeneMap2016Commands&amp;action=history"/>
		<updated>2026-04-05T20:08:53Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>http://statgen.us/index.php?title=AdvGeneMap2016Commands&amp;diff=214&amp;oldid=prev</id>
		<title>Serveradmin: /* GWAS Control Substructure */</title>
		<link rel="alternate" type="text/html" href="http://statgen.us/index.php?title=AdvGeneMap2016Commands&amp;diff=214&amp;oldid=prev"/>
				<updated>2017-01-04T20:50:49Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;GWAS Control Substructure&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 20:50, 4 January 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l166&quot; &gt;Line 166:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 166:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;==GWAS Control Substructure==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;==GWAS Control Substructure==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; plink --file GWAS_clean4 --genome --mds-plot 10 --noweb&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; plink --file GWAS_clean4 --genome --mds-plot 10 --noweb&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; R&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; R&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l201&quot; &gt;Line 201:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 200:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; gws_unadj&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; gws_unadj&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; gws_adjusted = aff_C1C2[which(aff_C1C2$P &amp;lt; 0.0000001),]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; gws_adjusted = aff_C1C2[which(aff_C1C2$P &amp;lt; 0.0000001),]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;gws_adjusted&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/ins&gt;gws_adjusted&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; q()&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; q()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Serveradmin</name></author>	</entry>

	<entry>
		<id>http://statgen.us/index.php?title=AdvGeneMap2016Commands&amp;diff=212&amp;oldid=prev</id>
		<title>Serveradmin: /* GWAS Control Substructure */</title>
		<link rel="alternate" type="text/html" href="http://statgen.us/index.php?title=AdvGeneMap2016Commands&amp;diff=212&amp;oldid=prev"/>
				<updated>2017-01-04T20:49:57Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;GWAS Control Substructure&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 20:49, 4 January 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l166&quot; &gt;Line 166:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 166:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;==GWAS Control Substructure==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;==GWAS Control Substructure==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; plink --file GWAS_clean4 --genome --mds-plot 10 --noweb&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; plink --file GWAS_clean4 --genome --mds-plot 10 --noweb&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; R&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; R&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l199&quot; &gt;Line 199:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 200:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; gws_unadj = aff_unadj[which(aff_unadj$P &amp;lt; 0.0000001),]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; gws_unadj = aff_unadj[which(aff_unadj$P &amp;lt; 0.0000001),]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; gws_unadj&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; gws_unadj&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; gws_adjusted = aff_C1C2[which(aff_C1C2$P &amp;lt; 0.0000001),] gws_adjusted&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; gws_adjusted = aff_C1C2[which(aff_C1C2$P &amp;lt; 0.0000001),]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;gws_adjusted&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; q()&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;#160; q()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Serveradmin</name></author>	</entry>

	<entry>
		<id>http://statgen.us/index.php?title=AdvGeneMap2016Commands&amp;diff=211&amp;oldid=prev</id>
		<title>Serveradmin: Created page with &quot;__NOTITLE__  ==GeneABEL==  plink --file GWAS_clean4 --pheno pheno.phen --pheno-name Aff --transpose --recode --out gwa_gabel --noweb  plink --file GWAS_clean4 --pheno pheno.ph...&quot;</title>
		<link rel="alternate" type="text/html" href="http://statgen.us/index.php?title=AdvGeneMap2016Commands&amp;diff=211&amp;oldid=prev"/>
				<updated>2017-01-04T20:49:25Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTITLE__  ==GeneABEL==  plink --file GWAS_clean4 --pheno pheno.phen --pheno-name Aff --transpose --recode --out gwa_gabel --noweb  plink --file GWAS_clean4 --pheno pheno.ph...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTITLE__&lt;br /&gt;
&lt;br /&gt;
==GeneABEL==&lt;br /&gt;
 plink --file GWAS_clean4 --pheno pheno.phen --pheno-name Aff --transpose --recode --out gwa_gabel --noweb&lt;br /&gt;
 plink --file GWAS_clean4 --pheno pheno.phen --pheno-name systolic --transpose --recode --out gwa_gabel_qtl --noweb&lt;br /&gt;
 R&lt;br /&gt;
 library(GenABEL)&lt;br /&gt;
 convert.snp.tped(tped = &amp;quot;gwa_gabel_qtl.tped&amp;quot;, tfam = &amp;quot;gwa_gabel_qtl.tfam&amp;quot;, out = &amp;quot;gwa_gabel_qtl.raw&amp;quot;, strand = &amp;quot;u&amp;quot;)&lt;br /&gt;
 g.dat &amp;amp;lt;- load.gwaa.data(phen = &amp;quot;gwa_gabel_qtl.praw&amp;quot;, gen = &amp;quot;gwa_gabel_qtl.raw&amp;quot;, force = T)&lt;br /&gt;
 slotNames(g.dat)&lt;br /&gt;
 slotNames(g.dat@gtdata)&lt;br /&gt;
 colnames(g.dat@phdata)&lt;br /&gt;
 sample.size &amp;amp;lt;- g.dat@gtdata@nids&lt;br /&gt;
 snps.total &amp;amp;lt;- g.dat@gtdata@nsnps&lt;br /&gt;
 print(c(sample.size, snps.total))&lt;br /&gt;
 summary(g.dat@phdata$disease)&lt;br /&gt;
 hist(g.dat@phdata$disease, main=&amp;quot;Quantitative Phenotype data summary&amp;quot;, xlab = &amp;quot;Systolic pressure&amp;quot;, freq = F,breaks=20, col=&amp;quot;gray&amp;quot;)&lt;br /&gt;
 rug(g.dat@phdata$disease)&lt;br /&gt;
 test.snp &amp;amp;lt;- scan.glm('disease ~ CRSNP', family = gaussian(), data = g.dat)&lt;br /&gt;
 names(test.snp)  &lt;br /&gt;
 alpha &amp;amp;lt;- 5e-8&lt;br /&gt;
 test.snp$snpnames[test.snp$P1df &amp;lt; alpha]&lt;br /&gt;
 test.snp$P1df[test.snp$P1df &amp;lt; alpha]&lt;br /&gt;
 test.qt &amp;amp;lt;- qtscore(disease, data = g.dat, trait = &amp;quot;gaussian&amp;quot;)&lt;br /&gt;
 slotNames(test.qt)&lt;br /&gt;
 names(test.qt@results)&lt;br /&gt;
 head(results(test.qt))&lt;br /&gt;
 test.qt@lambda&lt;br /&gt;
 descriptives.scan(test.qt)&lt;br /&gt;
 row.names(results(test.qt))[results(test.qt)$P1df &amp;lt; alpha]&lt;br /&gt;
 results(test.qt)$P1df[results(test.qt)$P1df &amp;lt; alpha] results(test.qt)$Pc1df[results(test.qt)$Pc1df &amp;lt; alpha]&lt;br /&gt;
 obs &amp;amp;lt;- sort(results(test.qt)$P1df) &lt;br /&gt;
 ept &amp;amp;lt;- ppoints(obs) &lt;br /&gt;
 plot(-log10(ept), -log10(obs), main = &amp;quot;GWAS QQ plot, qtl&amp;quot;, xlab=&amp;quot;Expected -log10(pvalue)&amp;quot;, ylab=&amp;quot;Observed -log10(pvalue)&amp;quot;)&lt;br /&gt;
 abline(0, 1, col = &amp;quot;red&amp;quot;)&lt;br /&gt;
 abline(h = 8, lty = 2)&lt;br /&gt;
 plot(test.qt, col = &amp;quot;black&amp;quot;)&lt;br /&gt;
 test.qt.sex &amp;amp;lt;- qtscore(disease ~ sex, data = g.dat, trait = &amp;quot;gaussian&amp;quot;)&lt;br /&gt;
 row.names(results(test.qt.sex))[results(test.qt)$P1df &amp;lt; alpha]&lt;br /&gt;
 summary(lm(disease ~ sex, data = g.dat))&lt;br /&gt;
 convert.snp.tped(tped = &amp;quot;gwa_gabel.tped&amp;quot;, tfam = &amp;quot;gwa_gabel.tfam&amp;quot;, out = &amp;quot;gwa_gabel.raw&amp;quot;, strand = &amp;quot;u&amp;quot;)&lt;br /&gt;
 b.dat &amp;amp;lt;- load.gwaa.data(phen = &amp;quot;gwa_gabel.praw&amp;quot;, gen = &amp;quot;gwa_gabel.raw&amp;quot;, force = T)&lt;br /&gt;
 slotNames(b.dat)&lt;br /&gt;
 slotNames(b.dat@gtdata)&lt;br /&gt;
 colnames(b.dat@phdata)&lt;br /&gt;
 b.dat@gtdata@nids&lt;br /&gt;
 case.size &amp;amp;lt;- length(which(b.dat@phdata$disease == 1))&lt;br /&gt;
 control.size &amp;amp;lt;- length(which(b.dat@phdata$disease == 0))&lt;br /&gt;
 case.size &lt;br /&gt;
 control.size &lt;br /&gt;
 snpsb.total &amp;amp;lt;- b.dat@gtdata@nsnps&lt;br /&gt;
 testb.snp &amp;amp;lt;- scan.glm('disease ~ CRSNP', family = binomial(), data = b.dat)&lt;br /&gt;
 names(testb.snp)  &lt;br /&gt;
 alpha &amp;amp;lt;- 5e-8&lt;br /&gt;
 testb.snp$snpnames[testb.snp$P1df &amp;lt; alpha]&lt;br /&gt;
 testb.snp$P1df[testb.snp$P1df &amp;lt; alpha]&lt;br /&gt;
 testb.qt &amp;amp;lt;- qtscore(disease, data = b.dat, trait = &amp;quot;binomial&amp;quot;)&lt;br /&gt;
 slotNames(testb.qt)&lt;br /&gt;
 descriptives.scan(testb.qt)&lt;br /&gt;
 row.names(results(testb.qt))[results(testb.qt)$P1df &amp;lt; alpha]&lt;br /&gt;
 results(testb.qt)$P1df[results(testb.qt)$P1df &amp;lt; alpha]&lt;br /&gt;
 results(testb.qt)$Pc1df[results(testb.qt)$Pc1df &amp;lt; alpha]  &lt;br /&gt;
 gkin &amp;amp;lt;- ibs(g.dat, weight = &amp;quot;freq&amp;quot;)&lt;br /&gt;
 gkin[1:10,1:10]&lt;br /&gt;
 cps.full &amp;amp;lt;- cmdscale(as.dist(.5 - gkin), eig = T, k = 10)&lt;br /&gt;
 names(cps.full)&lt;br /&gt;
 cps &amp;amp;lt;- cps.full$points&lt;br /&gt;
 plot(cps[,1], cps[,2], pch = g.dat@phdata$popn)&lt;br /&gt;
 legend(&amp;quot;topright&amp;quot;, c(&amp;quot;TSI&amp;quot;,&amp;quot;MEX&amp;quot;, &amp;quot;CEU&amp;quot;), pch = c(1,2,3))       &lt;br /&gt;
 colnames(cps)&amp;amp;lt;-c('C1','C2','C3','C4','C5','C6','C7','C8','C9','C10') &lt;br /&gt;
 gpc.dat &amp;amp;lt;- g.dat&lt;br /&gt;
 gpc.dat@phdata&amp;amp;lt;-cbind(g.dat@phdata, cps)&lt;br /&gt;
 test.pc.a &amp;amp;lt;- scan.glm('disease ~ CRSNP + C1 + C2 + C3 + C4 + C5', family=gaussian(), data = gpc.dat)&lt;br /&gt;
 test.pc.a$snpnames[test.pc.a$P1df &amp;lt; alpha]&lt;br /&gt;
 test.pc.a$P1df[test.pc.a$P1df &amp;lt; alpha]&lt;br /&gt;
 test.pc.b &amp;amp;lt;- qtscore(disease ~  C1 + C2 + C3 + C4 + C5, data = gpc.dat, trait = &amp;quot;gaussian&amp;quot;) &lt;br /&gt;
 test.pc.b@lambda&lt;br /&gt;
 plot(cps.full$eig[1:10]/sum(cps.full$eig), axes = F, type = &amp;quot;b&amp;quot;, xlab = &amp;quot;Components&amp;quot;,  ylim = c(0,0.05), ylab = &amp;quot;Proportion of Variations&amp;quot;, main = &amp;quot;MDS analysis scree plot&amp;quot;) &lt;br /&gt;
 axis(1, 1:10)&lt;br /&gt;
 axis(2)&lt;br /&gt;
 plot(cumsum(cps.full$eig[1:10])/sum(cps.full$eig), axes = F, type = &amp;quot;b&amp;quot;, ylim = c(0,0.2), xlab = &amp;quot;Components&amp;quot;, ylab = &amp;quot;Proportion of Variations&amp;quot;, main = &amp;quot;MDS analysis cumulative plot&amp;quot;) &lt;br /&gt;
 axis(1, 1:10)&lt;br /&gt;
 axis(2)&lt;br /&gt;
 row.names(results(test.qt))[results(test.qt)$Pc1df &amp;lt; alpha]&lt;br /&gt;
 results(test.qt)$Pc1df[results(test.qt)$Pc1df &amp;lt; alpha]&lt;br /&gt;
 test.qt@lambda&lt;br /&gt;
 obs &amp;amp;lt;- sort(results(test.qt)$chi2.1df)&lt;br /&gt;
 ept &amp;amp;lt;- sort(qchisq(ppoints(obs), df = 1)) &lt;br /&gt;
 plot(ept, obs, main = &amp;quot;Genomic control (lambda = slope of the dashed line)&amp;quot;, xlab=&amp;quot;Expected chisq, 1df&amp;quot;, ylab=&amp;quot;Observed chisq, 1df&amp;quot;)&lt;br /&gt;
 abline(0, 1, col = &amp;quot;red&amp;quot;)&lt;br /&gt;
 abline(0, test.qt@lambda[1], lty = 2)&lt;br /&gt;
 median(results(test.qt)$chi2.1df)/0.456&lt;br /&gt;
 obs &amp;amp;lt;- sort(results(test.qt)$Pc1df)&lt;br /&gt;
 ept &amp;amp;lt;- ppoints(obs) &lt;br /&gt;
 plot(-log10(ept), -log10(obs), main = &amp;quot;GWAS QQ plot adj. via Genomic Control&amp;quot;, xlab=&amp;quot;Expected -log10(pvalue)&amp;quot;, ylab=&amp;quot;Observed -log10(pvalue)&amp;quot;)&lt;br /&gt;
 abline(0, 1, col = &amp;quot;red&amp;quot;)&lt;br /&gt;
 abline(h = 8, lty = 2) &lt;br /&gt;
 adj.gkin = gkin&lt;br /&gt;
 diag(adj.gkin) = hom(g.dat)$Var&lt;br /&gt;
 test.eg &amp;amp;lt;- egscore(disease, data = g.dat, kin = adj.gkin, naxes = 2)&lt;br /&gt;
 descriptives.scan(test.eg)&lt;br /&gt;
 snp.eg &amp;amp;lt;- row.names(results(test.eg))[results(test.eg)$P1df &amp;lt; alpha]&lt;br /&gt;
 pvalue.eg &amp;amp;lt;- results(test.eg)$P1df[results(test.eg)$P1df &amp;lt; alpha] lambda.eg &amp;amp;lt;- test.eg@lambda&lt;br /&gt;
 snp.eg &lt;br /&gt;
 pvalue.eg&lt;br /&gt;
 lambda.eg&lt;br /&gt;
 for (k in 1:10){&lt;br /&gt;
  test.tmp &amp;amp;lt;- egscore(disease, data = g.dat, kin = adj.gkin, naxes = k)&lt;br /&gt;
 print(test.tmp@lambda$estimate)&lt;br /&gt;
 }&lt;br /&gt;
 obs &amp;amp;lt;- sort(results(test.eg)$Pc1df)&lt;br /&gt;
 ept &amp;amp;lt;- ppoints(obs) &lt;br /&gt;
 plot(-log10(ept), -log10(obs), main = &amp;quot;GWAS QQ plot adj. w/ EIGENSTRAT&amp;quot;, xlab=&amp;quot;Expected -log10(pvalue)&amp;quot;, ylab=&amp;quot;Observed -log10(pvalue)&amp;quot;)&lt;br /&gt;
 abline(0, 1, col = &amp;quot;red&amp;quot;)&lt;br /&gt;
 abline(h = 8, lty = 2)&lt;br /&gt;
 plot(test.qt, col = &amp;quot;black&amp;quot;)&lt;br /&gt;
 add.plot(test.eg, col = &amp;quot;gray&amp;quot;, pch = 3)&lt;br /&gt;
 legend(&amp;quot;topright&amp;quot;, c(&amp;quot;Original plot&amp;quot;,&amp;quot;After correction w/ EIGENSTRAT&amp;quot;), pch = c(1,3))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GWAS Data QC==&lt;br /&gt;
 plink --file GWAS --noweb&lt;br /&gt;
 plink --file GWAS --mind 0.10 --recode --out GWAS_clean_mind --noweb&lt;br /&gt;
 plink --file GWAS_clean_mind --maf 0.05 --recode --out MAF_greater_5 --noweb&lt;br /&gt;
 plink --file GWAS_clean_mind --exclude MAF_greater_5.map --recode --out MAF_less_5 --noweb&lt;br /&gt;
 plink --file MAF_greater_5 --geno 0.05 --recode --out MAF_greater_5_clean --noweb&lt;br /&gt;
 plink --file MAF_less_5 --geno 0.01 --recode --out MAF_less_5_clean --noweb&lt;br /&gt;
 plink --file MAF_greater_5_clean --merge MAF_less_5_clean.ped MAF_less_5_clean.map --recode --out GWAS_MAF_clean --noweb&lt;br /&gt;
 plink --file GWAS_MAF_clean --mind 0.03 --recode --out GWAS_clean2 --noweb&lt;br /&gt;
 plink --file GWAS_clean2 --check-sex --out GWAS_sex_checking --noweb&lt;br /&gt;
 R&lt;br /&gt;
 sexcheck = read.table(&amp;quot;GWAS_sex_checking.sexcheck&amp;quot;, header=T)&lt;br /&gt;
 names(sexcheck)&lt;br /&gt;
 sex_problem = sexcheck[which(sexcheck$STATUS==&amp;quot;PROBLEM&amp;quot;),]&lt;br /&gt;
 sex_problem&lt;br /&gt;
 q()&lt;br /&gt;
 plink --file GWAS_clean2 --genome --out duplicates --noweb&lt;br /&gt;
 R&lt;br /&gt;
 dups = read.table(&amp;quot;duplicates.genome&amp;quot;, header = T)&lt;br /&gt;
 problem_pairs = dups[which(dups$PI_HAT &amp;gt; 0.4),]&lt;br /&gt;
 problem_pairs&lt;br /&gt;
 problem_pairs = dups[which(dups$PI_HAT &amp;gt; 0.05),]&lt;br /&gt;
 myvars = c(&amp;quot;FID1&amp;quot;, &amp;quot;IID1&amp;quot;, &amp;quot;FID2&amp;quot;, &amp;quot;IID2&amp;quot;, &amp;quot;PI_HAT&amp;quot;)&lt;br /&gt;
 problem_pairs[myvars]&lt;br /&gt;
 q()&lt;br /&gt;
 plink --file GWAS_clean2 --remove IBS_excluded.txt --recode --out GWAS_clean3 --noweb&lt;br /&gt;
 plink --file GWAS_clean3 --het --noweb&lt;br /&gt;
 R&lt;br /&gt;
 Dataset &amp;amp;lt;- read.table(&amp;quot;plink.het&amp;quot;, header=TRUE, sep=&amp;quot;&amp;quot;, na.strings=&amp;quot;NA&amp;quot;, dec=&amp;quot;.&amp;quot;,&lt;br /&gt;
 strip.white=TRUE)&lt;br /&gt;
 mean(Dataset$F)&lt;br /&gt;
 sd(Dataset$F)&lt;br /&gt;
 jpeg(&amp;quot;hist.jpeg&amp;quot;, height=1000, width=1000)&lt;br /&gt;
 hist(scale(Dataset$F), xlim=c(-4,4))&lt;br /&gt;
 dev.off()&lt;br /&gt;
 q()&lt;br /&gt;
 plink --file GWAS_clean3 --pheno pheno.txt --pheno-name Aff --hardy --noweb&lt;br /&gt;
 R&lt;br /&gt;
 hardy = read.table(&amp;quot;plink.hwe&amp;quot;, header = T)&lt;br /&gt;
 names(hardy)&lt;br /&gt;
 hwe_prob = hardy[which(hardy$P &amp;lt; 0.0000009),]&lt;br /&gt;
 hwe_prob&lt;br /&gt;
 q()&lt;br /&gt;
 plink --file GWAS_clean3 --exclude HWE_out.txt --recode --out GWAS_clean4 --noweb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GWAS Control Substructure==&lt;br /&gt;
 plink --file GWAS_clean4 --genome --mds-plot 10 --noweb&lt;br /&gt;
 R&lt;br /&gt;
 mydata = read.table(&amp;quot;mds_components.txt&amp;quot;, header=T)&lt;br /&gt;
 mydata$pch[mydata$Group==1 ] &amp;amp;lt;-15&lt;br /&gt;
 mydata$pch[mydata$Group==2 ] &amp;amp;lt;-16&lt;br /&gt;
 mydata$pch[mydata$Group==3 ] &amp;amp;lt;-2&lt;br /&gt;
 jpeg(&amp;quot;mds.jpeg&amp;quot;, height=1000, width=1000)&lt;br /&gt;
 plot(mydata$C1, mydata$C2 ,pch=mydata$pch)&lt;br /&gt;
 dev.off()&lt;br /&gt;
 q()&lt;br /&gt;
 plink --file GWAS_clean4 --pheno pheno.txt --pheno-name Aff --logistic --adjust --out unadj --noweb&lt;br /&gt;
 plink --file GWAS_clean4 --pheno pheno.txt --pheno-name Aff --covar plink.mds --covar-name C1 --logistic --adjust --out C1 --noweb&lt;br /&gt;
 plink --file GWAS_clean4 --pheno pheno.txt --pheno-name Aff --covar plink.mds --covar-name C1-C2 --logistic --adjust --out C1-C2 --noweb&lt;br /&gt;
 R&lt;br /&gt;
 broadqq &amp;amp;lt;-function(pvals, title)&lt;br /&gt;
 {&lt;br /&gt;
 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;observed &amp;amp;lt;- sort(pvals)&lt;br /&gt;
 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;lobs &amp;amp;lt;- -(log10(observed))&lt;br /&gt;
 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;expected &amp;amp;lt;- c(1:length(observed))&lt;br /&gt;
 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;lexp &amp;amp;lt;- -(log10(expected / (length(expected)+1)))&lt;br /&gt;
 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;plot(c(0,7), c(0,7), col=&amp;quot;red&amp;quot;, lwd=3, type=&amp;quot;l&amp;quot;, xlab=&amp;quot;Expected (-logP)&amp;quot;, ylab=&amp;quot;Observed (-logP)&amp;quot;, xlim=c(0,max(lobs)), ylim=c(0,max(lobs)), las=1, xaxs=&amp;quot;i&amp;quot;, yaxs=&amp;quot;i&amp;quot;, bty=&amp;quot;l&amp;quot;, main = title)&lt;br /&gt;
 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;points(lexp, lobs, pch=23, cex=.4, bg=&amp;quot;black&amp;quot;) }&lt;br /&gt;
 jpeg(&amp;quot;qqplot_compare.jpeg&amp;quot;, height=1000, width=1000)&lt;br /&gt;
 par(mfrow=c(2,1))&lt;br /&gt;
 aff_unadj&amp;amp;lt;-read.table(&amp;quot;unadj.assoc.logistic&amp;quot;, header=TRUE)&lt;br /&gt;
 aff_unadj.add.p&amp;amp;lt;-aff_unadj[aff_unadj$TEST==c(&amp;quot;ADD&amp;quot;),]$P&lt;br /&gt;
 broadqq(aff_unadj.add.p,&amp;quot;Some Trait Unadjusted&amp;quot;)&lt;br /&gt;
 aff_C1C2&amp;amp;lt;-read.table(&amp;quot;C1-C2.assoc.logistic&amp;quot;, header=TRUE)&lt;br /&gt;
 aff_C1C2.add.p&amp;amp;lt;-aff_C1C2[aff_C1C2$TEST==c(&amp;quot;ADD&amp;quot;),]$P&lt;br /&gt;
 broadqq(aff_C1C2.add.p, &amp;quot;Some Trait Adjusted&amp;quot;)&lt;br /&gt;
 dev.off()&lt;br /&gt;
 gws_unadj = aff_unadj[which(aff_unadj$P &amp;lt; 0.0000001),]&lt;br /&gt;
 gws_unadj&lt;br /&gt;
 gws_adjusted = aff_C1C2[which(aff_C1C2$P &amp;lt; 0.0000001),] gws_adjusted&lt;br /&gt;
 q()&lt;/div&gt;</summary>
		<author><name>Serveradmin</name></author>	</entry>

	</feed>