<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://genome.sph.umich.edu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Clement+Ma</id>
	<title>Genome Analysis Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://genome.sph.umich.edu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Clement+Ma"/>
	<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/wiki/Special:Contributions/Clement_Ma"/>
	<updated>2026-09-25T12:20:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=SeqShop:_Genetic_Association_Analysis_Practical,_December_2014&amp;diff=12376</id>
		<title>SeqShop: Genetic Association Analysis Practical, December 2014</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=SeqShop:_Genetic_Association_Analysis_Practical,_December_2014&amp;diff=12376"/>
		<updated>2014-12-12T12:50:22Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* Single Variant Association Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
[[Media:Seqshop association 2014 06.pdf|View Lecture Slides]]&lt;br /&gt;
&lt;br /&gt;
[[Media:Seqshop association practice 2014 06.pdf|View Introductory Slides for Practical Session]]&lt;br /&gt;
&lt;br /&gt;
== Goals of This Session ==&lt;br /&gt;
&lt;br /&gt;
* Understand how to annotate variants using EPACTS&lt;br /&gt;
* Understand how to run single variant association analysis using EPACTS&lt;br /&gt;
* Understand how to run rare variant association test using EPACTS&lt;br /&gt;
* Understand how to visualize the association output from EPACTS&lt;br /&gt;
&lt;br /&gt;
== Setup in person at the SeqShop Workshop ==&lt;br /&gt;
&#039;&#039;This section is specifically for the SeqShop Workshop computers.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are not running during the SeqShop Workshop, please skip this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are not already logged in, please expand this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
{{SeqShopLogin}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setup your run environment===&lt;br /&gt;
This is the same setup you did for the previous tutorial, but you need to redo it each time you log in.&lt;br /&gt;
&lt;br /&gt;
This will setup some environment variables to point you to&lt;br /&gt;
* [[GotCloud]] program&lt;br /&gt;
* Tutorial input files&lt;br /&gt;
* Setup an output directory&lt;br /&gt;
** It will leave your output directory from the previous tutorial in tact.&lt;br /&gt;
 source /net/seqshop-server/home/mktrost/seqshop/setup.txt&lt;br /&gt;
* You won&#039;t see any output after running &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt;&lt;br /&gt;
** It silently sets up your environment&lt;br /&gt;
** If you want to view the detail of the setup, type&lt;br /&gt;
 less /net/seqshop-server/home/mktrost/seqshop/setup.txt&lt;br /&gt;
and press &#039;q&#039; to finish.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:200px&amp;quot;&amp;gt;&lt;br /&gt;
View setup.txt&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 export GC=/net/seqshop-server/home/mktrost/seqshop/gotcloud&lt;br /&gt;
 export SS=/net/seqshop-server/home/mktrost/seqshop/example&lt;br /&gt;
 export EPACTS=/net/seqshop-server/home/mktrost/seqshop/epacts&lt;br /&gt;
 export OUT=~/out&lt;br /&gt;
 mkdir -p ${OUT}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup when running on your own outside of the SeqShop Workshop ==&lt;br /&gt;
&#039;&#039;This section is specifically for running on your own outside of the SeqShop Workshop.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are running during the SeqShop Workshop, please skip this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tutorial builds on the alignment &amp;amp; snpcall tutorials, if you have not already, please first run those tutorials: [[SeqShop:_Sequence_Mapping_and_Assembly_Practical|Alignment Tutorial]] &amp;amp; [[SeqShop: Variant Calling and Filtering for SNPs Practical|SNP Calling Tutorial]]&lt;br /&gt;
&lt;br /&gt;
=== Download &amp;amp; Build EPACTS ===&lt;br /&gt;
If you do not already have EPACTS:&lt;br /&gt;
* cd to where you want EPACTS installed (you can change this to any directory you want)&lt;br /&gt;
 mkdir -p ~/seqshop&lt;br /&gt;
 cd ~/seqshop/&lt;br /&gt;
* download, decompress, and build the version of epacts that was tested with this tutorial:&lt;br /&gt;
 wget http://www.sph.umich.edu/csg/kang/epacts/download/EPACTS-3.2.6.tar.gz&lt;br /&gt;
 tar xvf EPACTS-3.2.6.tar.gz&lt;br /&gt;
 cd EPACTS-3.2.6&lt;br /&gt;
 ./configure --prefix=$HOME/seqshop/epacts&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ../..&lt;br /&gt;
&lt;br /&gt;
{{SeqShopRemoteEnv}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Additional variables for EPACTS:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible&amp;quot; style=&amp;quot;width:500px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using bash (replace the paths below with the appropriate paths):&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;export EPACTS=~/seqshop/epacts&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:500px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using tcsh (replace the paths below with the appropriate paths):&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;setenv EPACTS ~/seqshop/epacts&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Preparing Input Files ==&lt;br /&gt;
&lt;br /&gt;
=== Input VCF file ===&lt;br /&gt;
&lt;br /&gt;
We will use SNP genotypes from the SNP calling session, after LD-aware genotype refinement.&lt;br /&gt;
Check the contents of the VCF file using the following command.&lt;br /&gt;
&lt;br /&gt;
 zless ${OUT}/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz&lt;br /&gt;
&lt;br /&gt;
=== Phenotype Information ===&lt;br /&gt;
&lt;br /&gt;
Phenotype information is prepared in PED format commonly used in other GWAS software such as MERLIN or PLINK.&lt;br /&gt;
&lt;br /&gt;
 less ${SS}/assoc/seqshop.ped&lt;br /&gt;
&lt;br /&gt;
The first several line should look like below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:200px&amp;quot;&amp;gt;&lt;br /&gt;
View Data&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #FAM_ID	IND_ID	DAD_ID	MOM_ID	SEX	PHENO&lt;br /&gt;
 HG00551	HG00551	0	0	0	0&lt;br /&gt;
 HG00553	HG00553	0	0	0	0&lt;br /&gt;
 HG00554	HG00554	0	0	0	0&lt;br /&gt;
 HG00637	HG00637	0	0	0	0&lt;br /&gt;
 HG00638	HG00638	0	0	0	0&lt;br /&gt;
 HG00640	HG00640	0	0	0	1&lt;br /&gt;
 HG00641	HG00641	0	0	0	1&lt;br /&gt;
 HG00734	HG00734	0	0	0	1&lt;br /&gt;
 HG00736	HG00736	0	0	0	0&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary phenotype can be encoded as 0-1 or 1-2. If the column contains more than two distinct values, it will automatically be recognized as quantitative values.&lt;br /&gt;
&lt;br /&gt;
EPACTS allows PED file to have a header line. The header line should contain the description of each column. EPACTS also accepts a standard PED format where .ped file contains the phenotype data and .dat file contains the information about each column.&lt;br /&gt;
&lt;br /&gt;
=== Installed version of EPACTS ===&lt;br /&gt;
&lt;br /&gt;
EPACTS are installed in the server. If you want to install EPACTS by yourself, visit [[EPACTS]] page for more details&lt;br /&gt;
&lt;br /&gt;
 ls $EPACTS/bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View EPACTS executable files&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 anno   epacts       epacts-cis-extract  epacts-group       epacts-multi     epacts.pm      epstopdf  test_run_epacts.sh&lt;br /&gt;
 bgzip  epacts-anno  epacts-download     epacts-make-group  epacts-pca-plot  epacts-single  pEmmax    vcfast&lt;br /&gt;
 chaps  epacts-cat   epacts-enrich       epacts-make-kin    epacts-plot      epacts-zoom    tabix     wGetOptions.pm&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that some tools undocumented in [[EPACTS]] documentation is under development and may not work.&lt;br /&gt;
&lt;br /&gt;
== Annotating Variants with EPACTS ==&lt;br /&gt;
&lt;br /&gt;
There are multiple software tools that provides a function to annotate variants, such as Variant Effect Predictor (VEP) that is used in 1000 Genomes Project. While most annotation software provides very similar results to each other, their computational efficiency can substantially vary. The annotation software EPACTS provides is extremely fast and can provide genome-wide annotation results in orders of magnitude faster than other widely available annotation software.&lt;br /&gt;
&lt;br /&gt;
In order to annotate variants with EPACTS, one can use &amp;lt;code&amp;gt;epacts-anno&amp;lt;/code&amp;gt; module.&lt;br /&gt;
 &lt;br /&gt;
 mkdir --p $OUT/assoc&lt;br /&gt;
 $EPACTS/bin/epacts-anno --in $OUT/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz --out $OUT/assoc/snps.anno.vcf.gz --ref $SS/ref22/human.g1k.v37.chr22.fa&lt;br /&gt;
&lt;br /&gt;
Then you will see a series of messages before annotation finishes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View the expected messages&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/anno -i /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz -r \&lt;br /&gt;
    /home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa -f refGene -g /home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz \&lt;br /&gt;
   -c /home/hmkang/seqshop/epacts/share/EPACTS/codon.txt -o  /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz --inputFormat vcf \&lt;br /&gt;
   -p /home/hmkang/seqshop/epacts/share/EPACTS/priority.txt&lt;br /&gt;
 The following parameters are available.  Ones with &amp;quot;[]&amp;quot; are in effect:&lt;br /&gt;
 &lt;br /&gt;
 Available Options&lt;br /&gt;
     Required Parameters :&lt;br /&gt;
                          -i [/net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz]&lt;br /&gt;
                          -o [/net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz]&lt;br /&gt;
          Gene Annotation&lt;br /&gt;
             Parameters : -g [/home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz]&lt;br /&gt;
                          -r [/home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa]&lt;br /&gt;
                          --inputFormat [vcf], --checkReference, -f [refGene]&lt;br /&gt;
                          -p [/home/hmkang/seqshop/epacts/share/EPACTS/priority.txt]&lt;br /&gt;
                          -c [/home/hmkang/seqshop/epacts/share/EPACTS/codon.txt]&lt;br /&gt;
                          -u [], -d [], --se [], --si [], --outputFormat []&lt;br /&gt;
  Other Annotation Tools : --genomeScore [], --bed [], --tabix []&lt;br /&gt;
 Load reference genome /home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa...&lt;br /&gt;
 DONE: 1 chromosomes and 51304566 bases are loaded.&lt;br /&gt;
 Load codon file /home/hmkang/seqshop/epacts/share/EPACTS/codon.txt...&lt;br /&gt;
 DONE: codon file loaded.&lt;br /&gt;
 Load priority file /home/hmkang/seqshop/epacts/share/EPACTS/priority.txt...&lt;br /&gt;
 DONE: 24 priority annotation types loaded.&lt;br /&gt;
 Load gene file /home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz...&lt;br /&gt;
 DONE: 92627 gene loaded.&lt;br /&gt;
 DONE: Generated frequency of each annotype type in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.anno.frq ].&lt;br /&gt;
 DONE: Generated frequency of each highest priority annotation type in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.top.anno.frq ].&lt;br /&gt;
 Ts/Tv ratio: 2.35733&lt;br /&gt;
 Ts observed: 2718  times; Tv observed: 1153 times.&lt;br /&gt;
 DONE: Generated frequency of each base change in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.base.frq ].&lt;br /&gt;
 DONE: Generated frequency of each codon change in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.codon.frq ].&lt;br /&gt;
 DONE: Generated frequency of indel length in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.indel.frq ].&lt;br /&gt;
 ..............................................         &lt;br /&gt;
  ...      Anno(tation)                       ...       &lt;br /&gt;
  ...      Xiaowei Zhan, Goncalo Abecasis     ...      &lt;br /&gt;
   ...      Speical Thanks:                    ...     &lt;br /&gt;
    ...      Hyun Ming Kang, Yanming Li         ...    &lt;br /&gt;
     ...      zhanxw@umich.edu                    ...  &lt;br /&gt;
      ...      Sep 2011                            ... &lt;br /&gt;
       ................................................&lt;br /&gt;
                                                       &lt;br /&gt;
 DONE: 3871 varaints are annotated.&lt;br /&gt;
 DONE: Generated annotation output in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz ].&lt;br /&gt;
 Annotation succeed!&lt;br /&gt;
 mv /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/bgzip -c /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp &amp;gt; /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/tabix -pvcf -f /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz&lt;br /&gt;
 rm /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp&lt;br /&gt;
 rm /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.log /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.top.anno.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.anno.frq /net/seqshop- server/hmkang/out/assoc/snps.anno.vcf.gz.base.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.codon.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.indel.frq&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After running annotation, you can check the annotation results. Let&#039;s look at the APOL g1 risk allele we manually examined in the SNP calling section.&lt;br /&gt;
&lt;br /&gt;
 $GC/bin/tabix $OUT/assoc/snps.anno.vcf.gz 22:36661906 | head -1 | cut -f 1-8&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View the annotation results&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 22	36661906	.	A	G	18	PASS	DP=409;MQ=59;NS=62;AN=124;AC=2;AF=0.013827;AB=0.4065;AZ=-0.5287;FIC=-0.0092;&lt;br /&gt;
             SLRT=-0.0075;HWEAF=0.0138;HWDAF=0.0276,0.0000;LBS=36,36,0,0,1,1,0,0;OBS=145,191,0,0,3,2,0,0;STR=-0.040;&lt;br /&gt;
             STZ=-0.740;CBR=0.008;CBZ=0.144;IOR=0.000;IOZ=-1.370;AOI=-5.614;AOZ=-4.243;LQR=0.178;MQ0=0.000;MQ10=0.000;MQ20=0.000;&lt;br /&gt;
             MQ30=0.000;SVM=1.51214;BAVGPOST=0.998;BRSQ=0.941;LDAF=0.0161;AVGPOST=1.0000;RSQ=1.0000;ERATE=0.0019;THETA=0.0013;&lt;br /&gt;
            ANNO=Nonsynonymous:APOL1;ANNOFULL=APOL1/ENST00000397278.3:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/6):Exon|&lt;br /&gt;
            APOL1/ENST00000426053.1:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base971/1143:Codon324/381:Exon5/5):Exon|&lt;br /&gt;
            APOL1/ENST00000422706.1:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/6):Exon|&lt;br /&gt;
            APOL1/ENST00000319136.4:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1073/1245:Codon358/415:Exon7/7):Exon|&lt;br /&gt;
            APOL1/ENST00000347595.7:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base662/834:Codon221/278:Exon3/3):Exon|&lt;br /&gt;
            APOL1/ENST00000397279.4:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/7):Exon&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What is the function of this variant?&lt;br /&gt;
* How many different transcript does the variant overlap with?&lt;br /&gt;
* How can you represent the variant in terms of amino acid changes?&lt;br /&gt;
&lt;br /&gt;
== Single Variant Association Analysis ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s run a single-variant association analysis using a score test. &lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts single --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/single --region 22:36000000-37000000 --test b.score --min-mac 1 --pheno PHENO --run 2&lt;br /&gt;
&lt;br /&gt;
After running it, you will see EPACTS output files by looking at&lt;br /&gt;
&lt;br /&gt;
 ls $OUT/assoc&lt;br /&gt;
&lt;br /&gt;
The top association results can be viewed by&lt;br /&gt;
&lt;br /&gt;
 head $OUT/assoc/single.epacts.top5000&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View top association results&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	AC	CALLRATE	MAF	PVALUE	SCORE	NS.CASE	NS.CTRL	AF.CASE	AF.CTRL&lt;br /&gt;
 22	36995620	36995620	22:36995620_A/G	62	36	1	0.29032	5.6717e-09	5.8262	31	31	0.51613	0.064516&lt;br /&gt;
 22	36993088	36993088	22:36993088_G/C	62	30	1	0.24194	7.3258e-07	4.9525	31	31	0.43548	0.048387&lt;br /&gt;
 22	36997871	36997871	22:36997871_G/T	62	30	1	0.24194	7.3258e-07	4.9525	31	31	0.43548	0.048387&lt;br /&gt;
 22	36987368	36987368	22:36987368_G/A	62	31	1	0.25	2.0898e-06	4.7445	31	31	0.43548	0.064516&lt;br /&gt;
 22	36987861	36987861	22:36987861_A/G	62	31	1	0.25	2.0898e-06	4.7445	31	31	0.43548	0.064516&lt;br /&gt;
 22	36985499	36985499	22:36985499_C/T	62	29	1	0.23387	5.7389e-06	4.5358	31	31	0.40323	0.064516&lt;br /&gt;
 22	36978260	36978260	22:36978260_G/T	62	28	1	0.22581	1.5051e-05	4.3279	31	31	0.3871	0.064516&lt;br /&gt;
 22	36998907	36998907	22:36998907_C/T	62	61	1	0.49194	0.00015557	-3.782	31	31	0.30645	0.67742&lt;br /&gt;
 22	36667082	36667082	22:36667082_T/G	62	28	1	0.22581	0.0003506	-3.5747	31	31	0.080645	0.37097&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
Interpretation for top associated variant chr22:36995620_A/G:&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	AC	CALLRATE	MAF	PVALUE	SCORE	NS.CASE	NS.CTRL	AF.CASE	AF.CTRL&lt;br /&gt;
 22	36995620	36995620	22:36995620_A/G	62	36	1	0.29032	5.6717e-09	5.8262	31	31	0.51613	0.064516&lt;br /&gt;
&lt;br /&gt;
 The score test PVALUE = 5.6717e-09 is strongly significant.&lt;br /&gt;
 For the notation chr22:36995620_A/G, the reference allele is the first allele &amp;quot;A&amp;quot;, and the non-reference (effect) allele is the second allele &amp;quot;G&amp;quot;.&lt;br /&gt;
 The SCORE statistic = 0.29032 is positive (e.g. SCORE&amp;gt;0), meaning that the effect allele INCREASES your risk for disease.  Note that the SCORE is NOT the BETA or log odds ratio.  To calculate the BETA and SE(BETA), you must run the b.wald test.&lt;br /&gt;
 There is a large difference between the allele frequencies for cases and controls.  AF.CASE = 0.51613 &amp;gt;&amp;gt; AF.CTRL = 0.0064516.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can look also visualize the results by QQ-plot and Manhattan plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View QQ plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.epacts.qq.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.epacts.qq.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Manhattan plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.epacts.mh.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.epacts.mh.png|900px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, you can create a zoom plot focusing on the region of interest&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-zoom --vcf $OUT/assoc/snps.anno.vcf.gz --pos 22:36995620 --prefix $OUT/assoc/single&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Zoom Plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.zoom.22.36995620.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.zoom.22.36995620.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run EMMAX, you first need to create a kinship matrix&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-make-kin --vcf $OUT/assoc/snps.anno.vcf.gz --min-maf 0.01 --out $OUT/assoc/snps.anno.kinf --run 2 --chr 22&lt;br /&gt;
&lt;br /&gt;
And run EMMAX test specifying the kinship matrix&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-single --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/emmax --region 22:36000000-37000000 --test q.emmax --pheno PHENO --run 2 --kinf $OUT/assoc/snps.anno.kinf&lt;br /&gt;
&lt;br /&gt;
Then the results may look similar to previous ones.&lt;br /&gt;
&lt;br /&gt;
 head $OUT/assoc/emmax.epacts.top5000&lt;br /&gt;
&lt;br /&gt;
== Run Groupwise Test ==&lt;br /&gt;
&lt;br /&gt;
To run group-wise test such as gene-level burden test, you need to create a marker group file. If your VCF is already annotated, you can create a group file by running&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts make-group --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/snps.anno.grp --nonsyn&lt;br /&gt;
&lt;br /&gt;
The group file is simply a list of marker per group name, as shown below.&lt;br /&gt;
&lt;br /&gt;
 cat $OUT/assoc/snps.anno.grp &lt;br /&gt;
 APOL1	22:36655735_G/A	22:36657740_G/A	22:36661330_G/A	22:36661566_G/A	22:36661646_G/A	22:36661891_G/A	22:36661906_A/G&lt;br /&gt;
 APOL2	22:36623731_T/C	22:36623920_G/A	22:36629466_T/A	22:36633107_C/A&lt;br /&gt;
 APOL3	22:36537763_C/T	22:36537798_G/A	22:36556768_G/A	22:36556823_G/T&lt;br /&gt;
 APOL4	22:36587154_G/T	22:36587202_G/A	22:36587223_G/T	22:36587346_C/T	22:36587511_C/T	22:36587704_T/C	22:36587886_C/T	22:36593714_G/A	22:36597744_A/C	22:36598049_C/G	22:36598058_T/C	22:36598081_A/T&lt;br /&gt;
 APOL5	22:36122356_G/A	22:36122380_T/A	22:36122930_C/T	22:36123083_C/T	22:36124860_C/G&lt;br /&gt;
 FOXRED2	22:36900271_T/C	22:36900806_A/G&lt;br /&gt;
 MYH9	22:36681163_G/C	22:36684354_T/C	22:36710183_T/C&lt;br /&gt;
 Metazoa_SRP	22:36711990_C/G&lt;br /&gt;
 RBFOX2	22:36424450_A/C&lt;br /&gt;
 RP4-633O19__A.1	22:36792162_G/A&lt;br /&gt;
&lt;br /&gt;
If you have your own annotation, you can create your own burden test unit by modifying this file.&lt;br /&gt;
&lt;br /&gt;
If you want to run a collapsing burden test (CMC), run the following command&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts group --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/group.collapse --test b.collapse --groupf $OUT/assoc/snps.anno.grp --pheno PHENO --run 2 &lt;br /&gt;
&lt;br /&gt;
You can view the results by examining the output file&lt;br /&gt;
 cat $OUT/assoc/group.collapse.epacts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Output file&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM  BEGIN   END     MARKER_ID       NS      FRAC_WITH_RARE  NUM_ALL_VARS    NUM_PASS_VARS   NUM_SING_VARS   PVALUE  BETA    SEBETA  ZSTAT&lt;br /&gt;
 22      36655735        36661906        22:36655735-36661906_APOL1      62      0.14516 7       4       0       0.28783 0.80648 0.75876 1.0629&lt;br /&gt;
 22      36623731        36633107        22:36623731-36633107_APOL2      62      0.064516        4       1       0       0.99286 -17.704 1978.1  -0.0089502&lt;br /&gt;
 22      36537763        36556823        22:36537763-36556823_APOL3      62      0.080645        4       2       0       0.643   -0.44056        0.95048 -0.46351&lt;br /&gt;
 22      36587154        36598081        22:36587154-36598081_APOL4      62      0.096774        12      4       0       0.3989  0.76461 0.90638 0.84358&lt;br /&gt;
 22      36122356        36124860        22:36122356-36124860_APOL5      62      0.1129  5       2       0       0.076266        1.9741  1.1136  1.7728&lt;br /&gt;
 22      36900271        36900806        22:36900271-36900806_FOXRED2    NA      NA      2       0       0       NA      NA      NA      NA&lt;br /&gt;
 22      36681163        36710183        22:36681163-36710183_MYH9       62      0.048387        3       1       0       0.9904  16.668  1385.4  0.012031&lt;br /&gt;
 22      36711990        36711990        22:36711990-36711990_Metazoa_SRP        NA      NA      1       0       0       NA      NA      NA      NA&lt;br /&gt;
 22      36424450        36424450        22:36424450-36424450_RBFOX2     62      0.032258        1       1       0       1       5.9095e-16      1.4376  4.1107e-16&lt;br /&gt;
 22      36792162        36792162        22:36792162-36792162_RP4-633O19__A.1    NA      NA      1       0       0       NA      NA      NA      NA&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can run SKAT-O test in a similar way, but with a special tag&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts group --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/group.skato --test skat --skat-o --groupf $OUT/assoc/snps.anno.grp --pheno PHENO --run 2&lt;br /&gt;
&lt;br /&gt;
And view output files&lt;br /&gt;
 &lt;br /&gt;
 cat $OUT/assoc/group.skato.epacts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Output file&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	FRAC_WITH_RARE	NUM_ALL_VARS	NUM_PASS_VARS	NUM_SING_VARS	PVALUE	STATRHO&lt;br /&gt;
 22	36655735	36661906	22:36655735-36661906_APOL1	62	0.14516	7	4	0	0.42748	1&lt;br /&gt;
 22	36623731	36633107	22:36623731-36633107_APOL2	62	0.064516	4	1	0	0.038657	NA&lt;br /&gt;
 22	36537763	36556823	22:36537763-36556823_APOL3	62	0.080645	4	2	0	0.40634	0&lt;br /&gt;
 22	36587154	36598081	22:36587154-36598081_APOL4	62	0.14516	12	4	0	0.67891	0&lt;br /&gt;
 22	36122356	36124860	22:36122356-36124860_APOL5	62	0.1129	5	2	0	0.15055	0.3&lt;br /&gt;
 22	36900271	36900806	22:36900271-36900806_FOXRED2	NA	NA	2	0	0	NA	NA&lt;br /&gt;
 22	36681163	36710183	22:36681163-36710183_MYH9	62	0.032258	3	1	0	1	NA&lt;br /&gt;
 22	36711990	36711990	22:36711990-36711990_Metazoa_SRP	NA	NA	1	0	0	NA	NA&lt;br /&gt;
 22	36424450	36424450	22:36424450-36424450_RBFOX2	62	0.032258	1	1	0	1	NA&lt;br /&gt;
 22	36792162	36792162	22:36792162-36792162_RP4-633O19__A.1	NA	NA	1	0	0	NA	NA&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Return to Ancestry on your own genome==&lt;br /&gt;
Let&#039;s go see if Ancestry finished: [[SeqShop:_Ancestry_On_Your_Own_Genome,_December_2014#Checking_if_Pileup_finished]]&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=SeqShop:_Genetic_Association_Analysis_Practical,_December_2014&amp;diff=12375</id>
		<title>SeqShop: Genetic Association Analysis Practical, December 2014</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=SeqShop:_Genetic_Association_Analysis_Practical,_December_2014&amp;diff=12375"/>
		<updated>2014-12-12T12:49:12Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* Single Variant Association Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
[[Media:Seqshop association 2014 06.pdf|View Lecture Slides]]&lt;br /&gt;
&lt;br /&gt;
[[Media:Seqshop association practice 2014 06.pdf|View Introductory Slides for Practical Session]]&lt;br /&gt;
&lt;br /&gt;
== Goals of This Session ==&lt;br /&gt;
&lt;br /&gt;
* Understand how to annotate variants using EPACTS&lt;br /&gt;
* Understand how to run single variant association analysis using EPACTS&lt;br /&gt;
* Understand how to run rare variant association test using EPACTS&lt;br /&gt;
* Understand how to visualize the association output from EPACTS&lt;br /&gt;
&lt;br /&gt;
== Setup in person at the SeqShop Workshop ==&lt;br /&gt;
&#039;&#039;This section is specifically for the SeqShop Workshop computers.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are not running during the SeqShop Workshop, please skip this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are not already logged in, please expand this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
{{SeqShopLogin}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setup your run environment===&lt;br /&gt;
This is the same setup you did for the previous tutorial, but you need to redo it each time you log in.&lt;br /&gt;
&lt;br /&gt;
This will setup some environment variables to point you to&lt;br /&gt;
* [[GotCloud]] program&lt;br /&gt;
* Tutorial input files&lt;br /&gt;
* Setup an output directory&lt;br /&gt;
** It will leave your output directory from the previous tutorial in tact.&lt;br /&gt;
 source /net/seqshop-server/home/mktrost/seqshop/setup.txt&lt;br /&gt;
* You won&#039;t see any output after running &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt;&lt;br /&gt;
** It silently sets up your environment&lt;br /&gt;
** If you want to view the detail of the setup, type&lt;br /&gt;
 less /net/seqshop-server/home/mktrost/seqshop/setup.txt&lt;br /&gt;
and press &#039;q&#039; to finish.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:200px&amp;quot;&amp;gt;&lt;br /&gt;
View setup.txt&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 export GC=/net/seqshop-server/home/mktrost/seqshop/gotcloud&lt;br /&gt;
 export SS=/net/seqshop-server/home/mktrost/seqshop/example&lt;br /&gt;
 export EPACTS=/net/seqshop-server/home/mktrost/seqshop/epacts&lt;br /&gt;
 export OUT=~/out&lt;br /&gt;
 mkdir -p ${OUT}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup when running on your own outside of the SeqShop Workshop ==&lt;br /&gt;
&#039;&#039;This section is specifically for running on your own outside of the SeqShop Workshop.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are running during the SeqShop Workshop, please skip this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tutorial builds on the alignment &amp;amp; snpcall tutorials, if you have not already, please first run those tutorials: [[SeqShop:_Sequence_Mapping_and_Assembly_Practical|Alignment Tutorial]] &amp;amp; [[SeqShop: Variant Calling and Filtering for SNPs Practical|SNP Calling Tutorial]]&lt;br /&gt;
&lt;br /&gt;
=== Download &amp;amp; Build EPACTS ===&lt;br /&gt;
If you do not already have EPACTS:&lt;br /&gt;
* cd to where you want EPACTS installed (you can change this to any directory you want)&lt;br /&gt;
 mkdir -p ~/seqshop&lt;br /&gt;
 cd ~/seqshop/&lt;br /&gt;
* download, decompress, and build the version of epacts that was tested with this tutorial:&lt;br /&gt;
 wget http://www.sph.umich.edu/csg/kang/epacts/download/EPACTS-3.2.6.tar.gz&lt;br /&gt;
 tar xvf EPACTS-3.2.6.tar.gz&lt;br /&gt;
 cd EPACTS-3.2.6&lt;br /&gt;
 ./configure --prefix=$HOME/seqshop/epacts&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ../..&lt;br /&gt;
&lt;br /&gt;
{{SeqShopRemoteEnv}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Additional variables for EPACTS:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible&amp;quot; style=&amp;quot;width:500px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using bash (replace the paths below with the appropriate paths):&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;export EPACTS=~/seqshop/epacts&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:500px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using tcsh (replace the paths below with the appropriate paths):&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;setenv EPACTS ~/seqshop/epacts&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Preparing Input Files ==&lt;br /&gt;
&lt;br /&gt;
=== Input VCF file ===&lt;br /&gt;
&lt;br /&gt;
We will use SNP genotypes from the SNP calling session, after LD-aware genotype refinement.&lt;br /&gt;
Check the contents of the VCF file using the following command.&lt;br /&gt;
&lt;br /&gt;
 zless ${OUT}/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz&lt;br /&gt;
&lt;br /&gt;
=== Phenotype Information ===&lt;br /&gt;
&lt;br /&gt;
Phenotype information is prepared in PED format commonly used in other GWAS software such as MERLIN or PLINK.&lt;br /&gt;
&lt;br /&gt;
 less ${SS}/assoc/seqshop.ped&lt;br /&gt;
&lt;br /&gt;
The first several line should look like below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:200px&amp;quot;&amp;gt;&lt;br /&gt;
View Data&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #FAM_ID	IND_ID	DAD_ID	MOM_ID	SEX	PHENO&lt;br /&gt;
 HG00551	HG00551	0	0	0	0&lt;br /&gt;
 HG00553	HG00553	0	0	0	0&lt;br /&gt;
 HG00554	HG00554	0	0	0	0&lt;br /&gt;
 HG00637	HG00637	0	0	0	0&lt;br /&gt;
 HG00638	HG00638	0	0	0	0&lt;br /&gt;
 HG00640	HG00640	0	0	0	1&lt;br /&gt;
 HG00641	HG00641	0	0	0	1&lt;br /&gt;
 HG00734	HG00734	0	0	0	1&lt;br /&gt;
 HG00736	HG00736	0	0	0	0&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary phenotype can be encoded as 0-1 or 1-2. If the column contains more than two distinct values, it will automatically be recognized as quantitative values.&lt;br /&gt;
&lt;br /&gt;
EPACTS allows PED file to have a header line. The header line should contain the description of each column. EPACTS also accepts a standard PED format where .ped file contains the phenotype data and .dat file contains the information about each column.&lt;br /&gt;
&lt;br /&gt;
=== Installed version of EPACTS ===&lt;br /&gt;
&lt;br /&gt;
EPACTS are installed in the server. If you want to install EPACTS by yourself, visit [[EPACTS]] page for more details&lt;br /&gt;
&lt;br /&gt;
 ls $EPACTS/bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View EPACTS executable files&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 anno   epacts       epacts-cis-extract  epacts-group       epacts-multi     epacts.pm      epstopdf  test_run_epacts.sh&lt;br /&gt;
 bgzip  epacts-anno  epacts-download     epacts-make-group  epacts-pca-plot  epacts-single  pEmmax    vcfast&lt;br /&gt;
 chaps  epacts-cat   epacts-enrich       epacts-make-kin    epacts-plot      epacts-zoom    tabix     wGetOptions.pm&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that some tools undocumented in [[EPACTS]] documentation is under development and may not work.&lt;br /&gt;
&lt;br /&gt;
== Annotating Variants with EPACTS ==&lt;br /&gt;
&lt;br /&gt;
There are multiple software tools that provides a function to annotate variants, such as Variant Effect Predictor (VEP) that is used in 1000 Genomes Project. While most annotation software provides very similar results to each other, their computational efficiency can substantially vary. The annotation software EPACTS provides is extremely fast and can provide genome-wide annotation results in orders of magnitude faster than other widely available annotation software.&lt;br /&gt;
&lt;br /&gt;
In order to annotate variants with EPACTS, one can use &amp;lt;code&amp;gt;epacts-anno&amp;lt;/code&amp;gt; module.&lt;br /&gt;
 &lt;br /&gt;
 mkdir --p $OUT/assoc&lt;br /&gt;
 $EPACTS/bin/epacts-anno --in $OUT/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz --out $OUT/assoc/snps.anno.vcf.gz --ref $SS/ref22/human.g1k.v37.chr22.fa&lt;br /&gt;
&lt;br /&gt;
Then you will see a series of messages before annotation finishes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View the expected messages&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/anno -i /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz -r \&lt;br /&gt;
    /home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa -f refGene -g /home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz \&lt;br /&gt;
   -c /home/hmkang/seqshop/epacts/share/EPACTS/codon.txt -o  /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz --inputFormat vcf \&lt;br /&gt;
   -p /home/hmkang/seqshop/epacts/share/EPACTS/priority.txt&lt;br /&gt;
 The following parameters are available.  Ones with &amp;quot;[]&amp;quot; are in effect:&lt;br /&gt;
 &lt;br /&gt;
 Available Options&lt;br /&gt;
     Required Parameters :&lt;br /&gt;
                          -i [/net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz]&lt;br /&gt;
                          -o [/net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz]&lt;br /&gt;
          Gene Annotation&lt;br /&gt;
             Parameters : -g [/home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz]&lt;br /&gt;
                          -r [/home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa]&lt;br /&gt;
                          --inputFormat [vcf], --checkReference, -f [refGene]&lt;br /&gt;
                          -p [/home/hmkang/seqshop/epacts/share/EPACTS/priority.txt]&lt;br /&gt;
                          -c [/home/hmkang/seqshop/epacts/share/EPACTS/codon.txt]&lt;br /&gt;
                          -u [], -d [], --se [], --si [], --outputFormat []&lt;br /&gt;
  Other Annotation Tools : --genomeScore [], --bed [], --tabix []&lt;br /&gt;
 Load reference genome /home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa...&lt;br /&gt;
 DONE: 1 chromosomes and 51304566 bases are loaded.&lt;br /&gt;
 Load codon file /home/hmkang/seqshop/epacts/share/EPACTS/codon.txt...&lt;br /&gt;
 DONE: codon file loaded.&lt;br /&gt;
 Load priority file /home/hmkang/seqshop/epacts/share/EPACTS/priority.txt...&lt;br /&gt;
 DONE: 24 priority annotation types loaded.&lt;br /&gt;
 Load gene file /home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz...&lt;br /&gt;
 DONE: 92627 gene loaded.&lt;br /&gt;
 DONE: Generated frequency of each annotype type in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.anno.frq ].&lt;br /&gt;
 DONE: Generated frequency of each highest priority annotation type in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.top.anno.frq ].&lt;br /&gt;
 Ts/Tv ratio: 2.35733&lt;br /&gt;
 Ts observed: 2718  times; Tv observed: 1153 times.&lt;br /&gt;
 DONE: Generated frequency of each base change in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.base.frq ].&lt;br /&gt;
 DONE: Generated frequency of each codon change in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.codon.frq ].&lt;br /&gt;
 DONE: Generated frequency of indel length in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.indel.frq ].&lt;br /&gt;
 ..............................................         &lt;br /&gt;
  ...      Anno(tation)                       ...       &lt;br /&gt;
  ...      Xiaowei Zhan, Goncalo Abecasis     ...      &lt;br /&gt;
   ...      Speical Thanks:                    ...     &lt;br /&gt;
    ...      Hyun Ming Kang, Yanming Li         ...    &lt;br /&gt;
     ...      zhanxw@umich.edu                    ...  &lt;br /&gt;
      ...      Sep 2011                            ... &lt;br /&gt;
       ................................................&lt;br /&gt;
                                                       &lt;br /&gt;
 DONE: 3871 varaints are annotated.&lt;br /&gt;
 DONE: Generated annotation output in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz ].&lt;br /&gt;
 Annotation succeed!&lt;br /&gt;
 mv /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/bgzip -c /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp &amp;gt; /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/tabix -pvcf -f /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz&lt;br /&gt;
 rm /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp&lt;br /&gt;
 rm /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.log /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.top.anno.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.anno.frq /net/seqshop- server/hmkang/out/assoc/snps.anno.vcf.gz.base.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.codon.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.indel.frq&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After running annotation, you can check the annotation results. Let&#039;s look at the APOL g1 risk allele we manually examined in the SNP calling section.&lt;br /&gt;
&lt;br /&gt;
 $GC/bin/tabix $OUT/assoc/snps.anno.vcf.gz 22:36661906 | head -1 | cut -f 1-8&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View the annotation results&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 22	36661906	.	A	G	18	PASS	DP=409;MQ=59;NS=62;AN=124;AC=2;AF=0.013827;AB=0.4065;AZ=-0.5287;FIC=-0.0092;&lt;br /&gt;
             SLRT=-0.0075;HWEAF=0.0138;HWDAF=0.0276,0.0000;LBS=36,36,0,0,1,1,0,0;OBS=145,191,0,0,3,2,0,0;STR=-0.040;&lt;br /&gt;
             STZ=-0.740;CBR=0.008;CBZ=0.144;IOR=0.000;IOZ=-1.370;AOI=-5.614;AOZ=-4.243;LQR=0.178;MQ0=0.000;MQ10=0.000;MQ20=0.000;&lt;br /&gt;
             MQ30=0.000;SVM=1.51214;BAVGPOST=0.998;BRSQ=0.941;LDAF=0.0161;AVGPOST=1.0000;RSQ=1.0000;ERATE=0.0019;THETA=0.0013;&lt;br /&gt;
            ANNO=Nonsynonymous:APOL1;ANNOFULL=APOL1/ENST00000397278.3:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/6):Exon|&lt;br /&gt;
            APOL1/ENST00000426053.1:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base971/1143:Codon324/381:Exon5/5):Exon|&lt;br /&gt;
            APOL1/ENST00000422706.1:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/6):Exon|&lt;br /&gt;
            APOL1/ENST00000319136.4:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1073/1245:Codon358/415:Exon7/7):Exon|&lt;br /&gt;
            APOL1/ENST00000347595.7:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base662/834:Codon221/278:Exon3/3):Exon|&lt;br /&gt;
            APOL1/ENST00000397279.4:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/7):Exon&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What is the function of this variant?&lt;br /&gt;
* How many different transcript does the variant overlap with?&lt;br /&gt;
* How can you represent the variant in terms of amino acid changes?&lt;br /&gt;
&lt;br /&gt;
== Single Variant Association Analysis ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s run a single-variant association analysis using a score test. &lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts single --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/single --region 22:36000000-37000000 --test b.score-min-mac 1 --pheno PHENO --run 2&lt;br /&gt;
&lt;br /&gt;
After running it, you will see EPACTS output files by looking at&lt;br /&gt;
&lt;br /&gt;
 ls $OUT/assoc&lt;br /&gt;
&lt;br /&gt;
The top association results can be viewed by&lt;br /&gt;
&lt;br /&gt;
 head $OUT/assoc/single.epacts.top5000&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View top association results&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	AC	CALLRATE	MAF	PVALUE	SCORE	NS.CASE	NS.CTRL	AF.CASE	AF.CTRL&lt;br /&gt;
 22	36995620	36995620	22:36995620_A/G	62	36	1	0.29032	5.6717e-09	5.8262	31	31	0.51613	0.064516&lt;br /&gt;
 22	36993088	36993088	22:36993088_G/C	62	30	1	0.24194	7.3258e-07	4.9525	31	31	0.43548	0.048387&lt;br /&gt;
 22	36997871	36997871	22:36997871_G/T	62	30	1	0.24194	7.3258e-07	4.9525	31	31	0.43548	0.048387&lt;br /&gt;
 22	36987368	36987368	22:36987368_G/A	62	31	1	0.25	2.0898e-06	4.7445	31	31	0.43548	0.064516&lt;br /&gt;
 22	36987861	36987861	22:36987861_A/G	62	31	1	0.25	2.0898e-06	4.7445	31	31	0.43548	0.064516&lt;br /&gt;
 22	36985499	36985499	22:36985499_C/T	62	29	1	0.23387	5.7389e-06	4.5358	31	31	0.40323	0.064516&lt;br /&gt;
 22	36978260	36978260	22:36978260_G/T	62	28	1	0.22581	1.5051e-05	4.3279	31	31	0.3871	0.064516&lt;br /&gt;
 22	36998907	36998907	22:36998907_C/T	62	61	1	0.49194	0.00015557	-3.782	31	31	0.30645	0.67742&lt;br /&gt;
 22	36667082	36667082	22:36667082_T/G	62	28	1	0.22581	0.0003506	-3.5747	31	31	0.080645	0.37097&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
Interpretation for top associated variant chr22:36995620_A/G:&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	AC	CALLRATE	MAF	PVALUE	SCORE	NS.CASE	NS.CTRL	AF.CASE	AF.CTRL&lt;br /&gt;
 22	36995620	36995620	22:36995620_A/G	62	36	1	0.29032	5.6717e-09	5.8262	31	31	0.51613	0.064516&lt;br /&gt;
&lt;br /&gt;
 The score test PVALUE = 5.6717e-09 is strongly significant.&lt;br /&gt;
 For the notation chr22:36995620_A/G, the reference allele is the first allele &amp;quot;A&amp;quot;, and the non-reference (effect) allele is the second allele &amp;quot;G&amp;quot;.&lt;br /&gt;
 The SCORE statistic = 0.29032 is positive (e.g. SCORE&amp;gt;0), meaning that the effect allele INCREASES your risk for disease.  Note that the SCORE is NOT the BETA or log odds ratio.  To calculate the BETA and SE(BETA), you must run the b.wald test.&lt;br /&gt;
 There is a large difference between the allele frequencies for cases and controls.  AF.CASE = 0.51613 &amp;gt;&amp;gt; AF.CTRL = 0.0064516.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can look also visualize the results by QQ-plot and Manhattan plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View QQ plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.epacts.qq.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.epacts.qq.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Manhattan plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.epacts.mh.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.epacts.mh.png|900px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, you can create a zoom plot focusing on the region of interest&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-zoom --vcf $OUT/assoc/snps.anno.vcf.gz --pos 22:36995620 --prefix $OUT/assoc/single&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Zoom Plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.zoom.22.36995620.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.zoom.22.36995620.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run EMMAX, you first need to create a kinship matrix&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-make-kin --vcf $OUT/assoc/snps.anno.vcf.gz --min-maf 0.01 --out $OUT/assoc/snps.anno.kinf --run 2 --chr 22&lt;br /&gt;
&lt;br /&gt;
And run EMMAX test specifying the kinship matrix&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-single --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/emmax --region 22:36000000-37000000 --test q.emmax --pheno PHENO --run 2 --kinf $OUT/assoc/snps.anno.kinf&lt;br /&gt;
&lt;br /&gt;
Then the results may look similar to previous ones.&lt;br /&gt;
&lt;br /&gt;
 head $OUT/assoc/emmax.epacts.top5000&lt;br /&gt;
&lt;br /&gt;
== Run Groupwise Test ==&lt;br /&gt;
&lt;br /&gt;
To run group-wise test such as gene-level burden test, you need to create a marker group file. If your VCF is already annotated, you can create a group file by running&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts make-group --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/snps.anno.grp --nonsyn&lt;br /&gt;
&lt;br /&gt;
The group file is simply a list of marker per group name, as shown below.&lt;br /&gt;
&lt;br /&gt;
 cat $OUT/assoc/snps.anno.grp &lt;br /&gt;
 APOL1	22:36655735_G/A	22:36657740_G/A	22:36661330_G/A	22:36661566_G/A	22:36661646_G/A	22:36661891_G/A	22:36661906_A/G&lt;br /&gt;
 APOL2	22:36623731_T/C	22:36623920_G/A	22:36629466_T/A	22:36633107_C/A&lt;br /&gt;
 APOL3	22:36537763_C/T	22:36537798_G/A	22:36556768_G/A	22:36556823_G/T&lt;br /&gt;
 APOL4	22:36587154_G/T	22:36587202_G/A	22:36587223_G/T	22:36587346_C/T	22:36587511_C/T	22:36587704_T/C	22:36587886_C/T	22:36593714_G/A	22:36597744_A/C	22:36598049_C/G	22:36598058_T/C	22:36598081_A/T&lt;br /&gt;
 APOL5	22:36122356_G/A	22:36122380_T/A	22:36122930_C/T	22:36123083_C/T	22:36124860_C/G&lt;br /&gt;
 FOXRED2	22:36900271_T/C	22:36900806_A/G&lt;br /&gt;
 MYH9	22:36681163_G/C	22:36684354_T/C	22:36710183_T/C&lt;br /&gt;
 Metazoa_SRP	22:36711990_C/G&lt;br /&gt;
 RBFOX2	22:36424450_A/C&lt;br /&gt;
 RP4-633O19__A.1	22:36792162_G/A&lt;br /&gt;
&lt;br /&gt;
If you have your own annotation, you can create your own burden test unit by modifying this file.&lt;br /&gt;
&lt;br /&gt;
If you want to run a collapsing burden test (CMC), run the following command&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts group --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/group.collapse --test b.collapse --groupf $OUT/assoc/snps.anno.grp --pheno PHENO --run 2 &lt;br /&gt;
&lt;br /&gt;
You can view the results by examining the output file&lt;br /&gt;
 cat $OUT/assoc/group.collapse.epacts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Output file&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM  BEGIN   END     MARKER_ID       NS      FRAC_WITH_RARE  NUM_ALL_VARS    NUM_PASS_VARS   NUM_SING_VARS   PVALUE  BETA    SEBETA  ZSTAT&lt;br /&gt;
 22      36655735        36661906        22:36655735-36661906_APOL1      62      0.14516 7       4       0       0.28783 0.80648 0.75876 1.0629&lt;br /&gt;
 22      36623731        36633107        22:36623731-36633107_APOL2      62      0.064516        4       1       0       0.99286 -17.704 1978.1  -0.0089502&lt;br /&gt;
 22      36537763        36556823        22:36537763-36556823_APOL3      62      0.080645        4       2       0       0.643   -0.44056        0.95048 -0.46351&lt;br /&gt;
 22      36587154        36598081        22:36587154-36598081_APOL4      62      0.096774        12      4       0       0.3989  0.76461 0.90638 0.84358&lt;br /&gt;
 22      36122356        36124860        22:36122356-36124860_APOL5      62      0.1129  5       2       0       0.076266        1.9741  1.1136  1.7728&lt;br /&gt;
 22      36900271        36900806        22:36900271-36900806_FOXRED2    NA      NA      2       0       0       NA      NA      NA      NA&lt;br /&gt;
 22      36681163        36710183        22:36681163-36710183_MYH9       62      0.048387        3       1       0       0.9904  16.668  1385.4  0.012031&lt;br /&gt;
 22      36711990        36711990        22:36711990-36711990_Metazoa_SRP        NA      NA      1       0       0       NA      NA      NA      NA&lt;br /&gt;
 22      36424450        36424450        22:36424450-36424450_RBFOX2     62      0.032258        1       1       0       1       5.9095e-16      1.4376  4.1107e-16&lt;br /&gt;
 22      36792162        36792162        22:36792162-36792162_RP4-633O19__A.1    NA      NA      1       0       0       NA      NA      NA      NA&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can run SKAT-O test in a similar way, but with a special tag&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts group --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/group.skato --test skat --skat-o --groupf $OUT/assoc/snps.anno.grp --pheno PHENO --run 2&lt;br /&gt;
&lt;br /&gt;
And view output files&lt;br /&gt;
 &lt;br /&gt;
 cat $OUT/assoc/group.skato.epacts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Output file&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	FRAC_WITH_RARE	NUM_ALL_VARS	NUM_PASS_VARS	NUM_SING_VARS	PVALUE	STATRHO&lt;br /&gt;
 22	36655735	36661906	22:36655735-36661906_APOL1	62	0.14516	7	4	0	0.42748	1&lt;br /&gt;
 22	36623731	36633107	22:36623731-36633107_APOL2	62	0.064516	4	1	0	0.038657	NA&lt;br /&gt;
 22	36537763	36556823	22:36537763-36556823_APOL3	62	0.080645	4	2	0	0.40634	0&lt;br /&gt;
 22	36587154	36598081	22:36587154-36598081_APOL4	62	0.14516	12	4	0	0.67891	0&lt;br /&gt;
 22	36122356	36124860	22:36122356-36124860_APOL5	62	0.1129	5	2	0	0.15055	0.3&lt;br /&gt;
 22	36900271	36900806	22:36900271-36900806_FOXRED2	NA	NA	2	0	0	NA	NA&lt;br /&gt;
 22	36681163	36710183	22:36681163-36710183_MYH9	62	0.032258	3	1	0	1	NA&lt;br /&gt;
 22	36711990	36711990	22:36711990-36711990_Metazoa_SRP	NA	NA	1	0	0	NA	NA&lt;br /&gt;
 22	36424450	36424450	22:36424450-36424450_RBFOX2	62	0.032258	1	1	0	1	NA&lt;br /&gt;
 22	36792162	36792162	22:36792162-36792162_RP4-633O19__A.1	NA	NA	1	0	0	NA	NA&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Return to Ancestry on your own genome==&lt;br /&gt;
Let&#039;s go see if Ancestry finished: [[SeqShop:_Ancestry_On_Your_Own_Genome,_December_2014#Checking_if_Pileup_finished]]&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=SeqShop:_Genetic_Association_Analysis_Practical,_December_2014&amp;diff=12374</id>
		<title>SeqShop: Genetic Association Analysis Practical, December 2014</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=SeqShop:_Genetic_Association_Analysis_Practical,_December_2014&amp;diff=12374"/>
		<updated>2014-12-12T12:23:12Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* Run Groupwise Test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
[[Media:Seqshop association 2014 06.pdf|View Lecture Slides]]&lt;br /&gt;
&lt;br /&gt;
[[Media:Seqshop association practice 2014 06.pdf|View Introductory Slides for Practical Session]]&lt;br /&gt;
&lt;br /&gt;
== Goals of This Session ==&lt;br /&gt;
&lt;br /&gt;
* Understand how to annotate variants using EPACTS&lt;br /&gt;
* Understand how to run single variant association analysis using EPACTS&lt;br /&gt;
* Understand how to run rare variant association test using EPACTS&lt;br /&gt;
* Understand how to visualize the association output from EPACTS&lt;br /&gt;
&lt;br /&gt;
== Setup in person at the SeqShop Workshop ==&lt;br /&gt;
&#039;&#039;This section is specifically for the SeqShop Workshop computers.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are not running during the SeqShop Workshop, please skip this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are not already logged in, please expand this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
{{SeqShopLogin}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setup your run environment===&lt;br /&gt;
This is the same setup you did for the previous tutorial, but you need to redo it each time you log in.&lt;br /&gt;
&lt;br /&gt;
This will setup some environment variables to point you to&lt;br /&gt;
* [[GotCloud]] program&lt;br /&gt;
* Tutorial input files&lt;br /&gt;
* Setup an output directory&lt;br /&gt;
** It will leave your output directory from the previous tutorial in tact.&lt;br /&gt;
 source /net/seqshop-server/home/mktrost/seqshop/setup.txt&lt;br /&gt;
* You won&#039;t see any output after running &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt;&lt;br /&gt;
** It silently sets up your environment&lt;br /&gt;
** If you want to view the detail of the setup, type&lt;br /&gt;
 less /net/seqshop-server/home/mktrost/seqshop/setup.txt&lt;br /&gt;
and press &#039;q&#039; to finish.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:200px&amp;quot;&amp;gt;&lt;br /&gt;
View setup.txt&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 export GC=/net/seqshop-server/home/mktrost/seqshop/gotcloud&lt;br /&gt;
 export SS=/net/seqshop-server/home/mktrost/seqshop/example&lt;br /&gt;
 export EPACTS=/net/seqshop-server/home/mktrost/seqshop/epacts&lt;br /&gt;
 export OUT=~/out&lt;br /&gt;
 mkdir -p ${OUT}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup when running on your own outside of the SeqShop Workshop ==&lt;br /&gt;
&#039;&#039;This section is specifically for running on your own outside of the SeqShop Workshop.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are running during the SeqShop Workshop, please skip this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tutorial builds on the alignment &amp;amp; snpcall tutorials, if you have not already, please first run those tutorials: [[SeqShop:_Sequence_Mapping_and_Assembly_Practical|Alignment Tutorial]] &amp;amp; [[SeqShop: Variant Calling and Filtering for SNPs Practical|SNP Calling Tutorial]]&lt;br /&gt;
&lt;br /&gt;
=== Download &amp;amp; Build EPACTS ===&lt;br /&gt;
If you do not already have EPACTS:&lt;br /&gt;
* cd to where you want EPACTS installed (you can change this to any directory you want)&lt;br /&gt;
 mkdir -p ~/seqshop&lt;br /&gt;
 cd ~/seqshop/&lt;br /&gt;
* download, decompress, and build the version of epacts that was tested with this tutorial:&lt;br /&gt;
 wget http://www.sph.umich.edu/csg/kang/epacts/download/EPACTS-3.2.6.tar.gz&lt;br /&gt;
 tar xvf EPACTS-3.2.6.tar.gz&lt;br /&gt;
 cd EPACTS-3.2.6&lt;br /&gt;
 ./configure --prefix=$HOME/seqshop/epacts&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ../..&lt;br /&gt;
&lt;br /&gt;
{{SeqShopRemoteEnv}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Additional variables for EPACTS:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible&amp;quot; style=&amp;quot;width:500px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using bash (replace the paths below with the appropriate paths):&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;export EPACTS=~/seqshop/epacts&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:500px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using tcsh (replace the paths below with the appropriate paths):&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;setenv EPACTS ~/seqshop/epacts&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Preparing Input Files ==&lt;br /&gt;
&lt;br /&gt;
=== Input VCF file ===&lt;br /&gt;
&lt;br /&gt;
We will use SNP genotypes from the SNP calling session, after LD-aware genotype refinement.&lt;br /&gt;
Check the contents of the VCF file using the following command.&lt;br /&gt;
&lt;br /&gt;
 zless ${OUT}/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz&lt;br /&gt;
&lt;br /&gt;
=== Phenotype Information ===&lt;br /&gt;
&lt;br /&gt;
Phenotype information is prepared in PED format commonly used in other GWAS software such as MERLIN or PLINK.&lt;br /&gt;
&lt;br /&gt;
 less ${SS}/assoc/seqshop.ped&lt;br /&gt;
&lt;br /&gt;
The first several line should look like below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:200px&amp;quot;&amp;gt;&lt;br /&gt;
View Data&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #FAM_ID	IND_ID	DAD_ID	MOM_ID	SEX	PHENO&lt;br /&gt;
 HG00551	HG00551	0	0	0	0&lt;br /&gt;
 HG00553	HG00553	0	0	0	0&lt;br /&gt;
 HG00554	HG00554	0	0	0	0&lt;br /&gt;
 HG00637	HG00637	0	0	0	0&lt;br /&gt;
 HG00638	HG00638	0	0	0	0&lt;br /&gt;
 HG00640	HG00640	0	0	0	1&lt;br /&gt;
 HG00641	HG00641	0	0	0	1&lt;br /&gt;
 HG00734	HG00734	0	0	0	1&lt;br /&gt;
 HG00736	HG00736	0	0	0	0&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary phenotype can be encoded as 0-1 or 1-2. If the column contains more than two distinct values, it will automatically be recognized as quantitative values.&lt;br /&gt;
&lt;br /&gt;
EPACTS allows PED file to have a header line. The header line should contain the description of each column. EPACTS also accepts a standard PED format where .ped file contains the phenotype data and .dat file contains the information about each column.&lt;br /&gt;
&lt;br /&gt;
=== Installed version of EPACTS ===&lt;br /&gt;
&lt;br /&gt;
EPACTS are installed in the server. If you want to install EPACTS by yourself, visit [[EPACTS]] page for more details&lt;br /&gt;
&lt;br /&gt;
 ls $EPACTS/bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View EPACTS executable files&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 anno   epacts       epacts-cis-extract  epacts-group       epacts-multi     epacts.pm      epstopdf  test_run_epacts.sh&lt;br /&gt;
 bgzip  epacts-anno  epacts-download     epacts-make-group  epacts-pca-plot  epacts-single  pEmmax    vcfast&lt;br /&gt;
 chaps  epacts-cat   epacts-enrich       epacts-make-kin    epacts-plot      epacts-zoom    tabix     wGetOptions.pm&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that some tools undocumented in [[EPACTS]] documentation is under development and may not work.&lt;br /&gt;
&lt;br /&gt;
== Annotating Variants with EPACTS ==&lt;br /&gt;
&lt;br /&gt;
There are multiple software tools that provides a function to annotate variants, such as Variant Effect Predictor (VEP) that is used in 1000 Genomes Project. While most annotation software provides very similar results to each other, their computational efficiency can substantially vary. The annotation software EPACTS provides is extremely fast and can provide genome-wide annotation results in orders of magnitude faster than other widely available annotation software.&lt;br /&gt;
&lt;br /&gt;
In order to annotate variants with EPACTS, one can use &amp;lt;code&amp;gt;epacts-anno&amp;lt;/code&amp;gt; module.&lt;br /&gt;
 &lt;br /&gt;
 mkdir --p $OUT/assoc&lt;br /&gt;
 $EPACTS/bin/epacts-anno --in $OUT/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz --out $OUT/assoc/snps.anno.vcf.gz --ref $SS/ref22/human.g1k.v37.chr22.fa&lt;br /&gt;
&lt;br /&gt;
Then you will see a series of messages before annotation finishes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View the expected messages&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/anno -i /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz -r \&lt;br /&gt;
    /home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa -f refGene -g /home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz \&lt;br /&gt;
   -c /home/hmkang/seqshop/epacts/share/EPACTS/codon.txt -o  /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz --inputFormat vcf \&lt;br /&gt;
   -p /home/hmkang/seqshop/epacts/share/EPACTS/priority.txt&lt;br /&gt;
 The following parameters are available.  Ones with &amp;quot;[]&amp;quot; are in effect:&lt;br /&gt;
 &lt;br /&gt;
 Available Options&lt;br /&gt;
     Required Parameters :&lt;br /&gt;
                          -i [/net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz]&lt;br /&gt;
                          -o [/net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz]&lt;br /&gt;
          Gene Annotation&lt;br /&gt;
             Parameters : -g [/home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz]&lt;br /&gt;
                          -r [/home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa]&lt;br /&gt;
                          --inputFormat [vcf], --checkReference, -f [refGene]&lt;br /&gt;
                          -p [/home/hmkang/seqshop/epacts/share/EPACTS/priority.txt]&lt;br /&gt;
                          -c [/home/hmkang/seqshop/epacts/share/EPACTS/codon.txt]&lt;br /&gt;
                          -u [], -d [], --se [], --si [], --outputFormat []&lt;br /&gt;
  Other Annotation Tools : --genomeScore [], --bed [], --tabix []&lt;br /&gt;
 Load reference genome /home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa...&lt;br /&gt;
 DONE: 1 chromosomes and 51304566 bases are loaded.&lt;br /&gt;
 Load codon file /home/hmkang/seqshop/epacts/share/EPACTS/codon.txt...&lt;br /&gt;
 DONE: codon file loaded.&lt;br /&gt;
 Load priority file /home/hmkang/seqshop/epacts/share/EPACTS/priority.txt...&lt;br /&gt;
 DONE: 24 priority annotation types loaded.&lt;br /&gt;
 Load gene file /home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz...&lt;br /&gt;
 DONE: 92627 gene loaded.&lt;br /&gt;
 DONE: Generated frequency of each annotype type in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.anno.frq ].&lt;br /&gt;
 DONE: Generated frequency of each highest priority annotation type in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.top.anno.frq ].&lt;br /&gt;
 Ts/Tv ratio: 2.35733&lt;br /&gt;
 Ts observed: 2718  times; Tv observed: 1153 times.&lt;br /&gt;
 DONE: Generated frequency of each base change in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.base.frq ].&lt;br /&gt;
 DONE: Generated frequency of each codon change in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.codon.frq ].&lt;br /&gt;
 DONE: Generated frequency of indel length in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.indel.frq ].&lt;br /&gt;
 ..............................................         &lt;br /&gt;
  ...      Anno(tation)                       ...       &lt;br /&gt;
  ...      Xiaowei Zhan, Goncalo Abecasis     ...      &lt;br /&gt;
   ...      Speical Thanks:                    ...     &lt;br /&gt;
    ...      Hyun Ming Kang, Yanming Li         ...    &lt;br /&gt;
     ...      zhanxw@umich.edu                    ...  &lt;br /&gt;
      ...      Sep 2011                            ... &lt;br /&gt;
       ................................................&lt;br /&gt;
                                                       &lt;br /&gt;
 DONE: 3871 varaints are annotated.&lt;br /&gt;
 DONE: Generated annotation output in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz ].&lt;br /&gt;
 Annotation succeed!&lt;br /&gt;
 mv /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/bgzip -c /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp &amp;gt; /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/tabix -pvcf -f /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz&lt;br /&gt;
 rm /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp&lt;br /&gt;
 rm /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.log /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.top.anno.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.anno.frq /net/seqshop- server/hmkang/out/assoc/snps.anno.vcf.gz.base.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.codon.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.indel.frq&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After running annotation, you can check the annotation results. Let&#039;s look at the APOL g1 risk allele we manually examined in the SNP calling section.&lt;br /&gt;
&lt;br /&gt;
 $GC/bin/tabix $OUT/assoc/snps.anno.vcf.gz 22:36661906 | head -1 | cut -f 1-8&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View the annotation results&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 22	36661906	.	A	G	18	PASS	DP=409;MQ=59;NS=62;AN=124;AC=2;AF=0.013827;AB=0.4065;AZ=-0.5287;FIC=-0.0092;&lt;br /&gt;
             SLRT=-0.0075;HWEAF=0.0138;HWDAF=0.0276,0.0000;LBS=36,36,0,0,1,1,0,0;OBS=145,191,0,0,3,2,0,0;STR=-0.040;&lt;br /&gt;
             STZ=-0.740;CBR=0.008;CBZ=0.144;IOR=0.000;IOZ=-1.370;AOI=-5.614;AOZ=-4.243;LQR=0.178;MQ0=0.000;MQ10=0.000;MQ20=0.000;&lt;br /&gt;
             MQ30=0.000;SVM=1.51214;BAVGPOST=0.998;BRSQ=0.941;LDAF=0.0161;AVGPOST=1.0000;RSQ=1.0000;ERATE=0.0019;THETA=0.0013;&lt;br /&gt;
            ANNO=Nonsynonymous:APOL1;ANNOFULL=APOL1/ENST00000397278.3:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/6):Exon|&lt;br /&gt;
            APOL1/ENST00000426053.1:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base971/1143:Codon324/381:Exon5/5):Exon|&lt;br /&gt;
            APOL1/ENST00000422706.1:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/6):Exon|&lt;br /&gt;
            APOL1/ENST00000319136.4:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1073/1245:Codon358/415:Exon7/7):Exon|&lt;br /&gt;
            APOL1/ENST00000347595.7:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base662/834:Codon221/278:Exon3/3):Exon|&lt;br /&gt;
            APOL1/ENST00000397279.4:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/7):Exon&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What is the function of this variant?&lt;br /&gt;
* How many different transcript does the variant overlap with?&lt;br /&gt;
* How can you represent the variant in terms of amino acid changes?&lt;br /&gt;
&lt;br /&gt;
== Single Variant Association Analysis ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s run a single-variant association analysis using a score test. &lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-single --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/single --region 22:36000000-37000000 --test b.score --pheno PHENO --run 2 &lt;br /&gt;
&lt;br /&gt;
After running it, you will see EPACTS output files by looking at&lt;br /&gt;
&lt;br /&gt;
 ls $OUT/assoc&lt;br /&gt;
&lt;br /&gt;
The top association results can be viewed by&lt;br /&gt;
&lt;br /&gt;
 head $OUT/assoc/single.epacts.top5000&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View top association results&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	AC	CALLRATE	MAF	PVALUE	SCORE	NS.CASE	NS.CTRL	AF.CASE	AF.CTRL&lt;br /&gt;
 22	36995620	36995620	22:36995620_A/G	62	36	1	0.29032	5.6717e-09	5.8262	31	31	0.51613	0.064516&lt;br /&gt;
 22	36993088	36993088	22:36993088_G/C	62	30	1	0.24194	7.3258e-07	4.9525	31	31	0.43548	0.048387&lt;br /&gt;
 22	36997871	36997871	22:36997871_G/T	62	30	1	0.24194	7.3258e-07	4.9525	31	31	0.43548	0.048387&lt;br /&gt;
 22	36987368	36987368	22:36987368_G/A	62	31	1	0.25	2.0898e-06	4.7445	31	31	0.43548	0.064516&lt;br /&gt;
 22	36987861	36987861	22:36987861_A/G	62	31	1	0.25	2.0898e-06	4.7445	31	31	0.43548	0.064516&lt;br /&gt;
 22	36985499	36985499	22:36985499_C/T	62	29	1	0.23387	5.7389e-06	4.5358	31	31	0.40323	0.064516&lt;br /&gt;
 22	36978260	36978260	22:36978260_G/T	62	28	1	0.22581	1.5051e-05	4.3279	31	31	0.3871	0.064516&lt;br /&gt;
 22	36998907	36998907	22:36998907_C/T	62	61	1	0.49194	0.00015557	-3.782	31	31	0.30645	0.67742&lt;br /&gt;
 22	36667082	36667082	22:36667082_T/G	62	28	1	0.22581	0.0003506	-3.5747	31	31	0.080645	0.37097&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
Interpretation for top associated variant chr22:36995620_A/G:&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	AC	CALLRATE	MAF	PVALUE	SCORE	NS.CASE	NS.CTRL	AF.CASE	AF.CTRL&lt;br /&gt;
 22	36995620	36995620	22:36995620_A/G	62	36	1	0.29032	5.6717e-09	5.8262	31	31	0.51613	0.064516&lt;br /&gt;
&lt;br /&gt;
 The score test PVALUE = 5.6717e-09 is strongly significant.&lt;br /&gt;
 For the notation chr22:36995620_A/G, the reference allele is the first allele &amp;quot;A&amp;quot;, and the non-reference (effect) allele is the second allele &amp;quot;G&amp;quot;.&lt;br /&gt;
 The SCORE statistic = 0.29032 is positive (e.g. SCORE&amp;gt;0), meaning that the effect allele INCREASES your risk for disease.  Note that the SCORE is NOT the BETA or log odds ratio.  To calculate the BETA and SE(BETA), you must run the b.wald test.&lt;br /&gt;
 There is a large difference between the allele frequencies for cases and controls.  AF.CASE = 0.51613 &amp;gt;&amp;gt; AF.CTRL = 0.0064516.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can look also visualize the results by QQ-plot and Manhattan plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View QQ plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.epacts.qq.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.epacts.qq.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Manhattan plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.epacts.mh.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.epacts.mh.png|900px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, you can create a zoom plot focusing on the region of interest&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-zoom --vcf $OUT/assoc/snps.anno.vcf.gz --pos 22:36995620 --prefix $OUT/assoc/single&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Zoom Plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.zoom.22.36995620.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.zoom.22.36995620.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run EMMAX, you first need to create a kinship matrix&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-make-kin --vcf $OUT/assoc/snps.anno.vcf.gz --min-maf 0.01 --out $OUT/assoc/snps.anno.kinf --run 2 --chr 22&lt;br /&gt;
&lt;br /&gt;
And run EMMAX test specifying the kinship matrix&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-single --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/emmax --region 22:36000000-37000000 --test q.emmax --pheno PHENO --run 2 --kinf $OUT/assoc/snps.anno.kinf&lt;br /&gt;
&lt;br /&gt;
Then the results may look similar to previous ones.&lt;br /&gt;
&lt;br /&gt;
 head $OUT/assoc/emmax.epacts.top5000&lt;br /&gt;
&lt;br /&gt;
== Run Groupwise Test ==&lt;br /&gt;
&lt;br /&gt;
To run group-wise test such as gene-level burden test, you need to create a marker group file. If your VCF is already annotated, you can create a group file by running&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts make-group --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/snps.anno.grp --nonsyn&lt;br /&gt;
&lt;br /&gt;
The group file is simply a list of marker per group name, as shown below.&lt;br /&gt;
&lt;br /&gt;
 cat $OUT/assoc/snps.anno.grp &lt;br /&gt;
 APOL1	22:36655735_G/A	22:36657740_G/A	22:36661330_G/A	22:36661566_G/A	22:36661646_G/A	22:36661891_G/A	22:36661906_A/G&lt;br /&gt;
 APOL2	22:36623731_T/C	22:36623920_G/A	22:36629466_T/A	22:36633107_C/A&lt;br /&gt;
 APOL3	22:36537763_C/T	22:36537798_G/A	22:36556768_G/A	22:36556823_G/T&lt;br /&gt;
 APOL4	22:36587154_G/T	22:36587202_G/A	22:36587223_G/T	22:36587346_C/T	22:36587511_C/T	22:36587704_T/C	22:36587886_C/T	22:36593714_G/A	22:36597744_A/C	22:36598049_C/G	22:36598058_T/C	22:36598081_A/T&lt;br /&gt;
 APOL5	22:36122356_G/A	22:36122380_T/A	22:36122930_C/T	22:36123083_C/T	22:36124860_C/G&lt;br /&gt;
 FOXRED2	22:36900271_T/C	22:36900806_A/G&lt;br /&gt;
 MYH9	22:36681163_G/C	22:36684354_T/C	22:36710183_T/C&lt;br /&gt;
 Metazoa_SRP	22:36711990_C/G&lt;br /&gt;
 RBFOX2	22:36424450_A/C&lt;br /&gt;
 RP4-633O19__A.1	22:36792162_G/A&lt;br /&gt;
&lt;br /&gt;
If you have your own annotation, you can create your own burden test unit by modifying this file.&lt;br /&gt;
&lt;br /&gt;
If you want to run a collapsing burden test (CMC), run the following command&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts group --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/group.collapse --test b.collapse --groupf $OUT/assoc/snps.anno.grp --pheno PHENO --run 2 &lt;br /&gt;
&lt;br /&gt;
You can view the results by examining the output file&lt;br /&gt;
 cat $OUT/assoc/group.collapse.epacts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Output file&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM  BEGIN   END     MARKER_ID       NS      FRAC_WITH_RARE  NUM_ALL_VARS    NUM_PASS_VARS   NUM_SING_VARS   PVALUE  BETA    SEBETA  ZSTAT&lt;br /&gt;
 22      36655735        36661906        22:36655735-36661906_APOL1      62      0.14516 7       4       0       0.28783 0.80648 0.75876 1.0629&lt;br /&gt;
 22      36623731        36633107        22:36623731-36633107_APOL2      62      0.064516        4       1       0       0.99286 -17.704 1978.1  -0.0089502&lt;br /&gt;
 22      36537763        36556823        22:36537763-36556823_APOL3      62      0.080645        4       2       0       0.643   -0.44056        0.95048 -0.46351&lt;br /&gt;
 22      36587154        36598081        22:36587154-36598081_APOL4      62      0.096774        12      4       0       0.3989  0.76461 0.90638 0.84358&lt;br /&gt;
 22      36122356        36124860        22:36122356-36124860_APOL5      62      0.1129  5       2       0       0.076266        1.9741  1.1136  1.7728&lt;br /&gt;
 22      36900271        36900806        22:36900271-36900806_FOXRED2    NA      NA      2       0       0       NA      NA      NA      NA&lt;br /&gt;
 22      36681163        36710183        22:36681163-36710183_MYH9       62      0.048387        3       1       0       0.9904  16.668  1385.4  0.012031&lt;br /&gt;
 22      36711990        36711990        22:36711990-36711990_Metazoa_SRP        NA      NA      1       0       0       NA      NA      NA      NA&lt;br /&gt;
 22      36424450        36424450        22:36424450-36424450_RBFOX2     62      0.032258        1       1       0       1       5.9095e-16      1.4376  4.1107e-16&lt;br /&gt;
 22      36792162        36792162        22:36792162-36792162_RP4-633O19__A.1    NA      NA      1       0       0       NA      NA      NA      NA&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can run SKAT-O test in a similar way, but with a special tag&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts group --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/group.skato --test skat --skat-o --groupf $OUT/assoc/snps.anno.grp --pheno PHENO --run 2&lt;br /&gt;
&lt;br /&gt;
And view output files&lt;br /&gt;
 &lt;br /&gt;
 cat $OUT/assoc/group.skato.epacts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Output file&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	FRAC_WITH_RARE	NUM_ALL_VARS	NUM_PASS_VARS	NUM_SING_VARS	PVALUE	STATRHO&lt;br /&gt;
 22	36655735	36661906	22:36655735-36661906_APOL1	62	0.14516	7	4	0	0.42748	1&lt;br /&gt;
 22	36623731	36633107	22:36623731-36633107_APOL2	62	0.064516	4	1	0	0.038657	NA&lt;br /&gt;
 22	36537763	36556823	22:36537763-36556823_APOL3	62	0.080645	4	2	0	0.40634	0&lt;br /&gt;
 22	36587154	36598081	22:36587154-36598081_APOL4	62	0.14516	12	4	0	0.67891	0&lt;br /&gt;
 22	36122356	36124860	22:36122356-36124860_APOL5	62	0.1129	5	2	0	0.15055	0.3&lt;br /&gt;
 22	36900271	36900806	22:36900271-36900806_FOXRED2	NA	NA	2	0	0	NA	NA&lt;br /&gt;
 22	36681163	36710183	22:36681163-36710183_MYH9	62	0.032258	3	1	0	1	NA&lt;br /&gt;
 22	36711990	36711990	22:36711990-36711990_Metazoa_SRP	NA	NA	1	0	0	NA	NA&lt;br /&gt;
 22	36424450	36424450	22:36424450-36424450_RBFOX2	62	0.032258	1	1	0	1	NA&lt;br /&gt;
 22	36792162	36792162	22:36792162-36792162_RP4-633O19__A.1	NA	NA	1	0	0	NA	NA&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Return to Ancestry on your own genome==&lt;br /&gt;
Let&#039;s go see if Ancestry finished: [[SeqShop:_Ancestry_On_Your_Own_Genome,_December_2014#Checking_if_Pileup_finished]]&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=SeqShop:_Genetic_Association_Analysis_Practical,_December_2014&amp;diff=12373</id>
		<title>SeqShop: Genetic Association Analysis Practical, December 2014</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=SeqShop:_Genetic_Association_Analysis_Practical,_December_2014&amp;diff=12373"/>
		<updated>2014-12-12T12:22:21Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: Undo revision 12372 by Clement Ma (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
[[Media:Seqshop association 2014 06.pdf|View Lecture Slides]]&lt;br /&gt;
&lt;br /&gt;
[[Media:Seqshop association practice 2014 06.pdf|View Introductory Slides for Practical Session]]&lt;br /&gt;
&lt;br /&gt;
== Goals of This Session ==&lt;br /&gt;
&lt;br /&gt;
* Understand how to annotate variants using EPACTS&lt;br /&gt;
* Understand how to run single variant association analysis using EPACTS&lt;br /&gt;
* Understand how to run rare variant association test using EPACTS&lt;br /&gt;
* Understand how to visualize the association output from EPACTS&lt;br /&gt;
&lt;br /&gt;
== Setup in person at the SeqShop Workshop ==&lt;br /&gt;
&#039;&#039;This section is specifically for the SeqShop Workshop computers.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are not running during the SeqShop Workshop, please skip this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are not already logged in, please expand this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
{{SeqShopLogin}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setup your run environment===&lt;br /&gt;
This is the same setup you did for the previous tutorial, but you need to redo it each time you log in.&lt;br /&gt;
&lt;br /&gt;
This will setup some environment variables to point you to&lt;br /&gt;
* [[GotCloud]] program&lt;br /&gt;
* Tutorial input files&lt;br /&gt;
* Setup an output directory&lt;br /&gt;
** It will leave your output directory from the previous tutorial in tact.&lt;br /&gt;
 source /net/seqshop-server/home/mktrost/seqshop/setup.txt&lt;br /&gt;
* You won&#039;t see any output after running &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt;&lt;br /&gt;
** It silently sets up your environment&lt;br /&gt;
** If you want to view the detail of the setup, type&lt;br /&gt;
 less /net/seqshop-server/home/mktrost/seqshop/setup.txt&lt;br /&gt;
and press &#039;q&#039; to finish.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:200px&amp;quot;&amp;gt;&lt;br /&gt;
View setup.txt&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 export GC=/net/seqshop-server/home/mktrost/seqshop/gotcloud&lt;br /&gt;
 export SS=/net/seqshop-server/home/mktrost/seqshop/example&lt;br /&gt;
 export EPACTS=/net/seqshop-server/home/mktrost/seqshop/epacts&lt;br /&gt;
 export OUT=~/out&lt;br /&gt;
 mkdir -p ${OUT}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup when running on your own outside of the SeqShop Workshop ==&lt;br /&gt;
&#039;&#039;This section is specifically for running on your own outside of the SeqShop Workshop.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are running during the SeqShop Workshop, please skip this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tutorial builds on the alignment &amp;amp; snpcall tutorials, if you have not already, please first run those tutorials: [[SeqShop:_Sequence_Mapping_and_Assembly_Practical|Alignment Tutorial]] &amp;amp; [[SeqShop: Variant Calling and Filtering for SNPs Practical|SNP Calling Tutorial]]&lt;br /&gt;
&lt;br /&gt;
=== Download &amp;amp; Build EPACTS ===&lt;br /&gt;
If you do not already have EPACTS:&lt;br /&gt;
* cd to where you want EPACTS installed (you can change this to any directory you want)&lt;br /&gt;
 mkdir -p ~/seqshop&lt;br /&gt;
 cd ~/seqshop/&lt;br /&gt;
* download, decompress, and build the version of epacts that was tested with this tutorial:&lt;br /&gt;
 wget http://www.sph.umich.edu/csg/kang/epacts/download/EPACTS-3.2.6.tar.gz&lt;br /&gt;
 tar xvf EPACTS-3.2.6.tar.gz&lt;br /&gt;
 cd EPACTS-3.2.6&lt;br /&gt;
 ./configure --prefix=$HOME/seqshop/epacts&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ../..&lt;br /&gt;
&lt;br /&gt;
{{SeqShopRemoteEnv}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Additional variables for EPACTS:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible&amp;quot; style=&amp;quot;width:500px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using bash (replace the paths below with the appropriate paths):&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;export EPACTS=~/seqshop/epacts&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:500px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using tcsh (replace the paths below with the appropriate paths):&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;setenv EPACTS ~/seqshop/epacts&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Preparing Input Files ==&lt;br /&gt;
&lt;br /&gt;
=== Input VCF file ===&lt;br /&gt;
&lt;br /&gt;
We will use SNP genotypes from the SNP calling session, after LD-aware genotype refinement.&lt;br /&gt;
Check the contents of the VCF file using the following command.&lt;br /&gt;
&lt;br /&gt;
 zless ${OUT}/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz&lt;br /&gt;
&lt;br /&gt;
=== Phenotype Information ===&lt;br /&gt;
&lt;br /&gt;
Phenotype information is prepared in PED format commonly used in other GWAS software such as MERLIN or PLINK.&lt;br /&gt;
&lt;br /&gt;
 less ${SS}/assoc/seqshop.ped&lt;br /&gt;
&lt;br /&gt;
The first several line should look like below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:200px&amp;quot;&amp;gt;&lt;br /&gt;
View Data&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #FAM_ID	IND_ID	DAD_ID	MOM_ID	SEX	PHENO&lt;br /&gt;
 HG00551	HG00551	0	0	0	0&lt;br /&gt;
 HG00553	HG00553	0	0	0	0&lt;br /&gt;
 HG00554	HG00554	0	0	0	0&lt;br /&gt;
 HG00637	HG00637	0	0	0	0&lt;br /&gt;
 HG00638	HG00638	0	0	0	0&lt;br /&gt;
 HG00640	HG00640	0	0	0	1&lt;br /&gt;
 HG00641	HG00641	0	0	0	1&lt;br /&gt;
 HG00734	HG00734	0	0	0	1&lt;br /&gt;
 HG00736	HG00736	0	0	0	0&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary phenotype can be encoded as 0-1 or 1-2. If the column contains more than two distinct values, it will automatically be recognized as quantitative values.&lt;br /&gt;
&lt;br /&gt;
EPACTS allows PED file to have a header line. The header line should contain the description of each column. EPACTS also accepts a standard PED format where .ped file contains the phenotype data and .dat file contains the information about each column.&lt;br /&gt;
&lt;br /&gt;
=== Installed version of EPACTS ===&lt;br /&gt;
&lt;br /&gt;
EPACTS are installed in the server. If you want to install EPACTS by yourself, visit [[EPACTS]] page for more details&lt;br /&gt;
&lt;br /&gt;
 ls $EPACTS/bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View EPACTS executable files&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 anno   epacts       epacts-cis-extract  epacts-group       epacts-multi     epacts.pm      epstopdf  test_run_epacts.sh&lt;br /&gt;
 bgzip  epacts-anno  epacts-download     epacts-make-group  epacts-pca-plot  epacts-single  pEmmax    vcfast&lt;br /&gt;
 chaps  epacts-cat   epacts-enrich       epacts-make-kin    epacts-plot      epacts-zoom    tabix     wGetOptions.pm&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that some tools undocumented in [[EPACTS]] documentation is under development and may not work.&lt;br /&gt;
&lt;br /&gt;
== Annotating Variants with EPACTS ==&lt;br /&gt;
&lt;br /&gt;
There are multiple software tools that provides a function to annotate variants, such as Variant Effect Predictor (VEP) that is used in 1000 Genomes Project. While most annotation software provides very similar results to each other, their computational efficiency can substantially vary. The annotation software EPACTS provides is extremely fast and can provide genome-wide annotation results in orders of magnitude faster than other widely available annotation software.&lt;br /&gt;
&lt;br /&gt;
In order to annotate variants with EPACTS, one can use &amp;lt;code&amp;gt;epacts-anno&amp;lt;/code&amp;gt; module.&lt;br /&gt;
 &lt;br /&gt;
 mkdir --p $OUT/assoc&lt;br /&gt;
 $EPACTS/bin/epacts-anno --in $OUT/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz --out $OUT/assoc/snps.anno.vcf.gz --ref $SS/ref22/human.g1k.v37.chr22.fa&lt;br /&gt;
&lt;br /&gt;
Then you will see a series of messages before annotation finishes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View the expected messages&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/anno -i /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz -r \&lt;br /&gt;
    /home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa -f refGene -g /home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz \&lt;br /&gt;
   -c /home/hmkang/seqshop/epacts/share/EPACTS/codon.txt -o  /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz --inputFormat vcf \&lt;br /&gt;
   -p /home/hmkang/seqshop/epacts/share/EPACTS/priority.txt&lt;br /&gt;
 The following parameters are available.  Ones with &amp;quot;[]&amp;quot; are in effect:&lt;br /&gt;
 &lt;br /&gt;
 Available Options&lt;br /&gt;
     Required Parameters :&lt;br /&gt;
                          -i [/net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz]&lt;br /&gt;
                          -o [/net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz]&lt;br /&gt;
          Gene Annotation&lt;br /&gt;
             Parameters : -g [/home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz]&lt;br /&gt;
                          -r [/home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa]&lt;br /&gt;
                          --inputFormat [vcf], --checkReference, -f [refGene]&lt;br /&gt;
                          -p [/home/hmkang/seqshop/epacts/share/EPACTS/priority.txt]&lt;br /&gt;
                          -c [/home/hmkang/seqshop/epacts/share/EPACTS/codon.txt]&lt;br /&gt;
                          -u [], -d [], --se [], --si [], --outputFormat []&lt;br /&gt;
  Other Annotation Tools : --genomeScore [], --bed [], --tabix []&lt;br /&gt;
 Load reference genome /home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa...&lt;br /&gt;
 DONE: 1 chromosomes and 51304566 bases are loaded.&lt;br /&gt;
 Load codon file /home/hmkang/seqshop/epacts/share/EPACTS/codon.txt...&lt;br /&gt;
 DONE: codon file loaded.&lt;br /&gt;
 Load priority file /home/hmkang/seqshop/epacts/share/EPACTS/priority.txt...&lt;br /&gt;
 DONE: 24 priority annotation types loaded.&lt;br /&gt;
 Load gene file /home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz...&lt;br /&gt;
 DONE: 92627 gene loaded.&lt;br /&gt;
 DONE: Generated frequency of each annotype type in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.anno.frq ].&lt;br /&gt;
 DONE: Generated frequency of each highest priority annotation type in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.top.anno.frq ].&lt;br /&gt;
 Ts/Tv ratio: 2.35733&lt;br /&gt;
 Ts observed: 2718  times; Tv observed: 1153 times.&lt;br /&gt;
 DONE: Generated frequency of each base change in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.base.frq ].&lt;br /&gt;
 DONE: Generated frequency of each codon change in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.codon.frq ].&lt;br /&gt;
 DONE: Generated frequency of indel length in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.indel.frq ].&lt;br /&gt;
 ..............................................         &lt;br /&gt;
  ...      Anno(tation)                       ...       &lt;br /&gt;
  ...      Xiaowei Zhan, Goncalo Abecasis     ...      &lt;br /&gt;
   ...      Speical Thanks:                    ...     &lt;br /&gt;
    ...      Hyun Ming Kang, Yanming Li         ...    &lt;br /&gt;
     ...      zhanxw@umich.edu                    ...  &lt;br /&gt;
      ...      Sep 2011                            ... &lt;br /&gt;
       ................................................&lt;br /&gt;
                                                       &lt;br /&gt;
 DONE: 3871 varaints are annotated.&lt;br /&gt;
 DONE: Generated annotation output in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz ].&lt;br /&gt;
 Annotation succeed!&lt;br /&gt;
 mv /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/bgzip -c /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp &amp;gt; /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/tabix -pvcf -f /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz&lt;br /&gt;
 rm /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp&lt;br /&gt;
 rm /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.log /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.top.anno.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.anno.frq /net/seqshop- server/hmkang/out/assoc/snps.anno.vcf.gz.base.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.codon.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.indel.frq&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After running annotation, you can check the annotation results. Let&#039;s look at the APOL g1 risk allele we manually examined in the SNP calling section.&lt;br /&gt;
&lt;br /&gt;
 $GC/bin/tabix $OUT/assoc/snps.anno.vcf.gz 22:36661906 | head -1 | cut -f 1-8&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View the annotation results&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 22	36661906	.	A	G	18	PASS	DP=409;MQ=59;NS=62;AN=124;AC=2;AF=0.013827;AB=0.4065;AZ=-0.5287;FIC=-0.0092;&lt;br /&gt;
             SLRT=-0.0075;HWEAF=0.0138;HWDAF=0.0276,0.0000;LBS=36,36,0,0,1,1,0,0;OBS=145,191,0,0,3,2,0,0;STR=-0.040;&lt;br /&gt;
             STZ=-0.740;CBR=0.008;CBZ=0.144;IOR=0.000;IOZ=-1.370;AOI=-5.614;AOZ=-4.243;LQR=0.178;MQ0=0.000;MQ10=0.000;MQ20=0.000;&lt;br /&gt;
             MQ30=0.000;SVM=1.51214;BAVGPOST=0.998;BRSQ=0.941;LDAF=0.0161;AVGPOST=1.0000;RSQ=1.0000;ERATE=0.0019;THETA=0.0013;&lt;br /&gt;
            ANNO=Nonsynonymous:APOL1;ANNOFULL=APOL1/ENST00000397278.3:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/6):Exon|&lt;br /&gt;
            APOL1/ENST00000426053.1:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base971/1143:Codon324/381:Exon5/5):Exon|&lt;br /&gt;
            APOL1/ENST00000422706.1:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/6):Exon|&lt;br /&gt;
            APOL1/ENST00000319136.4:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1073/1245:Codon358/415:Exon7/7):Exon|&lt;br /&gt;
            APOL1/ENST00000347595.7:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base662/834:Codon221/278:Exon3/3):Exon|&lt;br /&gt;
            APOL1/ENST00000397279.4:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/7):Exon&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What is the function of this variant?&lt;br /&gt;
* How many different transcript does the variant overlap with?&lt;br /&gt;
* How can you represent the variant in terms of amino acid changes?&lt;br /&gt;
&lt;br /&gt;
== Single Variant Association Analysis ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s run a single-variant association analysis using a score test. &lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-single --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/single --region 22:36000000-37000000 --test b.score --pheno PHENO --run 2 &lt;br /&gt;
&lt;br /&gt;
After running it, you will see EPACTS output files by looking at&lt;br /&gt;
&lt;br /&gt;
 ls $OUT/assoc&lt;br /&gt;
&lt;br /&gt;
The top association results can be viewed by&lt;br /&gt;
&lt;br /&gt;
 head $OUT/assoc/single.epacts.top5000&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View top association results&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	AC	CALLRATE	MAF	PVALUE	SCORE	NS.CASE	NS.CTRL	AF.CASE	AF.CTRL&lt;br /&gt;
 22	36995620	36995620	22:36995620_A/G	62	36	1	0.29032	5.6717e-09	5.8262	31	31	0.51613	0.064516&lt;br /&gt;
 22	36993088	36993088	22:36993088_G/C	62	30	1	0.24194	7.3258e-07	4.9525	31	31	0.43548	0.048387&lt;br /&gt;
 22	36997871	36997871	22:36997871_G/T	62	30	1	0.24194	7.3258e-07	4.9525	31	31	0.43548	0.048387&lt;br /&gt;
 22	36987368	36987368	22:36987368_G/A	62	31	1	0.25	2.0898e-06	4.7445	31	31	0.43548	0.064516&lt;br /&gt;
 22	36987861	36987861	22:36987861_A/G	62	31	1	0.25	2.0898e-06	4.7445	31	31	0.43548	0.064516&lt;br /&gt;
 22	36985499	36985499	22:36985499_C/T	62	29	1	0.23387	5.7389e-06	4.5358	31	31	0.40323	0.064516&lt;br /&gt;
 22	36978260	36978260	22:36978260_G/T	62	28	1	0.22581	1.5051e-05	4.3279	31	31	0.3871	0.064516&lt;br /&gt;
 22	36998907	36998907	22:36998907_C/T	62	61	1	0.49194	0.00015557	-3.782	31	31	0.30645	0.67742&lt;br /&gt;
 22	36667082	36667082	22:36667082_T/G	62	28	1	0.22581	0.0003506	-3.5747	31	31	0.080645	0.37097&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
Interpretation for top associated variant chr22:36995620_A/G:&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	AC	CALLRATE	MAF	PVALUE	SCORE	NS.CASE	NS.CTRL	AF.CASE	AF.CTRL&lt;br /&gt;
 22	36995620	36995620	22:36995620_A/G	62	36	1	0.29032	5.6717e-09	5.8262	31	31	0.51613	0.064516&lt;br /&gt;
&lt;br /&gt;
 The score test PVALUE = 5.6717e-09 is strongly significant.&lt;br /&gt;
 For the notation chr22:36995620_A/G, the reference allele is the first allele &amp;quot;A&amp;quot;, and the non-reference (effect) allele is the second allele &amp;quot;G&amp;quot;.&lt;br /&gt;
 The SCORE statistic = 0.29032 is positive (e.g. SCORE&amp;gt;0), meaning that the effect allele INCREASES your risk for disease.  Note that the SCORE is NOT the BETA or log odds ratio.  To calculate the BETA and SE(BETA), you must run the b.wald test.&lt;br /&gt;
 There is a large difference between the allele frequencies for cases and controls.  AF.CASE = 0.51613 &amp;gt;&amp;gt; AF.CTRL = 0.0064516.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can look also visualize the results by QQ-plot and Manhattan plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View QQ plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.epacts.qq.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.epacts.qq.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Manhattan plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.epacts.mh.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.epacts.mh.png|900px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, you can create a zoom plot focusing on the region of interest&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-zoom --vcf $OUT/assoc/snps.anno.vcf.gz --pos 22:36995620 --prefix $OUT/assoc/single&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Zoom Plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.zoom.22.36995620.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.zoom.22.36995620.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run EMMAX, you first need to create a kinship matrix&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-make-kin --vcf $OUT/assoc/snps.anno.vcf.gz --min-maf 0.01 --out $OUT/assoc/snps.anno.kinf --run 2 --chr 22&lt;br /&gt;
&lt;br /&gt;
And run EMMAX test specifying the kinship matrix&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-single --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/emmax --region 22:36000000-37000000 --test q.emmax --pheno PHENO --run 2 --kinf $OUT/assoc/snps.anno.kinf&lt;br /&gt;
&lt;br /&gt;
Then the results may look similar to previous ones.&lt;br /&gt;
&lt;br /&gt;
 head $OUT/assoc/emmax.epacts.top5000&lt;br /&gt;
&lt;br /&gt;
== Run Groupwise Test ==&lt;br /&gt;
&lt;br /&gt;
To run group-wise test such as gene-level burden test, you need to create a marker group file. If your VCF is already annotated, you can create a group file by running&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts make-group --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/snps.anno.grp --nonsyn&lt;br /&gt;
&lt;br /&gt;
The group file is simply a list of marker per group name, as shown below.&lt;br /&gt;
&lt;br /&gt;
 cat $OUT/assoc/snps.anno.grp &lt;br /&gt;
 APOL1	22:36655735_G/A	22:36657740_G/A	22:36661330_G/A	22:36661566_G/A	22:36661646_G/A	22:36661891_G/A	22:36661906_A/G&lt;br /&gt;
 APOL2	22:36623731_T/C	22:36623920_G/A	22:36629466_T/A	22:36633107_C/A&lt;br /&gt;
 APOL3	22:36537763_C/T	22:36537798_G/A	22:36556768_G/A	22:36556823_G/T&lt;br /&gt;
 APOL4	22:36587154_G/T	22:36587202_G/A	22:36587223_G/T	22:36587346_C/T	22:36587511_C/T	22:36587704_T/C	22:36587886_C/T	22:36593714_G/A	22:36597744_A/C	22:36598049_C/G	22:36598058_T/C	22:36598081_A/T&lt;br /&gt;
 APOL5	22:36122356_G/A	22:36122380_T/A	22:36122930_C/T	22:36123083_C/T	22:36124860_C/G&lt;br /&gt;
 FOXRED2	22:36900271_T/C	22:36900806_A/G&lt;br /&gt;
 MYH9	22:36681163_G/C	22:36684354_T/C	22:36710183_T/C&lt;br /&gt;
 Metazoa_SRP	22:36711990_C/G&lt;br /&gt;
 RBFOX2	22:36424450_A/C&lt;br /&gt;
 RP4-633O19__A.1	22:36792162_G/A&lt;br /&gt;
&lt;br /&gt;
If you have your own annotation, you can create your own burden test unit by modifying this file.&lt;br /&gt;
&lt;br /&gt;
If you want to run a collapsing burden test (CMC), run the following command&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts group --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/group.collapse --test b.collapse --groupf $OUT/assoc/snps.anno.grp --pheno PHENO --run 2 &lt;br /&gt;
&lt;br /&gt;
You can view the results by examining the output file&lt;br /&gt;
 cat $OUT/assoc/group.collapse.epacts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Output file&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	FRAC_WITH_RARE	NUM_ALL_VARS	NUM_PASS_VARS	NUM_SING_VARS	PVALUE	STATRHO&lt;br /&gt;
 22	36655735	36661906	22:36655735-36661906_APOL1	62	0.14516	7	4	0	0.42748	1&lt;br /&gt;
 22	36623731	36633107	22:36623731-36633107_APOL2	62	0.064516	4	1	0	0.038657	NA&lt;br /&gt;
 22	36537763	36556823	22:36537763-36556823_APOL3	62	0.080645	4	2	0	0.40634	0&lt;br /&gt;
 22	36587154	36598081	22:36587154-36598081_APOL4	62	0.14516	12	4	0	0.67891	0&lt;br /&gt;
 22	36122356	36124860	22:36122356-36124860_APOL5	62	0.1129	5	2	0	0.15055	0.3&lt;br /&gt;
 22	36900271	36900806	22:36900271-36900806_FOXRED2	NA	NA	2	0	0	NA	NA&lt;br /&gt;
 22	36681163	36710183	22:36681163-36710183_MYH9	62	0.032258	3	1	0	1	NA&lt;br /&gt;
 22	36711990	36711990	22:36711990-36711990_Metazoa_SRP	NA	NA	1	0	0	NA	NA&lt;br /&gt;
 22	36424450	36424450	22:36424450-36424450_RBFOX2	62	0.032258	1	1	0	1	NA&lt;br /&gt;
 22	36792162	36792162	22:36792162-36792162_RP4-633O19__A.1	NA	NA	1	0	0	NA	NA&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can run SKAT-O test in a similar way, but with a special tag&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts group --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/group.skato --test skat --skat-o --groupf $OUT/assoc/snps.anno.grp --pheno PHENO --run 2&lt;br /&gt;
&lt;br /&gt;
And view output files&lt;br /&gt;
 &lt;br /&gt;
 cat $OUT/assoc/group.skato.epacts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Output file&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	FRAC_WITH_RARE	NUM_ALL_VARS	NUM_PASS_VARS	NUM_SING_VARS	PVALUE	STATRHO&lt;br /&gt;
 22	36655735	36661906	22:36655735-36661906_APOL1	62	0.14516	7	4	0	0.42748	1&lt;br /&gt;
 22	36623731	36633107	22:36623731-36633107_APOL2	62	0.064516	4	1	0	0.038657	NA&lt;br /&gt;
 22	36537763	36556823	22:36537763-36556823_APOL3	62	0.080645	4	2	0	0.40634	0&lt;br /&gt;
 22	36587154	36598081	22:36587154-36598081_APOL4	62	0.14516	12	4	0	0.67891	0&lt;br /&gt;
 22	36122356	36124860	22:36122356-36124860_APOL5	62	0.1129	5	2	0	0.15055	0.3&lt;br /&gt;
 22	36900271	36900806	22:36900271-36900806_FOXRED2	NA	NA	2	0	0	NA	NA&lt;br /&gt;
 22	36681163	36710183	22:36681163-36710183_MYH9	62	0.032258	3	1	0	1	NA&lt;br /&gt;
 22	36711990	36711990	22:36711990-36711990_Metazoa_SRP	NA	NA	1	0	0	NA	NA&lt;br /&gt;
 22	36424450	36424450	22:36424450-36424450_RBFOX2	62	0.032258	1	1	0	1	NA&lt;br /&gt;
 22	36792162	36792162	22:36792162-36792162_RP4-633O19__A.1	NA	NA	1	0	0	NA	NA&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Return to Ancestry on your own genome==&lt;br /&gt;
Let&#039;s go see if Ancestry finished: [[SeqShop:_Ancestry_On_Your_Own_Genome,_December_2014#Checking_if_Pileup_finished]]&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=SeqShop:_Genetic_Association_Analysis_Practical,_December_2014&amp;diff=12372</id>
		<title>SeqShop: Genetic Association Analysis Practical, December 2014</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=SeqShop:_Genetic_Association_Analysis_Practical,_December_2014&amp;diff=12372"/>
		<updated>2014-12-12T12:21:31Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* Run Groupwise Test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
[[Media:Seqshop association 2014 06.pdf|View Lecture Slides]]&lt;br /&gt;
&lt;br /&gt;
[[Media:Seqshop association practice 2014 06.pdf|View Introductory Slides for Practical Session]]&lt;br /&gt;
&lt;br /&gt;
== Goals of This Session ==&lt;br /&gt;
&lt;br /&gt;
* Understand how to annotate variants using EPACTS&lt;br /&gt;
* Understand how to run single variant association analysis using EPACTS&lt;br /&gt;
* Understand how to run rare variant association test using EPACTS&lt;br /&gt;
* Understand how to visualize the association output from EPACTS&lt;br /&gt;
&lt;br /&gt;
== Setup in person at the SeqShop Workshop ==&lt;br /&gt;
&#039;&#039;This section is specifically for the SeqShop Workshop computers.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are not running during the SeqShop Workshop, please skip this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are not already logged in, please expand this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
{{SeqShopLogin}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setup your run environment===&lt;br /&gt;
This is the same setup you did for the previous tutorial, but you need to redo it each time you log in.&lt;br /&gt;
&lt;br /&gt;
This will setup some environment variables to point you to&lt;br /&gt;
* [[GotCloud]] program&lt;br /&gt;
* Tutorial input files&lt;br /&gt;
* Setup an output directory&lt;br /&gt;
** It will leave your output directory from the previous tutorial in tact.&lt;br /&gt;
 source /net/seqshop-server/home/mktrost/seqshop/setup.txt&lt;br /&gt;
* You won&#039;t see any output after running &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt;&lt;br /&gt;
** It silently sets up your environment&lt;br /&gt;
** If you want to view the detail of the setup, type&lt;br /&gt;
 less /net/seqshop-server/home/mktrost/seqshop/setup.txt&lt;br /&gt;
and press &#039;q&#039; to finish.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:200px&amp;quot;&amp;gt;&lt;br /&gt;
View setup.txt&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 export GC=/net/seqshop-server/home/mktrost/seqshop/gotcloud&lt;br /&gt;
 export SS=/net/seqshop-server/home/mktrost/seqshop/example&lt;br /&gt;
 export EPACTS=/net/seqshop-server/home/mktrost/seqshop/epacts&lt;br /&gt;
 export OUT=~/out&lt;br /&gt;
 mkdir -p ${OUT}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup when running on your own outside of the SeqShop Workshop ==&lt;br /&gt;
&#039;&#039;This section is specifically for running on your own outside of the SeqShop Workshop.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are running during the SeqShop Workshop, please skip this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tutorial builds on the alignment &amp;amp; snpcall tutorials, if you have not already, please first run those tutorials: [[SeqShop:_Sequence_Mapping_and_Assembly_Practical|Alignment Tutorial]] &amp;amp; [[SeqShop: Variant Calling and Filtering for SNPs Practical|SNP Calling Tutorial]]&lt;br /&gt;
&lt;br /&gt;
=== Download &amp;amp; Build EPACTS ===&lt;br /&gt;
If you do not already have EPACTS:&lt;br /&gt;
* cd to where you want EPACTS installed (you can change this to any directory you want)&lt;br /&gt;
 mkdir -p ~/seqshop&lt;br /&gt;
 cd ~/seqshop/&lt;br /&gt;
* download, decompress, and build the version of epacts that was tested with this tutorial:&lt;br /&gt;
 wget http://www.sph.umich.edu/csg/kang/epacts/download/EPACTS-3.2.6.tar.gz&lt;br /&gt;
 tar xvf EPACTS-3.2.6.tar.gz&lt;br /&gt;
 cd EPACTS-3.2.6&lt;br /&gt;
 ./configure --prefix=$HOME/seqshop/epacts&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ../..&lt;br /&gt;
&lt;br /&gt;
{{SeqShopRemoteEnv}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Additional variables for EPACTS:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible&amp;quot; style=&amp;quot;width:500px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using bash (replace the paths below with the appropriate paths):&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;export EPACTS=~/seqshop/epacts&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:500px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using tcsh (replace the paths below with the appropriate paths):&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;setenv EPACTS ~/seqshop/epacts&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Preparing Input Files ==&lt;br /&gt;
&lt;br /&gt;
=== Input VCF file ===&lt;br /&gt;
&lt;br /&gt;
We will use SNP genotypes from the SNP calling session, after LD-aware genotype refinement.&lt;br /&gt;
Check the contents of the VCF file using the following command.&lt;br /&gt;
&lt;br /&gt;
 zless ${OUT}/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz&lt;br /&gt;
&lt;br /&gt;
=== Phenotype Information ===&lt;br /&gt;
&lt;br /&gt;
Phenotype information is prepared in PED format commonly used in other GWAS software such as MERLIN or PLINK.&lt;br /&gt;
&lt;br /&gt;
 less ${SS}/assoc/seqshop.ped&lt;br /&gt;
&lt;br /&gt;
The first several line should look like below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:200px&amp;quot;&amp;gt;&lt;br /&gt;
View Data&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #FAM_ID	IND_ID	DAD_ID	MOM_ID	SEX	PHENO&lt;br /&gt;
 HG00551	HG00551	0	0	0	0&lt;br /&gt;
 HG00553	HG00553	0	0	0	0&lt;br /&gt;
 HG00554	HG00554	0	0	0	0&lt;br /&gt;
 HG00637	HG00637	0	0	0	0&lt;br /&gt;
 HG00638	HG00638	0	0	0	0&lt;br /&gt;
 HG00640	HG00640	0	0	0	1&lt;br /&gt;
 HG00641	HG00641	0	0	0	1&lt;br /&gt;
 HG00734	HG00734	0	0	0	1&lt;br /&gt;
 HG00736	HG00736	0	0	0	0&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary phenotype can be encoded as 0-1 or 1-2. If the column contains more than two distinct values, it will automatically be recognized as quantitative values.&lt;br /&gt;
&lt;br /&gt;
EPACTS allows PED file to have a header line. The header line should contain the description of each column. EPACTS also accepts a standard PED format where .ped file contains the phenotype data and .dat file contains the information about each column.&lt;br /&gt;
&lt;br /&gt;
=== Installed version of EPACTS ===&lt;br /&gt;
&lt;br /&gt;
EPACTS are installed in the server. If you want to install EPACTS by yourself, visit [[EPACTS]] page for more details&lt;br /&gt;
&lt;br /&gt;
 ls $EPACTS/bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View EPACTS executable files&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 anno   epacts       epacts-cis-extract  epacts-group       epacts-multi     epacts.pm      epstopdf  test_run_epacts.sh&lt;br /&gt;
 bgzip  epacts-anno  epacts-download     epacts-make-group  epacts-pca-plot  epacts-single  pEmmax    vcfast&lt;br /&gt;
 chaps  epacts-cat   epacts-enrich       epacts-make-kin    epacts-plot      epacts-zoom    tabix     wGetOptions.pm&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that some tools undocumented in [[EPACTS]] documentation is under development and may not work.&lt;br /&gt;
&lt;br /&gt;
== Annotating Variants with EPACTS ==&lt;br /&gt;
&lt;br /&gt;
There are multiple software tools that provides a function to annotate variants, such as Variant Effect Predictor (VEP) that is used in 1000 Genomes Project. While most annotation software provides very similar results to each other, their computational efficiency can substantially vary. The annotation software EPACTS provides is extremely fast and can provide genome-wide annotation results in orders of magnitude faster than other widely available annotation software.&lt;br /&gt;
&lt;br /&gt;
In order to annotate variants with EPACTS, one can use &amp;lt;code&amp;gt;epacts-anno&amp;lt;/code&amp;gt; module.&lt;br /&gt;
 &lt;br /&gt;
 mkdir --p $OUT/assoc&lt;br /&gt;
 $EPACTS/bin/epacts-anno --in $OUT/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz --out $OUT/assoc/snps.anno.vcf.gz --ref $SS/ref22/human.g1k.v37.chr22.fa&lt;br /&gt;
&lt;br /&gt;
Then you will see a series of messages before annotation finishes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View the expected messages&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/anno -i /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz -r \&lt;br /&gt;
    /home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa -f refGene -g /home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz \&lt;br /&gt;
   -c /home/hmkang/seqshop/epacts/share/EPACTS/codon.txt -o  /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz --inputFormat vcf \&lt;br /&gt;
   -p /home/hmkang/seqshop/epacts/share/EPACTS/priority.txt&lt;br /&gt;
 The following parameters are available.  Ones with &amp;quot;[]&amp;quot; are in effect:&lt;br /&gt;
 &lt;br /&gt;
 Available Options&lt;br /&gt;
     Required Parameters :&lt;br /&gt;
                          -i [/net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz]&lt;br /&gt;
                          -o [/net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz]&lt;br /&gt;
          Gene Annotation&lt;br /&gt;
             Parameters : -g [/home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz]&lt;br /&gt;
                          -r [/home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa]&lt;br /&gt;
                          --inputFormat [vcf], --checkReference, -f [refGene]&lt;br /&gt;
                          -p [/home/hmkang/seqshop/epacts/share/EPACTS/priority.txt]&lt;br /&gt;
                          -c [/home/hmkang/seqshop/epacts/share/EPACTS/codon.txt]&lt;br /&gt;
                          -u [], -d [], --se [], --si [], --outputFormat []&lt;br /&gt;
  Other Annotation Tools : --genomeScore [], --bed [], --tabix []&lt;br /&gt;
 Load reference genome /home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa...&lt;br /&gt;
 DONE: 1 chromosomes and 51304566 bases are loaded.&lt;br /&gt;
 Load codon file /home/hmkang/seqshop/epacts/share/EPACTS/codon.txt...&lt;br /&gt;
 DONE: codon file loaded.&lt;br /&gt;
 Load priority file /home/hmkang/seqshop/epacts/share/EPACTS/priority.txt...&lt;br /&gt;
 DONE: 24 priority annotation types loaded.&lt;br /&gt;
 Load gene file /home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz...&lt;br /&gt;
 DONE: 92627 gene loaded.&lt;br /&gt;
 DONE: Generated frequency of each annotype type in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.anno.frq ].&lt;br /&gt;
 DONE: Generated frequency of each highest priority annotation type in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.top.anno.frq ].&lt;br /&gt;
 Ts/Tv ratio: 2.35733&lt;br /&gt;
 Ts observed: 2718  times; Tv observed: 1153 times.&lt;br /&gt;
 DONE: Generated frequency of each base change in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.base.frq ].&lt;br /&gt;
 DONE: Generated frequency of each codon change in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.codon.frq ].&lt;br /&gt;
 DONE: Generated frequency of indel length in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.indel.frq ].&lt;br /&gt;
 ..............................................         &lt;br /&gt;
  ...      Anno(tation)                       ...       &lt;br /&gt;
  ...      Xiaowei Zhan, Goncalo Abecasis     ...      &lt;br /&gt;
   ...      Speical Thanks:                    ...     &lt;br /&gt;
    ...      Hyun Ming Kang, Yanming Li         ...    &lt;br /&gt;
     ...      zhanxw@umich.edu                    ...  &lt;br /&gt;
      ...      Sep 2011                            ... &lt;br /&gt;
       ................................................&lt;br /&gt;
                                                       &lt;br /&gt;
 DONE: 3871 varaints are annotated.&lt;br /&gt;
 DONE: Generated annotation output in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz ].&lt;br /&gt;
 Annotation succeed!&lt;br /&gt;
 mv /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/bgzip -c /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp &amp;gt; /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/tabix -pvcf -f /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz&lt;br /&gt;
 rm /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp&lt;br /&gt;
 rm /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.log /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.top.anno.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.anno.frq /net/seqshop- server/hmkang/out/assoc/snps.anno.vcf.gz.base.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.codon.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.indel.frq&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After running annotation, you can check the annotation results. Let&#039;s look at the APOL g1 risk allele we manually examined in the SNP calling section.&lt;br /&gt;
&lt;br /&gt;
 $GC/bin/tabix $OUT/assoc/snps.anno.vcf.gz 22:36661906 | head -1 | cut -f 1-8&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View the annotation results&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 22	36661906	.	A	G	18	PASS	DP=409;MQ=59;NS=62;AN=124;AC=2;AF=0.013827;AB=0.4065;AZ=-0.5287;FIC=-0.0092;&lt;br /&gt;
             SLRT=-0.0075;HWEAF=0.0138;HWDAF=0.0276,0.0000;LBS=36,36,0,0,1,1,0,0;OBS=145,191,0,0,3,2,0,0;STR=-0.040;&lt;br /&gt;
             STZ=-0.740;CBR=0.008;CBZ=0.144;IOR=0.000;IOZ=-1.370;AOI=-5.614;AOZ=-4.243;LQR=0.178;MQ0=0.000;MQ10=0.000;MQ20=0.000;&lt;br /&gt;
             MQ30=0.000;SVM=1.51214;BAVGPOST=0.998;BRSQ=0.941;LDAF=0.0161;AVGPOST=1.0000;RSQ=1.0000;ERATE=0.0019;THETA=0.0013;&lt;br /&gt;
            ANNO=Nonsynonymous:APOL1;ANNOFULL=APOL1/ENST00000397278.3:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/6):Exon|&lt;br /&gt;
            APOL1/ENST00000426053.1:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base971/1143:Codon324/381:Exon5/5):Exon|&lt;br /&gt;
            APOL1/ENST00000422706.1:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/6):Exon|&lt;br /&gt;
            APOL1/ENST00000319136.4:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1073/1245:Codon358/415:Exon7/7):Exon|&lt;br /&gt;
            APOL1/ENST00000347595.7:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base662/834:Codon221/278:Exon3/3):Exon|&lt;br /&gt;
            APOL1/ENST00000397279.4:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/7):Exon&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What is the function of this variant?&lt;br /&gt;
* How many different transcript does the variant overlap with?&lt;br /&gt;
* How can you represent the variant in terms of amino acid changes?&lt;br /&gt;
&lt;br /&gt;
== Single Variant Association Analysis ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s run a single-variant association analysis using a score test. &lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-single --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/single --region 22:36000000-37000000 --test b.score --pheno PHENO --run 2 &lt;br /&gt;
&lt;br /&gt;
After running it, you will see EPACTS output files by looking at&lt;br /&gt;
&lt;br /&gt;
 ls $OUT/assoc&lt;br /&gt;
&lt;br /&gt;
The top association results can be viewed by&lt;br /&gt;
&lt;br /&gt;
 head $OUT/assoc/single.epacts.top5000&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View top association results&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	AC	CALLRATE	MAF	PVALUE	SCORE	NS.CASE	NS.CTRL	AF.CASE	AF.CTRL&lt;br /&gt;
 22	36995620	36995620	22:36995620_A/G	62	36	1	0.29032	5.6717e-09	5.8262	31	31	0.51613	0.064516&lt;br /&gt;
 22	36993088	36993088	22:36993088_G/C	62	30	1	0.24194	7.3258e-07	4.9525	31	31	0.43548	0.048387&lt;br /&gt;
 22	36997871	36997871	22:36997871_G/T	62	30	1	0.24194	7.3258e-07	4.9525	31	31	0.43548	0.048387&lt;br /&gt;
 22	36987368	36987368	22:36987368_G/A	62	31	1	0.25	2.0898e-06	4.7445	31	31	0.43548	0.064516&lt;br /&gt;
 22	36987861	36987861	22:36987861_A/G	62	31	1	0.25	2.0898e-06	4.7445	31	31	0.43548	0.064516&lt;br /&gt;
 22	36985499	36985499	22:36985499_C/T	62	29	1	0.23387	5.7389e-06	4.5358	31	31	0.40323	0.064516&lt;br /&gt;
 22	36978260	36978260	22:36978260_G/T	62	28	1	0.22581	1.5051e-05	4.3279	31	31	0.3871	0.064516&lt;br /&gt;
 22	36998907	36998907	22:36998907_C/T	62	61	1	0.49194	0.00015557	-3.782	31	31	0.30645	0.67742&lt;br /&gt;
 22	36667082	36667082	22:36667082_T/G	62	28	1	0.22581	0.0003506	-3.5747	31	31	0.080645	0.37097&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
Interpretation for top associated variant chr22:36995620_A/G:&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	AC	CALLRATE	MAF	PVALUE	SCORE	NS.CASE	NS.CTRL	AF.CASE	AF.CTRL&lt;br /&gt;
 22	36995620	36995620	22:36995620_A/G	62	36	1	0.29032	5.6717e-09	5.8262	31	31	0.51613	0.064516&lt;br /&gt;
&lt;br /&gt;
 The score test PVALUE = 5.6717e-09 is strongly significant.&lt;br /&gt;
 For the notation chr22:36995620_A/G, the reference allele is the first allele &amp;quot;A&amp;quot;, and the non-reference (effect) allele is the second allele &amp;quot;G&amp;quot;.&lt;br /&gt;
 The SCORE statistic = 0.29032 is positive (e.g. SCORE&amp;gt;0), meaning that the effect allele INCREASES your risk for disease.  Note that the SCORE is NOT the BETA or log odds ratio.  To calculate the BETA and SE(BETA), you must run the b.wald test.&lt;br /&gt;
 There is a large difference between the allele frequencies for cases and controls.  AF.CASE = 0.51613 &amp;gt;&amp;gt; AF.CTRL = 0.0064516.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can look also visualize the results by QQ-plot and Manhattan plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View QQ plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.epacts.qq.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.epacts.qq.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Manhattan plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.epacts.mh.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.epacts.mh.png|900px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, you can create a zoom plot focusing on the region of interest&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-zoom --vcf $OUT/assoc/snps.anno.vcf.gz --pos 22:36995620 --prefix $OUT/assoc/single&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Zoom Plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.zoom.22.36995620.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.zoom.22.36995620.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run EMMAX, you first need to create a kinship matrix&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-make-kin --vcf $OUT/assoc/snps.anno.vcf.gz --min-maf 0.01 --out $OUT/assoc/snps.anno.kinf --run 2 --chr 22&lt;br /&gt;
&lt;br /&gt;
And run EMMAX test specifying the kinship matrix&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-single --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/emmax --region 22:36000000-37000000 --test q.emmax --pheno PHENO --run 2 --kinf $OUT/assoc/snps.anno.kinf&lt;br /&gt;
&lt;br /&gt;
Then the results may look similar to previous ones.&lt;br /&gt;
&lt;br /&gt;
 head $OUT/assoc/emmax.epacts.top5000&lt;br /&gt;
&lt;br /&gt;
== Run Groupwise Test ==&lt;br /&gt;
&lt;br /&gt;
To run group-wise test such as gene-level burden test, you need to create a marker group file. If your VCF is already annotated, you can create a group file by running&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts make-group --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/snps.anno.grp --nonsyn&lt;br /&gt;
&lt;br /&gt;
The group file is simply a list of marker per group name, as shown below.&lt;br /&gt;
&lt;br /&gt;
 cat $OUT/assoc/snps.anno.grp &lt;br /&gt;
 APOL1	22:36655735_G/A	22:36657740_G/A	22:36661330_G/A	22:36661566_G/A	22:36661646_G/A	22:36661891_G/A	22:36661906_A/G&lt;br /&gt;
 APOL2	22:36623731_T/C	22:36623920_G/A	22:36629466_T/A	22:36633107_C/A&lt;br /&gt;
 APOL3	22:36537763_C/T	22:36537798_G/A	22:36556768_G/A	22:36556823_G/T&lt;br /&gt;
 APOL4	22:36587154_G/T	22:36587202_G/A	22:36587223_G/T	22:36587346_C/T	22:36587511_C/T	22:36587704_T/C	22:36587886_C/T	22:36593714_G/A	22:36597744_A/C	22:36598049_C/G	22:36598058_T/C	22:36598081_A/T&lt;br /&gt;
 APOL5	22:36122356_G/A	22:36122380_T/A	22:36122930_C/T	22:36123083_C/T	22:36124860_C/G&lt;br /&gt;
 FOXRED2	22:36900271_T/C	22:36900806_A/G&lt;br /&gt;
 MYH9	22:36681163_G/C	22:36684354_T/C	22:36710183_T/C&lt;br /&gt;
 Metazoa_SRP	22:36711990_C/G&lt;br /&gt;
 RBFOX2	22:36424450_A/C&lt;br /&gt;
 RP4-633O19__A.1	22:36792162_G/A&lt;br /&gt;
&lt;br /&gt;
If you have your own annotation, you can create your own burden test unit by modifying this file.&lt;br /&gt;
&lt;br /&gt;
If you want to run a collapsing burden test (CMC), run the following command&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts group --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/group.collapse --test b.collapse --groupf $OUT/assoc/snps.anno.grp --pheno PHENO --run 2 &lt;br /&gt;
&lt;br /&gt;
You can view the results by examining the output file&lt;br /&gt;
 cat $OUT/assoc/group.collapse.epacts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Output file&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      FRAC_WITH_RARE  NUM_ALL_VARS    NUM_PASS_VARS   NUM_SING_VARS   PVALUE  BETA    SEBETA  ZSTAT&lt;br /&gt;
22      36655735        36661906        22:36655735-36661906_APOL1      62      0.14516 7       4       0       0.28783 0.80648 0.75876 1.0629&lt;br /&gt;
22      36623731        36633107        22:36623731-36633107_APOL2      62      0.064516        4       1       0       0.99286 -17.704 1978.1  -0.0089502&lt;br /&gt;
22      36537763        36556823        22:36537763-36556823_APOL3      62      0.080645        4       2       0       0.643   -0.44056        0.95048 -0.46351&lt;br /&gt;
22      36587154        36598081        22:36587154-36598081_APOL4      62      0.096774        12      4       0       0.3989  0.76461 0.90638 0.84358&lt;br /&gt;
22      36122356        36124860        22:36122356-36124860_APOL5      62      0.1129  5       2       0       0.076266        1.9741  1.1136  1.7728&lt;br /&gt;
22      36900271        36900806        22:36900271-36900806_FOXRED2    NA      NA      2       0       0       NA      NA      NA      NA&lt;br /&gt;
22      36681163        36710183        22:36681163-36710183_MYH9       62      0.048387        3       1       0       0.9904  16.668  1385.4  0.012031&lt;br /&gt;
22      36711990        36711990        22:36711990-36711990_Metazoa_SRP        NA      NA      1       0       0       NA      NA      NA      NA&lt;br /&gt;
22      36424450        36424450        22:36424450-36424450_RBFOX2     62      0.032258        1       1       0       1       5.9095e-16      1.4376  4.1107e-16&lt;br /&gt;
22      36792162        36792162        22:36792162-36792162_RP4-633O19__A.1    NA      NA      1       0       0       NA      NA      NA      NA&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can run SKAT-O test in a similar way, but with a special tag&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts group --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/group.skato --test skat --skat-o --groupf $OUT/assoc/snps.anno.grp --pheno PHENO --run 2&lt;br /&gt;
&lt;br /&gt;
And view output files&lt;br /&gt;
 &lt;br /&gt;
 cat $OUT/assoc/group.skato.epacts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Output file&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	FRAC_WITH_RARE	NUM_ALL_VARS	NUM_PASS_VARS	NUM_SING_VARS	PVALUE	STATRHO&lt;br /&gt;
 22	36655735	36661906	22:36655735-36661906_APOL1	62	0.14516	7	4	0	0.42748	1&lt;br /&gt;
 22	36623731	36633107	22:36623731-36633107_APOL2	62	0.064516	4	1	0	0.038657	NA&lt;br /&gt;
 22	36537763	36556823	22:36537763-36556823_APOL3	62	0.080645	4	2	0	0.40634	0&lt;br /&gt;
 22	36587154	36598081	22:36587154-36598081_APOL4	62	0.14516	12	4	0	0.67891	0&lt;br /&gt;
 22	36122356	36124860	22:36122356-36124860_APOL5	62	0.1129	5	2	0	0.15055	0.3&lt;br /&gt;
 22	36900271	36900806	22:36900271-36900806_FOXRED2	NA	NA	2	0	0	NA	NA&lt;br /&gt;
 22	36681163	36710183	22:36681163-36710183_MYH9	62	0.032258	3	1	0	1	NA&lt;br /&gt;
 22	36711990	36711990	22:36711990-36711990_Metazoa_SRP	NA	NA	1	0	0	NA	NA&lt;br /&gt;
 22	36424450	36424450	22:36424450-36424450_RBFOX2	62	0.032258	1	1	0	1	NA&lt;br /&gt;
 22	36792162	36792162	22:36792162-36792162_RP4-633O19__A.1	NA	NA	1	0	0	NA	NA&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Return to Ancestry on your own genome==&lt;br /&gt;
Let&#039;s go see if Ancestry finished: [[SeqShop:_Ancestry_On_Your_Own_Genome,_December_2014#Checking_if_Pileup_finished]]&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=SeqShop:_Genetic_Association_Analysis_Practical,_December_2014&amp;diff=12371</id>
		<title>SeqShop: Genetic Association Analysis Practical, December 2014</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=SeqShop:_Genetic_Association_Analysis_Practical,_December_2014&amp;diff=12371"/>
		<updated>2014-12-12T12:16:22Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* Single Variant Association Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
[[Media:Seqshop association 2014 06.pdf|View Lecture Slides]]&lt;br /&gt;
&lt;br /&gt;
[[Media:Seqshop association practice 2014 06.pdf|View Introductory Slides for Practical Session]]&lt;br /&gt;
&lt;br /&gt;
== Goals of This Session ==&lt;br /&gt;
&lt;br /&gt;
* Understand how to annotate variants using EPACTS&lt;br /&gt;
* Understand how to run single variant association analysis using EPACTS&lt;br /&gt;
* Understand how to run rare variant association test using EPACTS&lt;br /&gt;
* Understand how to visualize the association output from EPACTS&lt;br /&gt;
&lt;br /&gt;
== Setup in person at the SeqShop Workshop ==&lt;br /&gt;
&#039;&#039;This section is specifically for the SeqShop Workshop computers.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are not running during the SeqShop Workshop, please skip this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are not already logged in, please expand this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
{{SeqShopLogin}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setup your run environment===&lt;br /&gt;
This is the same setup you did for the previous tutorial, but you need to redo it each time you log in.&lt;br /&gt;
&lt;br /&gt;
This will setup some environment variables to point you to&lt;br /&gt;
* [[GotCloud]] program&lt;br /&gt;
* Tutorial input files&lt;br /&gt;
* Setup an output directory&lt;br /&gt;
** It will leave your output directory from the previous tutorial in tact.&lt;br /&gt;
 source /net/seqshop-server/home/mktrost/seqshop/setup.txt&lt;br /&gt;
* You won&#039;t see any output after running &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt;&lt;br /&gt;
** It silently sets up your environment&lt;br /&gt;
** If you want to view the detail of the setup, type&lt;br /&gt;
 less /net/seqshop-server/home/mktrost/seqshop/setup.txt&lt;br /&gt;
and press &#039;q&#039; to finish.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:200px&amp;quot;&amp;gt;&lt;br /&gt;
View setup.txt&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 export GC=/net/seqshop-server/home/mktrost/seqshop/gotcloud&lt;br /&gt;
 export SS=/net/seqshop-server/home/mktrost/seqshop/example&lt;br /&gt;
 export EPACTS=/net/seqshop-server/home/mktrost/seqshop/epacts&lt;br /&gt;
 export OUT=~/out&lt;br /&gt;
 mkdir -p ${OUT}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup when running on your own outside of the SeqShop Workshop ==&lt;br /&gt;
&#039;&#039;This section is specifically for running on your own outside of the SeqShop Workshop.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are running during the SeqShop Workshop, please skip this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tutorial builds on the alignment &amp;amp; snpcall tutorials, if you have not already, please first run those tutorials: [[SeqShop:_Sequence_Mapping_and_Assembly_Practical|Alignment Tutorial]] &amp;amp; [[SeqShop: Variant Calling and Filtering for SNPs Practical|SNP Calling Tutorial]]&lt;br /&gt;
&lt;br /&gt;
=== Download &amp;amp; Build EPACTS ===&lt;br /&gt;
If you do not already have EPACTS:&lt;br /&gt;
* cd to where you want EPACTS installed (you can change this to any directory you want)&lt;br /&gt;
 mkdir -p ~/seqshop&lt;br /&gt;
 cd ~/seqshop/&lt;br /&gt;
* download, decompress, and build the version of epacts that was tested with this tutorial:&lt;br /&gt;
 wget http://www.sph.umich.edu/csg/kang/epacts/download/EPACTS-3.2.6.tar.gz&lt;br /&gt;
 tar xvf EPACTS-3.2.6.tar.gz&lt;br /&gt;
 cd EPACTS-3.2.6&lt;br /&gt;
 ./configure --prefix=$HOME/seqshop/epacts&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ../..&lt;br /&gt;
&lt;br /&gt;
{{SeqShopRemoteEnv}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Additional variables for EPACTS:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible&amp;quot; style=&amp;quot;width:500px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using bash (replace the paths below with the appropriate paths):&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;export EPACTS=~/seqshop/epacts&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:500px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using tcsh (replace the paths below with the appropriate paths):&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;setenv EPACTS ~/seqshop/epacts&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Preparing Input Files ==&lt;br /&gt;
&lt;br /&gt;
=== Input VCF file ===&lt;br /&gt;
&lt;br /&gt;
We will use SNP genotypes from the SNP calling session, after LD-aware genotype refinement.&lt;br /&gt;
Check the contents of the VCF file using the following command.&lt;br /&gt;
&lt;br /&gt;
 zless ${OUT}/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz&lt;br /&gt;
&lt;br /&gt;
=== Phenotype Information ===&lt;br /&gt;
&lt;br /&gt;
Phenotype information is prepared in PED format commonly used in other GWAS software such as MERLIN or PLINK.&lt;br /&gt;
&lt;br /&gt;
 less ${SS}/assoc/seqshop.ped&lt;br /&gt;
&lt;br /&gt;
The first several line should look like below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:200px&amp;quot;&amp;gt;&lt;br /&gt;
View Data&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #FAM_ID	IND_ID	DAD_ID	MOM_ID	SEX	PHENO&lt;br /&gt;
 HG00551	HG00551	0	0	0	0&lt;br /&gt;
 HG00553	HG00553	0	0	0	0&lt;br /&gt;
 HG00554	HG00554	0	0	0	0&lt;br /&gt;
 HG00637	HG00637	0	0	0	0&lt;br /&gt;
 HG00638	HG00638	0	0	0	0&lt;br /&gt;
 HG00640	HG00640	0	0	0	1&lt;br /&gt;
 HG00641	HG00641	0	0	0	1&lt;br /&gt;
 HG00734	HG00734	0	0	0	1&lt;br /&gt;
 HG00736	HG00736	0	0	0	0&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary phenotype can be encoded as 0-1 or 1-2. If the column contains more than two distinct values, it will automatically be recognized as quantitative values.&lt;br /&gt;
&lt;br /&gt;
EPACTS allows PED file to have a header line. The header line should contain the description of each column. EPACTS also accepts a standard PED format where .ped file contains the phenotype data and .dat file contains the information about each column.&lt;br /&gt;
&lt;br /&gt;
=== Installed version of EPACTS ===&lt;br /&gt;
&lt;br /&gt;
EPACTS are installed in the server. If you want to install EPACTS by yourself, visit [[EPACTS]] page for more details&lt;br /&gt;
&lt;br /&gt;
 ls $EPACTS/bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View EPACTS executable files&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 anno   epacts       epacts-cis-extract  epacts-group       epacts-multi     epacts.pm      epstopdf  test_run_epacts.sh&lt;br /&gt;
 bgzip  epacts-anno  epacts-download     epacts-make-group  epacts-pca-plot  epacts-single  pEmmax    vcfast&lt;br /&gt;
 chaps  epacts-cat   epacts-enrich       epacts-make-kin    epacts-plot      epacts-zoom    tabix     wGetOptions.pm&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that some tools undocumented in [[EPACTS]] documentation is under development and may not work.&lt;br /&gt;
&lt;br /&gt;
== Annotating Variants with EPACTS ==&lt;br /&gt;
&lt;br /&gt;
There are multiple software tools that provides a function to annotate variants, such as Variant Effect Predictor (VEP) that is used in 1000 Genomes Project. While most annotation software provides very similar results to each other, their computational efficiency can substantially vary. The annotation software EPACTS provides is extremely fast and can provide genome-wide annotation results in orders of magnitude faster than other widely available annotation software.&lt;br /&gt;
&lt;br /&gt;
In order to annotate variants with EPACTS, one can use &amp;lt;code&amp;gt;epacts-anno&amp;lt;/code&amp;gt; module.&lt;br /&gt;
 &lt;br /&gt;
 mkdir --p $OUT/assoc&lt;br /&gt;
 $EPACTS/bin/epacts-anno --in $OUT/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz --out $OUT/assoc/snps.anno.vcf.gz --ref $SS/ref22/human.g1k.v37.chr22.fa&lt;br /&gt;
&lt;br /&gt;
Then you will see a series of messages before annotation finishes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View the expected messages&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/anno -i /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz -r \&lt;br /&gt;
    /home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa -f refGene -g /home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz \&lt;br /&gt;
   -c /home/hmkang/seqshop/epacts/share/EPACTS/codon.txt -o  /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz --inputFormat vcf \&lt;br /&gt;
   -p /home/hmkang/seqshop/epacts/share/EPACTS/priority.txt&lt;br /&gt;
 The following parameters are available.  Ones with &amp;quot;[]&amp;quot; are in effect:&lt;br /&gt;
 &lt;br /&gt;
 Available Options&lt;br /&gt;
     Required Parameters :&lt;br /&gt;
                          -i [/net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz]&lt;br /&gt;
                          -o [/net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz]&lt;br /&gt;
          Gene Annotation&lt;br /&gt;
             Parameters : -g [/home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz]&lt;br /&gt;
                          -r [/home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa]&lt;br /&gt;
                          --inputFormat [vcf], --checkReference, -f [refGene]&lt;br /&gt;
                          -p [/home/hmkang/seqshop/epacts/share/EPACTS/priority.txt]&lt;br /&gt;
                          -c [/home/hmkang/seqshop/epacts/share/EPACTS/codon.txt]&lt;br /&gt;
                          -u [], -d [], --se [], --si [], --outputFormat []&lt;br /&gt;
  Other Annotation Tools : --genomeScore [], --bed [], --tabix []&lt;br /&gt;
 Load reference genome /home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa...&lt;br /&gt;
 DONE: 1 chromosomes and 51304566 bases are loaded.&lt;br /&gt;
 Load codon file /home/hmkang/seqshop/epacts/share/EPACTS/codon.txt...&lt;br /&gt;
 DONE: codon file loaded.&lt;br /&gt;
 Load priority file /home/hmkang/seqshop/epacts/share/EPACTS/priority.txt...&lt;br /&gt;
 DONE: 24 priority annotation types loaded.&lt;br /&gt;
 Load gene file /home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz...&lt;br /&gt;
 DONE: 92627 gene loaded.&lt;br /&gt;
 DONE: Generated frequency of each annotype type in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.anno.frq ].&lt;br /&gt;
 DONE: Generated frequency of each highest priority annotation type in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.top.anno.frq ].&lt;br /&gt;
 Ts/Tv ratio: 2.35733&lt;br /&gt;
 Ts observed: 2718  times; Tv observed: 1153 times.&lt;br /&gt;
 DONE: Generated frequency of each base change in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.base.frq ].&lt;br /&gt;
 DONE: Generated frequency of each codon change in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.codon.frq ].&lt;br /&gt;
 DONE: Generated frequency of indel length in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.indel.frq ].&lt;br /&gt;
 ..............................................         &lt;br /&gt;
  ...      Anno(tation)                       ...       &lt;br /&gt;
  ...      Xiaowei Zhan, Goncalo Abecasis     ...      &lt;br /&gt;
   ...      Speical Thanks:                    ...     &lt;br /&gt;
    ...      Hyun Ming Kang, Yanming Li         ...    &lt;br /&gt;
     ...      zhanxw@umich.edu                    ...  &lt;br /&gt;
      ...      Sep 2011                            ... &lt;br /&gt;
       ................................................&lt;br /&gt;
                                                       &lt;br /&gt;
 DONE: 3871 varaints are annotated.&lt;br /&gt;
 DONE: Generated annotation output in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz ].&lt;br /&gt;
 Annotation succeed!&lt;br /&gt;
 mv /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/bgzip -c /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp &amp;gt; /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/tabix -pvcf -f /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz&lt;br /&gt;
 rm /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp&lt;br /&gt;
 rm /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.log /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.top.anno.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.anno.frq /net/seqshop- server/hmkang/out/assoc/snps.anno.vcf.gz.base.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.codon.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.indel.frq&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After running annotation, you can check the annotation results. Let&#039;s look at the APOL g1 risk allele we manually examined in the SNP calling section.&lt;br /&gt;
&lt;br /&gt;
 $GC/bin/tabix $OUT/assoc/snps.anno.vcf.gz 22:36661906 | head -1 | cut -f 1-8&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View the annotation results&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 22	36661906	.	A	G	18	PASS	DP=409;MQ=59;NS=62;AN=124;AC=2;AF=0.013827;AB=0.4065;AZ=-0.5287;FIC=-0.0092;&lt;br /&gt;
             SLRT=-0.0075;HWEAF=0.0138;HWDAF=0.0276,0.0000;LBS=36,36,0,0,1,1,0,0;OBS=145,191,0,0,3,2,0,0;STR=-0.040;&lt;br /&gt;
             STZ=-0.740;CBR=0.008;CBZ=0.144;IOR=0.000;IOZ=-1.370;AOI=-5.614;AOZ=-4.243;LQR=0.178;MQ0=0.000;MQ10=0.000;MQ20=0.000;&lt;br /&gt;
             MQ30=0.000;SVM=1.51214;BAVGPOST=0.998;BRSQ=0.941;LDAF=0.0161;AVGPOST=1.0000;RSQ=1.0000;ERATE=0.0019;THETA=0.0013;&lt;br /&gt;
            ANNO=Nonsynonymous:APOL1;ANNOFULL=APOL1/ENST00000397278.3:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/6):Exon|&lt;br /&gt;
            APOL1/ENST00000426053.1:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base971/1143:Codon324/381:Exon5/5):Exon|&lt;br /&gt;
            APOL1/ENST00000422706.1:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/6):Exon|&lt;br /&gt;
            APOL1/ENST00000319136.4:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1073/1245:Codon358/415:Exon7/7):Exon|&lt;br /&gt;
            APOL1/ENST00000347595.7:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base662/834:Codon221/278:Exon3/3):Exon|&lt;br /&gt;
            APOL1/ENST00000397279.4:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/7):Exon&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What is the function of this variant?&lt;br /&gt;
* How many different transcript does the variant overlap with?&lt;br /&gt;
* How can you represent the variant in terms of amino acid changes?&lt;br /&gt;
&lt;br /&gt;
== Single Variant Association Analysis ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s run a single-variant association analysis using a score test. &lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-single --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/single --region 22:36000000-37000000 --test b.score --pheno PHENO --run 2 &lt;br /&gt;
&lt;br /&gt;
After running it, you will see EPACTS output files by looking at&lt;br /&gt;
&lt;br /&gt;
 ls $OUT/assoc&lt;br /&gt;
&lt;br /&gt;
The top association results can be viewed by&lt;br /&gt;
&lt;br /&gt;
 head $OUT/assoc/single.epacts.top5000&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View top association results&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	AC	CALLRATE	MAF	PVALUE	SCORE	NS.CASE	NS.CTRL	AF.CASE	AF.CTRL&lt;br /&gt;
 22	36995620	36995620	22:36995620_A/G	62	36	1	0.29032	5.6717e-09	5.8262	31	31	0.51613	0.064516&lt;br /&gt;
 22	36993088	36993088	22:36993088_G/C	62	30	1	0.24194	7.3258e-07	4.9525	31	31	0.43548	0.048387&lt;br /&gt;
 22	36997871	36997871	22:36997871_G/T	62	30	1	0.24194	7.3258e-07	4.9525	31	31	0.43548	0.048387&lt;br /&gt;
 22	36987368	36987368	22:36987368_G/A	62	31	1	0.25	2.0898e-06	4.7445	31	31	0.43548	0.064516&lt;br /&gt;
 22	36987861	36987861	22:36987861_A/G	62	31	1	0.25	2.0898e-06	4.7445	31	31	0.43548	0.064516&lt;br /&gt;
 22	36985499	36985499	22:36985499_C/T	62	29	1	0.23387	5.7389e-06	4.5358	31	31	0.40323	0.064516&lt;br /&gt;
 22	36978260	36978260	22:36978260_G/T	62	28	1	0.22581	1.5051e-05	4.3279	31	31	0.3871	0.064516&lt;br /&gt;
 22	36998907	36998907	22:36998907_C/T	62	61	1	0.49194	0.00015557	-3.782	31	31	0.30645	0.67742&lt;br /&gt;
 22	36667082	36667082	22:36667082_T/G	62	28	1	0.22581	0.0003506	-3.5747	31	31	0.080645	0.37097&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
Interpretation for top associated variant chr22:36995620_A/G:&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	AC	CALLRATE	MAF	PVALUE	SCORE	NS.CASE	NS.CTRL	AF.CASE	AF.CTRL&lt;br /&gt;
 22	36995620	36995620	22:36995620_A/G	62	36	1	0.29032	5.6717e-09	5.8262	31	31	0.51613	0.064516&lt;br /&gt;
&lt;br /&gt;
 The score test PVALUE = 5.6717e-09 is strongly significant.&lt;br /&gt;
 For the notation chr22:36995620_A/G, the reference allele is the first allele &amp;quot;A&amp;quot;, and the non-reference (effect) allele is the second allele &amp;quot;G&amp;quot;.&lt;br /&gt;
 The SCORE statistic = 0.29032 is positive (e.g. SCORE&amp;gt;0), meaning that the effect allele INCREASES your risk for disease.  Note that the SCORE is NOT the BETA or log odds ratio.  To calculate the BETA and SE(BETA), you must run the b.wald test.&lt;br /&gt;
 There is a large difference between the allele frequencies for cases and controls.  AF.CASE = 0.51613 &amp;gt;&amp;gt; AF.CTRL = 0.0064516.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can look also visualize the results by QQ-plot and Manhattan plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View QQ plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.epacts.qq.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.epacts.qq.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Manhattan plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.epacts.mh.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.epacts.mh.png|900px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, you can create a zoom plot focusing on the region of interest&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-zoom --vcf $OUT/assoc/snps.anno.vcf.gz --pos 22:36995620 --prefix $OUT/assoc/single&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Zoom Plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.zoom.22.36995620.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.zoom.22.36995620.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run EMMAX, you first need to create a kinship matrix&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-make-kin --vcf $OUT/assoc/snps.anno.vcf.gz --min-maf 0.01 --out $OUT/assoc/snps.anno.kinf --run 2 --chr 22&lt;br /&gt;
&lt;br /&gt;
And run EMMAX test specifying the kinship matrix&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-single --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/emmax --region 22:36000000-37000000 --test q.emmax --pheno PHENO --run 2 --kinf $OUT/assoc/snps.anno.kinf&lt;br /&gt;
&lt;br /&gt;
Then the results may look similar to previous ones.&lt;br /&gt;
&lt;br /&gt;
 head $OUT/assoc/emmax.epacts.top5000&lt;br /&gt;
&lt;br /&gt;
== Run Groupwise Test ==&lt;br /&gt;
&lt;br /&gt;
To run group-wise test such as gene-level burden test, you need to create a marker group file. If your VCF is already annotated, you can create a group file by running&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts make-group --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/snps.anno.grp --nonsyn&lt;br /&gt;
&lt;br /&gt;
The group file is simply a list of marker per group name, as shown below.&lt;br /&gt;
&lt;br /&gt;
 cat $OUT/assoc/snps.anno.grp &lt;br /&gt;
 APOL1	22:36655735_G/A	22:36657740_G/A	22:36661330_G/A	22:36661566_G/A	22:36661646_G/A	22:36661891_G/A	22:36661906_A/G&lt;br /&gt;
 APOL2	22:36623731_T/C	22:36623920_G/A	22:36629466_T/A	22:36633107_C/A&lt;br /&gt;
 APOL3	22:36537763_C/T	22:36537798_G/A	22:36556768_G/A	22:36556823_G/T&lt;br /&gt;
 APOL4	22:36587154_G/T	22:36587202_G/A	22:36587223_G/T	22:36587346_C/T	22:36587511_C/T	22:36587704_T/C	22:36587886_C/T	22:36593714_G/A	22:36597744_A/C	22:36598049_C/G	22:36598058_T/C	22:36598081_A/T&lt;br /&gt;
 APOL5	22:36122356_G/A	22:36122380_T/A	22:36122930_C/T	22:36123083_C/T	22:36124860_C/G&lt;br /&gt;
 FOXRED2	22:36900271_T/C	22:36900806_A/G&lt;br /&gt;
 MYH9	22:36681163_G/C	22:36684354_T/C	22:36710183_T/C&lt;br /&gt;
 Metazoa_SRP	22:36711990_C/G&lt;br /&gt;
 RBFOX2	22:36424450_A/C&lt;br /&gt;
 RP4-633O19__A.1	22:36792162_G/A&lt;br /&gt;
&lt;br /&gt;
If you have your own annotation, you can create your own burden test unit by modifying this file.&lt;br /&gt;
&lt;br /&gt;
If you want to run a collapsing burden test (CMC), run the following command&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts group --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/group.collapse --test b.collapse --groupf $OUT/assoc/snps.anno.grp --pheno PHENO --run 2 &lt;br /&gt;
&lt;br /&gt;
You can view the results by examining the output file&lt;br /&gt;
 cat $OUT/assoc/group.collapse.epacts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Output file&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	FRAC_WITH_RARE	NUM_ALL_VARS	NUM_PASS_VARS	NUM_SING_VARS	PVALUE	STATRHO&lt;br /&gt;
 22	36655735	36661906	22:36655735-36661906_APOL1	62	0.14516	7	4	0	0.42748	1&lt;br /&gt;
 22	36623731	36633107	22:36623731-36633107_APOL2	62	0.064516	4	1	0	0.038657	NA&lt;br /&gt;
 22	36537763	36556823	22:36537763-36556823_APOL3	62	0.080645	4	2	0	0.40634	0&lt;br /&gt;
 22	36587154	36598081	22:36587154-36598081_APOL4	62	0.14516	12	4	0	0.67891	0&lt;br /&gt;
 22	36122356	36124860	22:36122356-36124860_APOL5	62	0.1129	5	2	0	0.15055	0.3&lt;br /&gt;
 22	36900271	36900806	22:36900271-36900806_FOXRED2	NA	NA	2	0	0	NA	NA&lt;br /&gt;
 22	36681163	36710183	22:36681163-36710183_MYH9	62	0.032258	3	1	0	1	NA&lt;br /&gt;
 22	36711990	36711990	22:36711990-36711990_Metazoa_SRP	NA	NA	1	0	0	NA	NA&lt;br /&gt;
 22	36424450	36424450	22:36424450-36424450_RBFOX2	62	0.032258	1	1	0	1	NA&lt;br /&gt;
 22	36792162	36792162	22:36792162-36792162_RP4-633O19__A.1	NA	NA	1	0	0	NA	NA&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can run SKAT-O test in a similar way, but with a special tag&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts group --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/group.skato --test skat --skat-o --groupf $OUT/assoc/snps.anno.grp --pheno PHENO --run 2&lt;br /&gt;
&lt;br /&gt;
And view output files&lt;br /&gt;
 &lt;br /&gt;
 cat $OUT/assoc/group.skato.epacts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Output file&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	FRAC_WITH_RARE	NUM_ALL_VARS	NUM_PASS_VARS	NUM_SING_VARS	PVALUE	STATRHO&lt;br /&gt;
 22	36655735	36661906	22:36655735-36661906_APOL1	62	0.14516	7	4	0	0.42748	1&lt;br /&gt;
 22	36623731	36633107	22:36623731-36633107_APOL2	62	0.064516	4	1	0	0.038657	NA&lt;br /&gt;
 22	36537763	36556823	22:36537763-36556823_APOL3	62	0.080645	4	2	0	0.40634	0&lt;br /&gt;
 22	36587154	36598081	22:36587154-36598081_APOL4	62	0.14516	12	4	0	0.67891	0&lt;br /&gt;
 22	36122356	36124860	22:36122356-36124860_APOL5	62	0.1129	5	2	0	0.15055	0.3&lt;br /&gt;
 22	36900271	36900806	22:36900271-36900806_FOXRED2	NA	NA	2	0	0	NA	NA&lt;br /&gt;
 22	36681163	36710183	22:36681163-36710183_MYH9	62	0.032258	3	1	0	1	NA&lt;br /&gt;
 22	36711990	36711990	22:36711990-36711990_Metazoa_SRP	NA	NA	1	0	0	NA	NA&lt;br /&gt;
 22	36424450	36424450	22:36424450-36424450_RBFOX2	62	0.032258	1	1	0	1	NA&lt;br /&gt;
 22	36792162	36792162	22:36792162-36792162_RP4-633O19__A.1	NA	NA	1	0	0	NA	NA&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Return to Ancestry on your own genome==&lt;br /&gt;
Let&#039;s go see if Ancestry finished: [[SeqShop:_Ancestry_On_Your_Own_Genome,_December_2014#Checking_if_Pileup_finished]]&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=SeqShop:_Genetic_Association_Analysis_Practical,_December_2014&amp;diff=12359</id>
		<title>SeqShop: Genetic Association Analysis Practical, December 2014</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=SeqShop:_Genetic_Association_Analysis_Practical,_December_2014&amp;diff=12359"/>
		<updated>2014-12-11T17:04:27Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* Single Variant Association Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
[[Media:Seqshop association 2014 06.pdf|View Lecture Slides]]&lt;br /&gt;
&lt;br /&gt;
[[Media:Seqshop association practice 2014 06.pdf|View Introductory Slides for Practical Session]]&lt;br /&gt;
&lt;br /&gt;
== Goals of This Session ==&lt;br /&gt;
&lt;br /&gt;
* Understand how to annotate variants using EPACTS&lt;br /&gt;
* Understand how to run single variant association analysis using EPACTS&lt;br /&gt;
* Understand how to run rare variant association test using EPACTS&lt;br /&gt;
* Understand how to visualize the association output from EPACTS&lt;br /&gt;
&lt;br /&gt;
== Setup in person at the SeqShop Workshop ==&lt;br /&gt;
&#039;&#039;This section is specifically for the SeqShop Workshop computers.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are not running during the SeqShop Workshop, please skip this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are not already logged in, please expand this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
{{SeqShopLogin}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setup your run environment===&lt;br /&gt;
This is the same setup you did for the previous tutorial, but you need to redo it each time you log in.&lt;br /&gt;
&lt;br /&gt;
This will setup some environment variables to point you to&lt;br /&gt;
* [[GotCloud]] program&lt;br /&gt;
* Tutorial input files&lt;br /&gt;
* Setup an output directory&lt;br /&gt;
** It will leave your output directory from the previous tutorial in tact.&lt;br /&gt;
 source /net/seqshop-server/home/mktrost/seqshop/setup.txt&lt;br /&gt;
* You won&#039;t see any output after running &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt;&lt;br /&gt;
** It silently sets up your environment&lt;br /&gt;
** If you want to view the detail of the setup, type&lt;br /&gt;
 less /net/seqshop-server/home/mktrost/seqshop/setup.txt&lt;br /&gt;
and press &#039;q&#039; to finish.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:200px&amp;quot;&amp;gt;&lt;br /&gt;
View setup.txt&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 export GC=/net/seqshop-server/home/mktrost/seqshop/gotcloud&lt;br /&gt;
 export SS=/net/seqshop-server/home/mktrost/seqshop/example&lt;br /&gt;
 export EPACTS=/net/seqshop-server/home/mktrost/seqshop/epacts&lt;br /&gt;
 export OUT=~/out&lt;br /&gt;
 mkdir -p ${OUT}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup when running on your own outside of the SeqShop Workshop ==&lt;br /&gt;
&#039;&#039;This section is specifically for running on your own outside of the SeqShop Workshop.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are running during the SeqShop Workshop, please skip this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tutorial builds on the alignment &amp;amp; snpcall tutorials, if you have not already, please first run those tutorials: [[SeqShop:_Sequence_Mapping_and_Assembly_Practical|Alignment Tutorial]] &amp;amp; [[SeqShop: Variant Calling and Filtering for SNPs Practical|SNP Calling Tutorial]]&lt;br /&gt;
&lt;br /&gt;
=== Download &amp;amp; Build EPACTS ===&lt;br /&gt;
If you do not already have EPACTS:&lt;br /&gt;
* cd to where you want EPACTS installed (you can change this to any directory you want)&lt;br /&gt;
 mkdir -p ~/seqshop&lt;br /&gt;
 cd ~/seqshop/&lt;br /&gt;
* download, decompress, and build the version of epacts that was tested with this tutorial:&lt;br /&gt;
 wget http://www.sph.umich.edu/csg/kang/epacts/download/EPACTS-3.2.6.tar.gz&lt;br /&gt;
 tar xvf EPACTS-3.2.6.tar.gz&lt;br /&gt;
 cd EPACTS-3.2.6&lt;br /&gt;
 ./configure --prefix=$HOME/seqshop/epacts&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ../..&lt;br /&gt;
&lt;br /&gt;
{{SeqShopRemoteEnv}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Additional variables for EPACTS:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible&amp;quot; style=&amp;quot;width:500px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using bash (replace the paths below with the appropriate paths):&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;export EPACTS=~/seqshop/epacts&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:500px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using tcsh (replace the paths below with the appropriate paths):&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;setenv EPACTS ~/seqshop/epacts&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Preparing Input Files ==&lt;br /&gt;
&lt;br /&gt;
=== Input VCF file ===&lt;br /&gt;
&lt;br /&gt;
We will use SNP genotypes from the SNP calling session, after LD-aware genotype refinement.&lt;br /&gt;
Check the contents of the VCF file using the following command.&lt;br /&gt;
&lt;br /&gt;
 zless ${OUT}/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz&lt;br /&gt;
&lt;br /&gt;
=== Phenotype Information ===&lt;br /&gt;
&lt;br /&gt;
Phenotype information is prepared in PED format commonly used in other GWAS software such as MERLIN or PLINK.&lt;br /&gt;
&lt;br /&gt;
 less ${SS}/assoc/seqshop.ped&lt;br /&gt;
&lt;br /&gt;
The first several line should look like below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:200px&amp;quot;&amp;gt;&lt;br /&gt;
View Data&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #FAM_ID	IND_ID	DAD_ID	MOM_ID	SEX	PHENO&lt;br /&gt;
 HG00551	HG00551	0	0	0	0&lt;br /&gt;
 HG00553	HG00553	0	0	0	0&lt;br /&gt;
 HG00554	HG00554	0	0	0	0&lt;br /&gt;
 HG00637	HG00637	0	0	0	0&lt;br /&gt;
 HG00638	HG00638	0	0	0	0&lt;br /&gt;
 HG00640	HG00640	0	0	0	1&lt;br /&gt;
 HG00641	HG00641	0	0	0	1&lt;br /&gt;
 HG00734	HG00734	0	0	0	1&lt;br /&gt;
 HG00736	HG00736	0	0	0	0&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary phenotype can be encoded as 0-1 or 1-2. If the column contains more than two distinct values, it will automatically be recognized as quantitative values.&lt;br /&gt;
&lt;br /&gt;
EPACTS allows PED file to have a header line. The header line should contain the description of each column. EPACTS also accepts a standard PED format where .ped file contains the phenotype data and .dat file contains the information about each column.&lt;br /&gt;
&lt;br /&gt;
=== Installed version of EPACTS ===&lt;br /&gt;
&lt;br /&gt;
EPACTS are installed in the server. If you want to install EPACTS by yourself, visit [[EPACTS]] page for more details&lt;br /&gt;
&lt;br /&gt;
 ls $EPACTS/bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View EPACTS executable files&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 anno   epacts       epacts-cis-extract  epacts-group       epacts-multi     epacts.pm      epstopdf  test_run_epacts.sh&lt;br /&gt;
 bgzip  epacts-anno  epacts-download     epacts-make-group  epacts-pca-plot  epacts-single  pEmmax    vcfast&lt;br /&gt;
 chaps  epacts-cat   epacts-enrich       epacts-make-kin    epacts-plot      epacts-zoom    tabix     wGetOptions.pm&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that some tools undocumented in [[EPACTS]] documentation is under development and may not work.&lt;br /&gt;
&lt;br /&gt;
== Annotating Variants with EPACTS ==&lt;br /&gt;
&lt;br /&gt;
There are multiple software tools that provides a function to annotate variants, such as Variant Effect Predictor (VEP) that is used in 1000 Genomes Project. While most annotation software provides very similar results to each other, their computational efficiency can substantially vary. The annotation software EPACTS provides is extremely fast and can provide genome-wide annotation results in orders of magnitude faster than other widely available annotation software.&lt;br /&gt;
&lt;br /&gt;
In order to annotate variants with EPACTS, one can use &amp;lt;code&amp;gt;epacts-anno&amp;lt;/code&amp;gt; module.&lt;br /&gt;
 &lt;br /&gt;
 mkdir --p $OUT/assoc&lt;br /&gt;
 $EPACTS/bin/epacts-anno --in $OUT/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz --out $OUT/assoc/snps.anno.vcf.gz --ref $SS/ref22/human.g1k.v37.chr22.fa&lt;br /&gt;
&lt;br /&gt;
Then you will see a series of messages before annotation finishes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View the expected messages&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/anno -i /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz -r \&lt;br /&gt;
    /home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa -f refGene -g /home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz \&lt;br /&gt;
   -c /home/hmkang/seqshop/epacts/share/EPACTS/codon.txt -o  /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz --inputFormat vcf \&lt;br /&gt;
   -p /home/hmkang/seqshop/epacts/share/EPACTS/priority.txt&lt;br /&gt;
 The following parameters are available.  Ones with &amp;quot;[]&amp;quot; are in effect:&lt;br /&gt;
 &lt;br /&gt;
 Available Options&lt;br /&gt;
     Required Parameters :&lt;br /&gt;
                          -i [/net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz]&lt;br /&gt;
                          -o [/net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz]&lt;br /&gt;
          Gene Annotation&lt;br /&gt;
             Parameters : -g [/home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz]&lt;br /&gt;
                          -r [/home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa]&lt;br /&gt;
                          --inputFormat [vcf], --checkReference, -f [refGene]&lt;br /&gt;
                          -p [/home/hmkang/seqshop/epacts/share/EPACTS/priority.txt]&lt;br /&gt;
                          -c [/home/hmkang/seqshop/epacts/share/EPACTS/codon.txt]&lt;br /&gt;
                          -u [], -d [], --se [], --si [], --outputFormat []&lt;br /&gt;
  Other Annotation Tools : --genomeScore [], --bed [], --tabix []&lt;br /&gt;
 Load reference genome /home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa...&lt;br /&gt;
 DONE: 1 chromosomes and 51304566 bases are loaded.&lt;br /&gt;
 Load codon file /home/hmkang/seqshop/epacts/share/EPACTS/codon.txt...&lt;br /&gt;
 DONE: codon file loaded.&lt;br /&gt;
 Load priority file /home/hmkang/seqshop/epacts/share/EPACTS/priority.txt...&lt;br /&gt;
 DONE: 24 priority annotation types loaded.&lt;br /&gt;
 Load gene file /home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz...&lt;br /&gt;
 DONE: 92627 gene loaded.&lt;br /&gt;
 DONE: Generated frequency of each annotype type in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.anno.frq ].&lt;br /&gt;
 DONE: Generated frequency of each highest priority annotation type in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.top.anno.frq ].&lt;br /&gt;
 Ts/Tv ratio: 2.35733&lt;br /&gt;
 Ts observed: 2718  times; Tv observed: 1153 times.&lt;br /&gt;
 DONE: Generated frequency of each base change in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.base.frq ].&lt;br /&gt;
 DONE: Generated frequency of each codon change in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.codon.frq ].&lt;br /&gt;
 DONE: Generated frequency of indel length in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.indel.frq ].&lt;br /&gt;
 ..............................................         &lt;br /&gt;
  ...      Anno(tation)                       ...       &lt;br /&gt;
  ...      Xiaowei Zhan, Goncalo Abecasis     ...      &lt;br /&gt;
   ...      Speical Thanks:                    ...     &lt;br /&gt;
    ...      Hyun Ming Kang, Yanming Li         ...    &lt;br /&gt;
     ...      zhanxw@umich.edu                    ...  &lt;br /&gt;
      ...      Sep 2011                            ... &lt;br /&gt;
       ................................................&lt;br /&gt;
                                                       &lt;br /&gt;
 DONE: 3871 varaints are annotated.&lt;br /&gt;
 DONE: Generated annotation output in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz ].&lt;br /&gt;
 Annotation succeed!&lt;br /&gt;
 mv /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/bgzip -c /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp &amp;gt; /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/tabix -pvcf -f /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz&lt;br /&gt;
 rm /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp&lt;br /&gt;
 rm /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.log /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.top.anno.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.anno.frq /net/seqshop- server/hmkang/out/assoc/snps.anno.vcf.gz.base.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.codon.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.indel.frq&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After running annotation, you can check the annotation results. Let&#039;s look at the APOL g1 risk allele we manually examined in the SNP calling section.&lt;br /&gt;
&lt;br /&gt;
 $GC/bin/tabix $OUT/assoc/snps.anno.vcf.gz 22:36661906 | head -1 | cut -f 1-8&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View the annotation results&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 22	36661906	.	A	G	18	PASS	DP=409;MQ=59;NS=62;AN=124;AC=2;AF=0.013827;AB=0.4065;AZ=-0.5287;FIC=-0.0092;&lt;br /&gt;
             SLRT=-0.0075;HWEAF=0.0138;HWDAF=0.0276,0.0000;LBS=36,36,0,0,1,1,0,0;OBS=145,191,0,0,3,2,0,0;STR=-0.040;&lt;br /&gt;
             STZ=-0.740;CBR=0.008;CBZ=0.144;IOR=0.000;IOZ=-1.370;AOI=-5.614;AOZ=-4.243;LQR=0.178;MQ0=0.000;MQ10=0.000;MQ20=0.000;&lt;br /&gt;
             MQ30=0.000;SVM=1.51214;BAVGPOST=0.998;BRSQ=0.941;LDAF=0.0161;AVGPOST=1.0000;RSQ=1.0000;ERATE=0.0019;THETA=0.0013;&lt;br /&gt;
            ANNO=Nonsynonymous:APOL1;ANNOFULL=APOL1/ENST00000397278.3:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/6):Exon|&lt;br /&gt;
            APOL1/ENST00000426053.1:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base971/1143:Codon324/381:Exon5/5):Exon|&lt;br /&gt;
            APOL1/ENST00000422706.1:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/6):Exon|&lt;br /&gt;
            APOL1/ENST00000319136.4:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1073/1245:Codon358/415:Exon7/7):Exon|&lt;br /&gt;
            APOL1/ENST00000347595.7:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base662/834:Codon221/278:Exon3/3):Exon|&lt;br /&gt;
            APOL1/ENST00000397279.4:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/7):Exon&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What is the function of this variant?&lt;br /&gt;
* How many different transcript does the variant overlap with?&lt;br /&gt;
* How can you represent the variant in terms of amino acid changes?&lt;br /&gt;
&lt;br /&gt;
== Single Variant Association Analysis ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s run a single-variant association analysis using a score test. &lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-single --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/single --region 22:36000000-37000000 --test b.score --pheno PHENO --run 2 &lt;br /&gt;
&lt;br /&gt;
After running it, you will see EPACTS output files by looking at&lt;br /&gt;
&lt;br /&gt;
 ls $OUT/assoc&lt;br /&gt;
&lt;br /&gt;
The top association results can be viewed by&lt;br /&gt;
&lt;br /&gt;
 head $OUT/assoc/single.epacts.top5000&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View top association results&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	AC	CALLRATE	MAF	PVALUE	SCORE	NS.CASE	NS.CTRL	AF.CASE	AF.CTRL&lt;br /&gt;
 22	36995620	36995620	22:36995620_A/G	62	36	1	0.29032	5.6717e-09	5.8262	31	31	0.51613	0.064516&lt;br /&gt;
 22	36993088	36993088	22:36993088_G/C	62	30	1	0.24194	7.3258e-07	4.9525	31	31	0.43548	0.048387&lt;br /&gt;
 22	36997871	36997871	22:36997871_G/T	62	30	1	0.24194	7.3258e-07	4.9525	31	31	0.43548	0.048387&lt;br /&gt;
 22	36987368	36987368	22:36987368_G/A	62	31	1	0.25	2.0898e-06	4.7445	31	31	0.43548	0.064516&lt;br /&gt;
 22	36987861	36987861	22:36987861_A/G	62	31	1	0.25	2.0898e-06	4.7445	31	31	0.43548	0.064516&lt;br /&gt;
 22	36985499	36985499	22:36985499_C/T	62	29	1	0.23387	5.7389e-06	4.5358	31	31	0.40323	0.064516&lt;br /&gt;
 22	36978260	36978260	22:36978260_G/T	62	28	1	0.22581	1.5051e-05	4.3279	31	31	0.3871	0.064516&lt;br /&gt;
 22	36998907	36998907	22:36998907_C/T	62	61	1	0.49194	0.00015557	-3.782	31	31	0.30645	0.67742&lt;br /&gt;
 22	36667082	36667082	22:36667082_T/G	62	28	1	0.22581	0.0003506	-3.5747	31	31	0.080645	0.37097&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can look also visualize the results by QQ-plot and Manhattan plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View QQ plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.epacts.qq.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.epacts.qq.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Manhattan plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.epacts.mh.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.epacts.mh.png|900px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, you can create a zoom plot focusing on the region of interest&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-zoom --vcf $OUT/assoc/snps.anno.vcf.gz --pos 22:36995620 --prefix $OUT/assoc/single&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Zoom Plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.zoom.22.36995620.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.zoom.22.36995620.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run EMMAX, you first need to create a kinship matrix&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-make-kin --vcf $OUT/assoc/snps.anno.vcf.gz --min-maf 0.01 --out $OUT/assoc/snps.anno.kinf --run 2 --chr 22&lt;br /&gt;
&lt;br /&gt;
And run EMMAX test specifying the kinship matrix&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-single --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/emmax --region 22:36000000-37000000 --test q.emmax --pheno PHENO --run 2 --kinf $OUT/assoc/snps.anno.kinf&lt;br /&gt;
&lt;br /&gt;
Then the results may look similar to previous ones.&lt;br /&gt;
&lt;br /&gt;
 head $OUT/assoc/emmax.epacts.top5000&lt;br /&gt;
&lt;br /&gt;
== Run Groupwise Test ==&lt;br /&gt;
&lt;br /&gt;
To run group-wise test such as gene-level burden test, you need to create a marker group file. If your VCF is already annotated, you can create a group file by running&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts make-group --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/snps.anno.grp --nonsyn&lt;br /&gt;
&lt;br /&gt;
The group file is simply a list of marker per group name, as shown below.&lt;br /&gt;
&lt;br /&gt;
 cat $OUT/assoc/snps.anno.grp &lt;br /&gt;
 APOL1	22:36655735_G/A	22:36657740_G/A	22:36661330_G/A	22:36661566_G/A	22:36661646_G/A	22:36661891_G/A	22:36661906_A/G&lt;br /&gt;
 APOL2	22:36623731_T/C	22:36623920_G/A	22:36629466_T/A	22:36633107_C/A&lt;br /&gt;
 APOL3	22:36537763_C/T	22:36537798_G/A	22:36556768_G/A	22:36556823_G/T&lt;br /&gt;
 APOL4	22:36587154_G/T	22:36587202_G/A	22:36587223_G/T	22:36587346_C/T	22:36587511_C/T	22:36587704_T/C	22:36587886_C/T	22:36593714_G/A	22:36597744_A/C	22:36598049_C/G	22:36598058_T/C	22:36598081_A/T&lt;br /&gt;
 APOL5	22:36122356_G/A	22:36122380_T/A	22:36122930_C/T	22:36123083_C/T	22:36124860_C/G&lt;br /&gt;
 FOXRED2	22:36900271_T/C	22:36900806_A/G&lt;br /&gt;
 MYH9	22:36681163_G/C	22:36684354_T/C	22:36710183_T/C&lt;br /&gt;
 Metazoa_SRP	22:36711990_C/G&lt;br /&gt;
 RBFOX2	22:36424450_A/C&lt;br /&gt;
 RP4-633O19__A.1	22:36792162_G/A&lt;br /&gt;
&lt;br /&gt;
If you have your own annotation, you can create your own burden test unit by modifying this file.&lt;br /&gt;
&lt;br /&gt;
If you want to run a collapsing burden test (CMC), run the following command&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts group --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/group.collapse --test b.collapse --groupf $OUT/assoc/snps.anno.grp --pheno PHENO --run 2 &lt;br /&gt;
&lt;br /&gt;
You can view the results by examining the output file&lt;br /&gt;
 cat $OUT/assoc/group.collapse.epacts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Output file&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	FRAC_WITH_RARE	NUM_ALL_VARS	NUM_PASS_VARS	NUM_SING_VARS	PVALUE	STATRHO&lt;br /&gt;
 22	36655735	36661906	22:36655735-36661906_APOL1	62	0.14516	7	4	0	0.42748	1&lt;br /&gt;
 22	36623731	36633107	22:36623731-36633107_APOL2	62	0.064516	4	1	0	0.038657	NA&lt;br /&gt;
 22	36537763	36556823	22:36537763-36556823_APOL3	62	0.080645	4	2	0	0.40634	0&lt;br /&gt;
 22	36587154	36598081	22:36587154-36598081_APOL4	62	0.14516	12	4	0	0.67891	0&lt;br /&gt;
 22	36122356	36124860	22:36122356-36124860_APOL5	62	0.1129	5	2	0	0.15055	0.3&lt;br /&gt;
 22	36900271	36900806	22:36900271-36900806_FOXRED2	NA	NA	2	0	0	NA	NA&lt;br /&gt;
 22	36681163	36710183	22:36681163-36710183_MYH9	62	0.032258	3	1	0	1	NA&lt;br /&gt;
 22	36711990	36711990	22:36711990-36711990_Metazoa_SRP	NA	NA	1	0	0	NA	NA&lt;br /&gt;
 22	36424450	36424450	22:36424450-36424450_RBFOX2	62	0.032258	1	1	0	1	NA&lt;br /&gt;
 22	36792162	36792162	22:36792162-36792162_RP4-633O19__A.1	NA	NA	1	0	0	NA	NA&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can run SKAT-O test in a similar way, but with a special tag&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts group --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/group.skato --test skat --skat-o --groupf $OUT/assoc/snps.anno.grp --pheno PHENO --run 2&lt;br /&gt;
&lt;br /&gt;
And view output files&lt;br /&gt;
 &lt;br /&gt;
 cat $OUT/assoc/group.skato.epacts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Output file&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	FRAC_WITH_RARE	NUM_ALL_VARS	NUM_PASS_VARS	NUM_SING_VARS	PVALUE	STATRHO&lt;br /&gt;
 22	36655735	36661906	22:36655735-36661906_APOL1	62	0.14516	7	4	0	0.42748	1&lt;br /&gt;
 22	36623731	36633107	22:36623731-36633107_APOL2	62	0.064516	4	1	0	0.038657	NA&lt;br /&gt;
 22	36537763	36556823	22:36537763-36556823_APOL3	62	0.080645	4	2	0	0.40634	0&lt;br /&gt;
 22	36587154	36598081	22:36587154-36598081_APOL4	62	0.14516	12	4	0	0.67891	0&lt;br /&gt;
 22	36122356	36124860	22:36122356-36124860_APOL5	62	0.1129	5	2	0	0.15055	0.3&lt;br /&gt;
 22	36900271	36900806	22:36900271-36900806_FOXRED2	NA	NA	2	0	0	NA	NA&lt;br /&gt;
 22	36681163	36710183	22:36681163-36710183_MYH9	62	0.032258	3	1	0	1	NA&lt;br /&gt;
 22	36711990	36711990	22:36711990-36711990_Metazoa_SRP	NA	NA	1	0	0	NA	NA&lt;br /&gt;
 22	36424450	36424450	22:36424450-36424450_RBFOX2	62	0.032258	1	1	0	1	NA&lt;br /&gt;
 22	36792162	36792162	22:36792162-36792162_RP4-633O19__A.1	NA	NA	1	0	0	NA	NA&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=SeqShop:_Genetic_Association_Analysis_Practical,_December_2014&amp;diff=12358</id>
		<title>SeqShop: Genetic Association Analysis Practical, December 2014</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=SeqShop:_Genetic_Association_Analysis_Practical,_December_2014&amp;diff=12358"/>
		<updated>2014-12-11T16:47:18Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* Setup your run environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
[[Media:Seqshop association 2014 06.pdf|View Lecture Slides]]&lt;br /&gt;
&lt;br /&gt;
[[Media:Seqshop association practice 2014 06.pdf|View Introductory Slides for Practical Session]]&lt;br /&gt;
&lt;br /&gt;
== Goals of This Session ==&lt;br /&gt;
&lt;br /&gt;
* Understand how to annotate variants using EPACTS&lt;br /&gt;
* Understand how to run single variant association analysis using EPACTS&lt;br /&gt;
* Understand how to run rare variant association test using EPACTS&lt;br /&gt;
* Understand how to visualize the association output from EPACTS&lt;br /&gt;
&lt;br /&gt;
== Setup in person at the SeqShop Workshop ==&lt;br /&gt;
&#039;&#039;This section is specifically for the SeqShop Workshop computers.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are not running during the SeqShop Workshop, please skip this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are not already logged in, please expand this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
{{SeqShopLogin}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setup your run environment===&lt;br /&gt;
This is the same setup you did for the previous tutorial, but you need to redo it each time you log in.&lt;br /&gt;
&lt;br /&gt;
This will setup some environment variables to point you to&lt;br /&gt;
* [[GotCloud]] program&lt;br /&gt;
* Tutorial input files&lt;br /&gt;
* Setup an output directory&lt;br /&gt;
** It will leave your output directory from the previous tutorial in tact.&lt;br /&gt;
 source /net/seqshop-server/home/mktrost/seqshop/setup.txt&lt;br /&gt;
* You won&#039;t see any output after running &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt;&lt;br /&gt;
** It silently sets up your environment&lt;br /&gt;
** If you want to view the detail of the setup, type&lt;br /&gt;
 less /net/seqshop-server/home/mktrost/seqshop/setup.txt&lt;br /&gt;
and press &#039;q&#039; to finish.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:200px&amp;quot;&amp;gt;&lt;br /&gt;
View setup.txt&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 export GC=/net/seqshop-server/home/mktrost/seqshop/gotcloud&lt;br /&gt;
 export SS=/net/seqshop-server/home/mktrost/seqshop/example&lt;br /&gt;
 export EPACTS=/net/seqshop-server/home/mktrost/seqshop/epacts&lt;br /&gt;
 export OUT=~/out&lt;br /&gt;
 mkdir -p ${OUT}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup when running on your own outside of the SeqShop Workshop ==&lt;br /&gt;
&#039;&#039;This section is specifically for running on your own outside of the SeqShop Workshop.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:600px&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;If you are running during the SeqShop Workshop, please skip this section.&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tutorial builds on the alignment &amp;amp; snpcall tutorials, if you have not already, please first run those tutorials: [[SeqShop:_Sequence_Mapping_and_Assembly_Practical|Alignment Tutorial]] &amp;amp; [[SeqShop: Variant Calling and Filtering for SNPs Practical|SNP Calling Tutorial]]&lt;br /&gt;
&lt;br /&gt;
=== Download &amp;amp; Build EPACTS ===&lt;br /&gt;
If you do not already have EPACTS:&lt;br /&gt;
* cd to where you want EPACTS installed (you can change this to any directory you want)&lt;br /&gt;
 mkdir -p ~/seqshop&lt;br /&gt;
 cd ~/seqshop/&lt;br /&gt;
* download, decompress, and build the version of epacts that was tested with this tutorial:&lt;br /&gt;
 wget http://www.sph.umich.edu/csg/kang/epacts/download/EPACTS-3.2.6.tar.gz&lt;br /&gt;
 tar xvf EPACTS-3.2.6.tar.gz&lt;br /&gt;
 cd EPACTS-3.2.6&lt;br /&gt;
 ./configure --prefix=$HOME/seqshop/epacts&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ../..&lt;br /&gt;
&lt;br /&gt;
{{SeqShopRemoteEnv}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Additional variables for EPACTS:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible&amp;quot; style=&amp;quot;width:500px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using bash (replace the paths below with the appropriate paths):&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;export EPACTS=~/seqshop/epacts&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:500px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using tcsh (replace the paths below with the appropriate paths):&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;setenv EPACTS ~/seqshop/epacts&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Preparing Input Files ==&lt;br /&gt;
&lt;br /&gt;
=== Input VCF file ===&lt;br /&gt;
&lt;br /&gt;
We will use SNP genotypes from the SNP calling session, after LD-aware genotype refinement.&lt;br /&gt;
Check the contents of the VCF file using the following command.&lt;br /&gt;
&lt;br /&gt;
 zless ${OUT}/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz&lt;br /&gt;
&lt;br /&gt;
=== Phenotype Information ===&lt;br /&gt;
&lt;br /&gt;
Phenotype information is prepared in PED format commonly used in other GWAS software such as MERLIN or PLINK.&lt;br /&gt;
&lt;br /&gt;
 less ${SS}/assoc/seqshop.ped&lt;br /&gt;
&lt;br /&gt;
The first several line should look like below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:200px&amp;quot;&amp;gt;&lt;br /&gt;
View Data&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #FAM_ID	IND_ID	DAD_ID	MOM_ID	SEX	PHENO&lt;br /&gt;
 HG00551	HG00551	0	0	0	0&lt;br /&gt;
 HG00553	HG00553	0	0	0	0&lt;br /&gt;
 HG00554	HG00554	0	0	0	0&lt;br /&gt;
 HG00637	HG00637	0	0	0	0&lt;br /&gt;
 HG00638	HG00638	0	0	0	0&lt;br /&gt;
 HG00640	HG00640	0	0	0	1&lt;br /&gt;
 HG00641	HG00641	0	0	0	1&lt;br /&gt;
 HG00734	HG00734	0	0	0	1&lt;br /&gt;
 HG00736	HG00736	0	0	0	0&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary phenotype can be encoded as 0-1 or 1-2. If the column contains more than two distinct values, it will automatically be recognized as quantitative values.&lt;br /&gt;
&lt;br /&gt;
EPACTS allows PED file to have a header line. The header line should contain the description of each column. EPACTS also accepts a standard PED format where .ped file contains the phenotype data and .dat file contains the information about each column.&lt;br /&gt;
&lt;br /&gt;
=== Installed version of EPACTS ===&lt;br /&gt;
&lt;br /&gt;
EPACTS are installed in the server. If you want to install EPACTS by yourself, visit [[EPACTS]] page for more details&lt;br /&gt;
&lt;br /&gt;
 ls $EPACTS/bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View EPACTS executable files&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 anno   epacts       epacts-cis-extract  epacts-group       epacts-multi     epacts.pm      epstopdf  test_run_epacts.sh&lt;br /&gt;
 bgzip  epacts-anno  epacts-download     epacts-make-group  epacts-pca-plot  epacts-single  pEmmax    vcfast&lt;br /&gt;
 chaps  epacts-cat   epacts-enrich       epacts-make-kin    epacts-plot      epacts-zoom    tabix     wGetOptions.pm&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that some tools undocumented in [[EPACTS]] documentation is under development and may not work.&lt;br /&gt;
&lt;br /&gt;
== Annotating Variants with EPACTS ==&lt;br /&gt;
&lt;br /&gt;
There are multiple software tools that provides a function to annotate variants, such as Variant Effect Predictor (VEP) that is used in 1000 Genomes Project. While most annotation software provides very similar results to each other, their computational efficiency can substantially vary. The annotation software EPACTS provides is extremely fast and can provide genome-wide annotation results in orders of magnitude faster than other widely available annotation software.&lt;br /&gt;
&lt;br /&gt;
In order to annotate variants with EPACTS, one can use &amp;lt;code&amp;gt;epacts-anno&amp;lt;/code&amp;gt; module.&lt;br /&gt;
 &lt;br /&gt;
 mkdir --p $OUT/assoc&lt;br /&gt;
 $EPACTS/bin/epacts-anno --in $OUT/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz --out $OUT/assoc/snps.anno.vcf.gz --ref $SS/ref22/human.g1k.v37.chr22.fa&lt;br /&gt;
&lt;br /&gt;
Then you will see a series of messages before annotation finishes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View the expected messages&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/anno -i /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz -r \&lt;br /&gt;
    /home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa -f refGene -g /home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz \&lt;br /&gt;
   -c /home/hmkang/seqshop/epacts/share/EPACTS/codon.txt -o  /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz --inputFormat vcf \&lt;br /&gt;
   -p /home/hmkang/seqshop/epacts/share/EPACTS/priority.txt&lt;br /&gt;
 The following parameters are available.  Ones with &amp;quot;[]&amp;quot; are in effect:&lt;br /&gt;
 &lt;br /&gt;
 Available Options&lt;br /&gt;
     Required Parameters :&lt;br /&gt;
                          -i [/net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz]&lt;br /&gt;
                          -o [/net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz]&lt;br /&gt;
          Gene Annotation&lt;br /&gt;
             Parameters : -g [/home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz]&lt;br /&gt;
                          -r [/home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa]&lt;br /&gt;
                          --inputFormat [vcf], --checkReference, -f [refGene]&lt;br /&gt;
                          -p [/home/hmkang/seqshop/epacts/share/EPACTS/priority.txt]&lt;br /&gt;
                          -c [/home/hmkang/seqshop/epacts/share/EPACTS/codon.txt]&lt;br /&gt;
                          -u [], -d [], --se [], --si [], --outputFormat []&lt;br /&gt;
  Other Annotation Tools : --genomeScore [], --bed [], --tabix []&lt;br /&gt;
 Load reference genome /home/hmkang/seqshop/ref22/human_g1k_v37.chr22.fa...&lt;br /&gt;
 DONE: 1 chromosomes and 51304566 bases are loaded.&lt;br /&gt;
 Load codon file /home/hmkang/seqshop/epacts/share/EPACTS/codon.txt...&lt;br /&gt;
 DONE: codon file loaded.&lt;br /&gt;
 Load priority file /home/hmkang/seqshop/epacts/share/EPACTS/priority.txt...&lt;br /&gt;
 DONE: 24 priority annotation types loaded.&lt;br /&gt;
 Load gene file /home/hmkang/seqshop/epacts/share/EPACTS/hg19_gencodeV14.txt.gz...&lt;br /&gt;
 DONE: 92627 gene loaded.&lt;br /&gt;
 DONE: Generated frequency of each annotype type in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.anno.frq ].&lt;br /&gt;
 DONE: Generated frequency of each highest priority annotation type in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.top.anno.frq ].&lt;br /&gt;
 Ts/Tv ratio: 2.35733&lt;br /&gt;
 Ts observed: 2718  times; Tv observed: 1153 times.&lt;br /&gt;
 DONE: Generated frequency of each base change in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.base.frq ].&lt;br /&gt;
 DONE: Generated frequency of each codon change in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.codon.frq ].&lt;br /&gt;
 DONE: Generated frequency of indel length in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.indel.frq ].&lt;br /&gt;
 ..............................................         &lt;br /&gt;
  ...      Anno(tation)                       ...       &lt;br /&gt;
  ...      Xiaowei Zhan, Goncalo Abecasis     ...      &lt;br /&gt;
   ...      Speical Thanks:                    ...     &lt;br /&gt;
    ...      Hyun Ming Kang, Yanming Li         ...    &lt;br /&gt;
     ...      zhanxw@umich.edu                    ...  &lt;br /&gt;
      ...      Sep 2011                            ... &lt;br /&gt;
       ................................................&lt;br /&gt;
                                                       &lt;br /&gt;
 DONE: 3871 varaints are annotated.&lt;br /&gt;
 DONE: Generated annotation output in [ /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz ].&lt;br /&gt;
 Annotation succeed!&lt;br /&gt;
 mv /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/bgzip -c /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp &amp;gt; /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz&lt;br /&gt;
 /home/hmkang/seqshop/epacts/bin/tabix -pvcf -f /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz&lt;br /&gt;
 rm /net/seqshop-server/hmkang/out/thunder/chr22/ALL/thunder/chr22.filtered.PASS.beagled.ALL.thunder.vcf.gz.tmp&lt;br /&gt;
 rm /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.log /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.top.anno.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.anno.frq /net/seqshop- server/hmkang/out/assoc/snps.anno.vcf.gz.base.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.codon.frq /net/seqshop-server/hmkang/out/assoc/snps.anno.vcf.gz.indel.frq&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After running annotation, you can check the annotation results. Let&#039;s look at the APOL g1 risk allele we manually examined in the SNP calling section.&lt;br /&gt;
&lt;br /&gt;
 $GC/bin/tabix $OUT/assoc/snps.anno.vcf.gz 22:36661906 | head -1 | cut -f 1-8&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View the annotation results&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 22	36661906	.	A	G	18	PASS	DP=409;MQ=59;NS=62;AN=124;AC=2;AF=0.013827;AB=0.4065;AZ=-0.5287;FIC=-0.0092;&lt;br /&gt;
             SLRT=-0.0075;HWEAF=0.0138;HWDAF=0.0276,0.0000;LBS=36,36,0,0,1,1,0,0;OBS=145,191,0,0,3,2,0,0;STR=-0.040;&lt;br /&gt;
             STZ=-0.740;CBR=0.008;CBZ=0.144;IOR=0.000;IOZ=-1.370;AOI=-5.614;AOZ=-4.243;LQR=0.178;MQ0=0.000;MQ10=0.000;MQ20=0.000;&lt;br /&gt;
             MQ30=0.000;SVM=1.51214;BAVGPOST=0.998;BRSQ=0.941;LDAF=0.0161;AVGPOST=1.0000;RSQ=1.0000;ERATE=0.0019;THETA=0.0013;&lt;br /&gt;
            ANNO=Nonsynonymous:APOL1;ANNOFULL=APOL1/ENST00000397278.3:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/6):Exon|&lt;br /&gt;
            APOL1/ENST00000426053.1:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base971/1143:Codon324/381:Exon5/5):Exon|&lt;br /&gt;
            APOL1/ENST00000422706.1:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/6):Exon|&lt;br /&gt;
            APOL1/ENST00000319136.4:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1073/1245:Codon358/415:Exon7/7):Exon|&lt;br /&gt;
            APOL1/ENST00000347595.7:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base662/834:Codon221/278:Exon3/3):Exon|&lt;br /&gt;
            APOL1/ENST00000397279.4:+:Nonsynonymous(AGC/Ser/S-&amp;gt;GGC/Gly/G:Base1025/1197:Codon342/399:Exon6/7):Exon&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What is the function of this variant?&lt;br /&gt;
* How many different transcript does the variant overlap with?&lt;br /&gt;
* How can you represent the variant in terms of amino acid changes?&lt;br /&gt;
&lt;br /&gt;
== Single Variant Association Analysis ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s run a single-variant association analysis using a score test. &lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-single --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/single --region 22:36000000-37000000 --test b.score --pheno PHENO --run 2 &lt;br /&gt;
&lt;br /&gt;
After running it, you will see EPACTS output files by looking at&lt;br /&gt;
&lt;br /&gt;
 ls $OUT/assoc&lt;br /&gt;
&lt;br /&gt;
The top association results can be viewed by&lt;br /&gt;
&lt;br /&gt;
 head $OUT/assoc/single.epacts.top5000&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View top association results&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	AC	CALLRATE	MAF	PVALUE	SCORE	NS.CASE	NS.CTRL	AF.CASE	AF.CTRL&lt;br /&gt;
 22	36995620	36995620	22:36995620_A/G	62	36	1	0.29032	5.6717e-09	5.8262	31	31	0.51613	0.064516&lt;br /&gt;
 22	36993088	36993088	22:36993088_G/C	62	30	1	0.24194	7.3258e-07	4.9525	31	31	0.43548	0.048387&lt;br /&gt;
 22	36997871	36997871	22:36997871_G/T	62	30	1	0.24194	7.3258e-07	4.9525	31	31	0.43548	0.048387&lt;br /&gt;
 22	36987368	36987368	22:36987368_G/A	62	31	1	0.25	2.0898e-06	4.7445	31	31	0.43548	0.064516&lt;br /&gt;
 22	36987861	36987861	22:36987861_A/G	62	31	1	0.25	2.0898e-06	4.7445	31	31	0.43548	0.064516&lt;br /&gt;
 22	36985499	36985499	22:36985499_C/T	62	29	1	0.23387	5.7389e-06	4.5358	31	31	0.40323	0.064516&lt;br /&gt;
 22	36978260	36978260	22:36978260_G/T	62	28	1	0.22581	1.5051e-05	4.3279	31	31	0.3871	0.064516&lt;br /&gt;
 22	36998907	36998907	22:36998907_C/T	62	61	1	0.49194	0.00015557	-3.782	31	31	0.30645	0.67742&lt;br /&gt;
 22	36667082	36667082	22:36667082_T/G	62	28	1	0.22581	0.0003506	-3.5747	31	31	0.080645	0.37097&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can look also visualize the results by QQ-plot and Manhattan plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View QQ plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.epacts.qq.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.epacts.qq.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Manhattan plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.epacts.mh.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.epacts.mh.png|900px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, you can create a zoom plot focusing on the region of interest&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-zoom --vcf $OUT/assoc/snps.anno.vcf.gz --pos 22:36995620 --prefix $OUT/assoc/single&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Zoom Plots&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
:&amp;lt;pre&amp;gt;evince $OUT/assoc/single.zoom.22.36995620.pdf&amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Single.zoom.22.36995620.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run EMMAX, you first need to create a kinship matrix&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-make-kin --vcf $OUT/assoc/snps.anno.vcf.gz --min-maf 0.01 --out $OUT/assoc/snps.anno.kinf --run 2 --chr 22&lt;br /&gt;
&lt;br /&gt;
And run EMMAX test specifying the kinship matrix&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts-single --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/emmax --region 22:36000000-37000000 --test q.emmax --pheno PHENO --run 2 --kinf $OUT/assoc/snps.anno.kinf&lt;br /&gt;
&lt;br /&gt;
Then the results may look similar to previous ones.&lt;br /&gt;
&lt;br /&gt;
 cat $OUT/assoc/emmax.epacts.top5000&lt;br /&gt;
&lt;br /&gt;
== Run Groupwise Test ==&lt;br /&gt;
&lt;br /&gt;
To run group-wise test such as gene-level burden test, you need to create a marker group file. If your VCF is already annotated, you can create a group file by running&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts make-group --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/snps.anno.grp --nonsyn&lt;br /&gt;
&lt;br /&gt;
The group file is simply a list of marker per group name, as shown below.&lt;br /&gt;
&lt;br /&gt;
 cat $OUT/assoc/snps.anno.grp &lt;br /&gt;
 APOL1	22:36655735_G/A	22:36657740_G/A	22:36661330_G/A	22:36661566_G/A	22:36661646_G/A	22:36661891_G/A	22:36661906_A/G&lt;br /&gt;
 APOL2	22:36623731_T/C	22:36623920_G/A	22:36629466_T/A	22:36633107_C/A&lt;br /&gt;
 APOL3	22:36537763_C/T	22:36537798_G/A	22:36556768_G/A	22:36556823_G/T&lt;br /&gt;
 APOL4	22:36587154_G/T	22:36587202_G/A	22:36587223_G/T	22:36587346_C/T	22:36587511_C/T	22:36587704_T/C	22:36587886_C/T	22:36593714_G/A	22:36597744_A/C	22:36598049_C/G	22:36598058_T/C	22:36598081_A/T&lt;br /&gt;
 APOL5	22:36122356_G/A	22:36122380_T/A	22:36122930_C/T	22:36123083_C/T	22:36124860_C/G&lt;br /&gt;
 FOXRED2	22:36900271_T/C	22:36900806_A/G&lt;br /&gt;
 MYH9	22:36681163_G/C	22:36684354_T/C	22:36710183_T/C&lt;br /&gt;
 Metazoa_SRP	22:36711990_C/G&lt;br /&gt;
 RBFOX2	22:36424450_A/C&lt;br /&gt;
 RP4-633O19__A.1	22:36792162_G/A&lt;br /&gt;
&lt;br /&gt;
If you have your own annotation, you can create your own burden test unit by modifying this file.&lt;br /&gt;
&lt;br /&gt;
If you want to run a collapsing burden test (CMC), run the following command&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts group --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/group.collapse --test b.collapse --groupf $OUT/assoc/snps.anno.grp --pheno PHENO --run 2 &lt;br /&gt;
&lt;br /&gt;
You can view the results by examining the output file&lt;br /&gt;
 cat $OUT/assoc/group.collapse.epacts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Output file&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	FRAC_WITH_RARE	NUM_ALL_VARS	NUM_PASS_VARS	NUM_SING_VARS	PVALUE	STATRHO&lt;br /&gt;
 22	36655735	36661906	22:36655735-36661906_APOL1	62	0.14516	7	4	0	0.42748	1&lt;br /&gt;
 22	36623731	36633107	22:36623731-36633107_APOL2	62	0.064516	4	1	0	0.038657	NA&lt;br /&gt;
 22	36537763	36556823	22:36537763-36556823_APOL3	62	0.080645	4	2	0	0.40634	0&lt;br /&gt;
 22	36587154	36598081	22:36587154-36598081_APOL4	62	0.14516	12	4	0	0.67891	0&lt;br /&gt;
 22	36122356	36124860	22:36122356-36124860_APOL5	62	0.1129	5	2	0	0.15055	0.3&lt;br /&gt;
 22	36900271	36900806	22:36900271-36900806_FOXRED2	NA	NA	2	0	0	NA	NA&lt;br /&gt;
 22	36681163	36710183	22:36681163-36710183_MYH9	62	0.032258	3	1	0	1	NA&lt;br /&gt;
 22	36711990	36711990	22:36711990-36711990_Metazoa_SRP	NA	NA	1	0	0	NA	NA&lt;br /&gt;
 22	36424450	36424450	22:36424450-36424450_RBFOX2	62	0.032258	1	1	0	1	NA&lt;br /&gt;
 22	36792162	36792162	22:36792162-36792162_RP4-633O19__A.1	NA	NA	1	0	0	NA	NA&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can run SKAT-O test in a similar way, but with a special tag&lt;br /&gt;
&lt;br /&gt;
 $EPACTS/bin/epacts group --ped $SS/assoc/seqshop.ped --vcf $OUT/assoc/snps.anno.vcf.gz --out $OUT/assoc/group.skato --test skat --skat-o --groupf $OUT/assoc/snps.anno.grp --pheno PHENO --run 2&lt;br /&gt;
&lt;br /&gt;
And view output files&lt;br /&gt;
 &lt;br /&gt;
 cat $OUT/assoc/group.skato.epacts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:400px&amp;quot;&amp;gt;&lt;br /&gt;
View Output file&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
 #CHROM	BEGIN	END	MARKER_ID	NS	FRAC_WITH_RARE	NUM_ALL_VARS	NUM_PASS_VARS	NUM_SING_VARS	PVALUE	STATRHO&lt;br /&gt;
 22	36655735	36661906	22:36655735-36661906_APOL1	62	0.14516	7	4	0	0.42748	1&lt;br /&gt;
 22	36623731	36633107	22:36623731-36633107_APOL2	62	0.064516	4	1	0	0.038657	NA&lt;br /&gt;
 22	36537763	36556823	22:36537763-36556823_APOL3	62	0.080645	4	2	0	0.40634	0&lt;br /&gt;
 22	36587154	36598081	22:36587154-36598081_APOL4	62	0.14516	12	4	0	0.67891	0&lt;br /&gt;
 22	36122356	36124860	22:36122356-36124860_APOL5	62	0.1129	5	2	0	0.15055	0.3&lt;br /&gt;
 22	36900271	36900806	22:36900271-36900806_FOXRED2	NA	NA	2	0	0	NA	NA&lt;br /&gt;
 22	36681163	36710183	22:36681163-36710183_MYH9	62	0.032258	3	1	0	1	NA&lt;br /&gt;
 22	36711990	36711990	22:36711990-36711990_Metazoa_SRP	NA	NA	1	0	0	NA	NA&lt;br /&gt;
 22	36424450	36424450	22:36424450-36424450_RBFOX2	62	0.032258	1	1	0	1	NA&lt;br /&gt;
 22	36792162	36792162	22:36792162-36792162_RP4-633O19__A.1	NA	NA	1	0	0	NA	NA&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6130</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6130"/>
		<updated>2012-12-14T16:04:01Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* 5. &amp;amp;nbsp;Report results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Please download the latest version of EPACTS here:&amp;amp;nbsp;&amp;amp;nbsp;http://www.sph.umich.edu/csg/kang/epacts/download/&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install and then type the following commands&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp; tar xzvf EPACTS-3.0.0.tar.gz&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp;cd EPACTS-3.0.0&lt;br /&gt;
 &amp;amp;gt; ./configure --prefix [INSTALL&amp;amp;nbsp;DIRECTORY]&lt;br /&gt;
 &amp;amp;gt; make&lt;br /&gt;
 &amp;amp;gt; make install&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 EPACTS-3.0.0/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ EPACTS-3.0.0/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here]. &lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to pseudo VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.5.gz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file &lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt; &lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes_march2012_imputation_analysis_plan_08312012_v2.pdf]] (Updated Dec 14, 2012)&lt;br /&gt;
&lt;br /&gt;
For frequently asked questions regarding the file format, please see: &amp;amp;nbsp;[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#Results_FIle_Clarifications genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#Results_FIle_Clarifications]&lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally much faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files for every chromosome are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI &lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
For &#039;&#039;&#039;analysis 1&#039;&#039;&#039;, please follow the following results file guidelines: &amp;amp;nbsp; [[Image:1000Genomes_march2012_imputation_analysis_plan_08312012_v2.pdf]] (Updated Dec 14, 2012)&lt;br /&gt;
&lt;br /&gt;
For frequently asked questions regarding the file format, please see: &amp;amp;nbsp;[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#Results_FIle_Clarifications genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#Results_FIle_Clarifications]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;analyses 2 and 3&#039;&#039;&#039;, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The FTP hostname is: &amp;amp;nbsp;&#039;&#039;&#039;ftp.broadinstitute.org&#039;&#039;&#039;. &amp;amp;nbsp;Please place your files into to the /incoming/ directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors  ==&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript). &lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Results FIle Clarifications ==&lt;br /&gt;
&lt;br /&gt;
=== 1. How do I code the INDEL variant names and alleles?  ===&lt;br /&gt;
&lt;br /&gt;
Please use the variant name and the allele name directly from IMPUTE or minimac. Please do NOT recode variant names or alleles. We will do this step in the analysis for consistency. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: If you have recoded your INDEL alleles, please tell us so we can remove your file and let us know when you can reupload with the original variable and allele names. &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;br&amp;gt;2. The document asks for the number of homozygotes and heterozygotes in case and control. How do I get this from my data? Is this relevant for imputed data?  ===&lt;br /&gt;
&lt;br /&gt;
These numbers were relevant to genotyped data but not for imputed data. We didn&#039;t intend to ask for this. To retain the same file format between results already submitted and those to be submitted please retain the columns with a &amp;quot;.&amp;quot; for the value. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: No action. You do not need to redo the file. We will skip these columns. &lt;br /&gt;
&lt;br /&gt;
=== 3. For the &amp;quot;Imputed&amp;quot; variable, what does imputed mean in the context of the data output from MACH and IMPUTE?  ===&lt;br /&gt;
&lt;br /&gt;
This is a hold over from the last round of analysis where we asked for results separately from genotyped SNPs and imputed SNPs and wanted to distinguish between the two. We will use r2_hat or info measures to estimate the accuracy of the genotypes. This column will be retained for consistency with files already submitted but should be filled in with &amp;quot;.&amp;quot; or &amp;quot;1&amp;quot;. It will not be used in the analysis. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: No action. You do not need to redo the file. We will skip this column.&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6129</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6129"/>
		<updated>2012-12-14T16:03:10Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* 5. &amp;amp;nbsp;Report results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Please download the latest version of EPACTS here:&amp;amp;nbsp;&amp;amp;nbsp;http://www.sph.umich.edu/csg/kang/epacts/download/&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install and then type the following commands&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp; tar xzvf EPACTS-3.0.0.tar.gz&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp;cd EPACTS-3.0.0&lt;br /&gt;
 &amp;amp;gt; ./configure --prefix [INSTALL&amp;amp;nbsp;DIRECTORY]&lt;br /&gt;
 &amp;amp;gt; make&lt;br /&gt;
 &amp;amp;gt; make install&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 EPACTS-3.0.0/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ EPACTS-3.0.0/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here]. &lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to pseudo VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.5.gz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file &lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt; &lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes_march2012_imputation_analysis_plan_08312012_v2.pdf]] (Updated Dec 14, 2012)&lt;br /&gt;
&lt;br /&gt;
For frequently asked questions regarding the file format, please see: &amp;amp;nbsp;[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#Results_FIle_Clarifications genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#Results_FIle_Clarifications]&lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally much faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files for every chromosome are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI &lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
For &#039;&#039;&#039;analysis 1&#039;&#039;&#039;, please follow the following results file guidelines: &amp;amp;nbsp; [[Image:1000Genomes_march2012_imputation_analysis_plan_08312012_v2.pdf]] (Updated Dec 14, 2012)&lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;analyses 2 and 3&#039;&#039;&#039;, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The FTP hostname is: &amp;amp;nbsp;&#039;&#039;&#039;ftp.broadinstitute.org&#039;&#039;&#039;. &amp;amp;nbsp;Please place your files into to the /incoming/ directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors  ==&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript). &lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Results FIle Clarifications ==&lt;br /&gt;
&lt;br /&gt;
=== 1. How do I code the INDEL variant names and alleles?  ===&lt;br /&gt;
&lt;br /&gt;
Please use the variant name and the allele name directly from IMPUTE or minimac. Please do NOT recode variant names or alleles. We will do this step in the analysis for consistency. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: If you have recoded your INDEL alleles, please tell us so we can remove your file and let us know when you can reupload with the original variable and allele names. &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;br&amp;gt;2. The document asks for the number of homozygotes and heterozygotes in case and control. How do I get this from my data? Is this relevant for imputed data?  ===&lt;br /&gt;
&lt;br /&gt;
These numbers were relevant to genotyped data but not for imputed data. We didn&#039;t intend to ask for this. To retain the same file format between results already submitted and those to be submitted please retain the columns with a &amp;quot;.&amp;quot; for the value. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: No action. You do not need to redo the file. We will skip these columns. &lt;br /&gt;
&lt;br /&gt;
=== 3. For the &amp;quot;Imputed&amp;quot; variable, what does imputed mean in the context of the data output from MACH and IMPUTE?  ===&lt;br /&gt;
&lt;br /&gt;
This is a hold over from the last round of analysis where we asked for results separately from genotyped SNPs and imputed SNPs and wanted to distinguish between the two. We will use r2_hat or info measures to estimate the accuracy of the genotypes. This column will be retained for consistency with files already submitted but should be filled in with &amp;quot;.&amp;quot; or &amp;quot;1&amp;quot;. It will not be used in the analysis. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: No action. You do not need to redo the file. We will skip this column.&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6128</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6128"/>
		<updated>2012-12-14T16:02:58Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* A. Typical DIAGRAM analysis using existing association pipeline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Please download the latest version of EPACTS here:&amp;amp;nbsp;&amp;amp;nbsp;http://www.sph.umich.edu/csg/kang/epacts/download/&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install and then type the following commands&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp; tar xzvf EPACTS-3.0.0.tar.gz&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp;cd EPACTS-3.0.0&lt;br /&gt;
 &amp;amp;gt; ./configure --prefix [INSTALL&amp;amp;nbsp;DIRECTORY]&lt;br /&gt;
 &amp;amp;gt; make&lt;br /&gt;
 &amp;amp;gt; make install&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 EPACTS-3.0.0/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ EPACTS-3.0.0/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here]. &lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to pseudo VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.5.gz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file &lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt; &lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes_march2012_imputation_analysis_plan_08312012_v2.pdf]] (Updated Dec 14, 2012)&lt;br /&gt;
&lt;br /&gt;
For frequently asked questions regarding the file format, please see: &amp;amp;nbsp;[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#Results_FIle_Clarifications genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#Results_FIle_Clarifications]&lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally much faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files for every chromosome are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI &lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
For &#039;&#039;&#039;analysis 1&#039;&#039;&#039;, please follow the following results file guidelines: &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;analyses 2 and 3&#039;&#039;&#039;, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The FTP hostname is: &amp;amp;nbsp;&#039;&#039;&#039;ftp.broadinstitute.org&#039;&#039;&#039;. &amp;amp;nbsp;Please place your files into to the /incoming/ directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors  ==&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript). &lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Results FIle Clarifications ==&lt;br /&gt;
&lt;br /&gt;
=== 1. How do I code the INDEL variant names and alleles?  ===&lt;br /&gt;
&lt;br /&gt;
Please use the variant name and the allele name directly from IMPUTE or minimac. Please do NOT recode variant names or alleles. We will do this step in the analysis for consistency. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: If you have recoded your INDEL alleles, please tell us so we can remove your file and let us know when you can reupload with the original variable and allele names. &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;br&amp;gt;2. The document asks for the number of homozygotes and heterozygotes in case and control. How do I get this from my data? Is this relevant for imputed data?  ===&lt;br /&gt;
&lt;br /&gt;
These numbers were relevant to genotyped data but not for imputed data. We didn&#039;t intend to ask for this. To retain the same file format between results already submitted and those to be submitted please retain the columns with a &amp;quot;.&amp;quot; for the value. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: No action. You do not need to redo the file. We will skip these columns. &lt;br /&gt;
&lt;br /&gt;
=== 3. For the &amp;quot;Imputed&amp;quot; variable, what does imputed mean in the context of the data output from MACH and IMPUTE?  ===&lt;br /&gt;
&lt;br /&gt;
This is a hold over from the last round of analysis where we asked for results separately from genotyped SNPs and imputed SNPs and wanted to distinguish between the two. We will use r2_hat or info measures to estimate the accuracy of the genotypes. This column will be retained for consistency with files already submitted but should be filled in with &amp;quot;.&amp;quot; or &amp;quot;1&amp;quot;. It will not be used in the analysis. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: No action. You do not need to redo the file. We will skip this column.&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=File:1000Genomes_march2012_imputation_analysis_plan_08312012_v2.pdf&amp;diff=6127</id>
		<title>File:1000Genomes march2012 imputation analysis plan 08312012 v2.pdf</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=File:1000Genomes_march2012_imputation_analysis_plan_08312012_v2.pdf&amp;diff=6127"/>
		<updated>2012-12-14T16:02:06Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6126</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6126"/>
		<updated>2012-12-14T16:01:47Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* A. Typical DIAGRAM analysis using existing association pipeline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Please download the latest version of EPACTS here:&amp;amp;nbsp;&amp;amp;nbsp;http://www.sph.umich.edu/csg/kang/epacts/download/&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install and then type the following commands&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp; tar xzvf EPACTS-3.0.0.tar.gz&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp;cd EPACTS-3.0.0&lt;br /&gt;
 &amp;amp;gt; ./configure --prefix [INSTALL&amp;amp;nbsp;DIRECTORY]&lt;br /&gt;
 &amp;amp;gt; make&lt;br /&gt;
 &amp;amp;gt; make install&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 EPACTS-3.0.0/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ EPACTS-3.0.0/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here]. &lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to pseudo VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.5.gz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file &lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt; &lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] [[Image:1000Genomes_march2012_imputation_analysis_plan_08312012_v2.pdf]] &lt;br /&gt;
&lt;br /&gt;
For frequently asked questions regarding the file format, please see: &amp;amp;nbsp;[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#Results_FIle_Clarifications genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#Results_FIle_Clarifications]&lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally much faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files for every chromosome are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI &lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
For &#039;&#039;&#039;analysis 1&#039;&#039;&#039;, please follow the following results file guidelines: &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;analyses 2 and 3&#039;&#039;&#039;, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The FTP hostname is: &amp;amp;nbsp;&#039;&#039;&#039;ftp.broadinstitute.org&#039;&#039;&#039;. &amp;amp;nbsp;Please place your files into to the /incoming/ directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors  ==&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript). &lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Results FIle Clarifications ==&lt;br /&gt;
&lt;br /&gt;
=== 1. How do I code the INDEL variant names and alleles?  ===&lt;br /&gt;
&lt;br /&gt;
Please use the variant name and the allele name directly from IMPUTE or minimac. Please do NOT recode variant names or alleles. We will do this step in the analysis for consistency. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: If you have recoded your INDEL alleles, please tell us so we can remove your file and let us know when you can reupload with the original variable and allele names. &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;br&amp;gt;2. The document asks for the number of homozygotes and heterozygotes in case and control. How do I get this from my data? Is this relevant for imputed data?  ===&lt;br /&gt;
&lt;br /&gt;
These numbers were relevant to genotyped data but not for imputed data. We didn&#039;t intend to ask for this. To retain the same file format between results already submitted and those to be submitted please retain the columns with a &amp;quot;.&amp;quot; for the value. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: No action. You do not need to redo the file. We will skip these columns. &lt;br /&gt;
&lt;br /&gt;
=== 3. For the &amp;quot;Imputed&amp;quot; variable, what does imputed mean in the context of the data output from MACH and IMPUTE?  ===&lt;br /&gt;
&lt;br /&gt;
This is a hold over from the last round of analysis where we asked for results separately from genotyped SNPs and imputed SNPs and wanted to distinguish between the two. We will use r2_hat or info measures to estimate the accuracy of the genotypes. This column will be retained for consistency with files already submitted but should be filled in with &amp;quot;.&amp;quot; or &amp;quot;1&amp;quot;. It will not be used in the analysis. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: No action. You do not need to redo the file. We will skip this column.&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6125</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6125"/>
		<updated>2012-12-14T16:00:49Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Please download the latest version of EPACTS here:&amp;amp;nbsp;&amp;amp;nbsp;http://www.sph.umich.edu/csg/kang/epacts/download/&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install and then type the following commands&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp; tar xzvf EPACTS-3.0.0.tar.gz&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp;cd EPACTS-3.0.0&lt;br /&gt;
 &amp;amp;gt; ./configure --prefix [INSTALL&amp;amp;nbsp;DIRECTORY]&lt;br /&gt;
 &amp;amp;gt; make&lt;br /&gt;
 &amp;amp;gt; make install&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 EPACTS-3.0.0/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ EPACTS-3.0.0/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here]. &lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to pseudo VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.5.gz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file &lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt; &lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
For frequently asked questions regarding the file format, please see: &amp;amp;nbsp;[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#Results_FIle_Clarifications genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#Results_FIle_Clarifications]&lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally much faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files for every chromosome are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI &lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
For &#039;&#039;&#039;analysis 1&#039;&#039;&#039;, please follow the following results file guidelines: &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;analyses 2 and 3&#039;&#039;&#039;, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The FTP hostname is: &amp;amp;nbsp;&#039;&#039;&#039;ftp.broadinstitute.org&#039;&#039;&#039;. &amp;amp;nbsp;Please place your files into to the /incoming/ directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors  ==&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript). &lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Results FIle Clarifications ==&lt;br /&gt;
&lt;br /&gt;
=== 1. How do I code the INDEL variant names and alleles?  ===&lt;br /&gt;
&lt;br /&gt;
Please use the variant name and the allele name directly from IMPUTE or minimac. Please do NOT recode variant names or alleles. We will do this step in the analysis for consistency. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: If you have recoded your INDEL alleles, please tell us so we can remove your file and let us know when you can reupload with the original variable and allele names. &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;br&amp;gt;2. The document asks for the number of homozygotes and heterozygotes in case and control. How do I get this from my data? Is this relevant for imputed data?  ===&lt;br /&gt;
&lt;br /&gt;
These numbers were relevant to genotyped data but not for imputed data. We didn&#039;t intend to ask for this. To retain the same file format between results already submitted and those to be submitted please retain the columns with a &amp;quot;.&amp;quot; for the value. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: No action. You do not need to redo the file. We will skip these columns. &lt;br /&gt;
&lt;br /&gt;
=== 3. For the &amp;quot;Imputed&amp;quot; variable, what does imputed mean in the context of the data output from MACH and IMPUTE?  ===&lt;br /&gt;
&lt;br /&gt;
This is a hold over from the last round of analysis where we asked for results separately from genotyped SNPs and imputed SNPs and wanted to distinguish between the two. We will use r2_hat or info measures to estimate the accuracy of the genotypes. This column will be retained for consistency with files already submitted but should be filled in with &amp;quot;.&amp;quot; or &amp;quot;1&amp;quot;. It will not be used in the analysis. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: No action. You do not need to redo the file. We will skip this column.&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6124</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6124"/>
		<updated>2012-12-14T15:58:33Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Please download the latest version of EPACTS here:&amp;amp;nbsp;&amp;amp;nbsp;http://www.sph.umich.edu/csg/kang/epacts/download/&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install and then type the following commands&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp; tar xzvf EPACTS-3.0.0.tar.gz&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp;cd EPACTS-3.0.0&lt;br /&gt;
 &amp;amp;gt; ./configure --prefix [INSTALL&amp;amp;nbsp;DIRECTORY]&lt;br /&gt;
 &amp;amp;gt; make&lt;br /&gt;
 &amp;amp;gt; make install&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 EPACTS-3.0.0/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ EPACTS-3.0.0/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here]. &lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to pseudo VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.5.gz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file &lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt; &lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally much faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files for every chromosome are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI &lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
For &#039;&#039;&#039;analysis 1&#039;&#039;&#039;, please follow the following results file guidelines: &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;analyses 2 and 3&#039;&#039;&#039;, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The FTP hostname is: &amp;amp;nbsp;&#039;&#039;&#039;ftp.broadinstitute.org&#039;&#039;&#039;. &amp;amp;nbsp;Please place your files into to the /incoming/ directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors  ==&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript). &lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Results FIle Clarifications ==&lt;br /&gt;
&lt;br /&gt;
=== 1. How do I code the INDEL variant names and alleles?  ===&lt;br /&gt;
&lt;br /&gt;
Please use the variant name and the allele name directly from IMPUTE or minimac. Please do NOT recode variant names or alleles. We will do this step in the analysis for consistency. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: If you have recoded your INDEL alleles, please tell us so we can remove your file and let us know when you can reupload with the original variable and allele names. &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;br&amp;gt;2. The document asks for the number of homozygotes and heterozygotes in case and control. How do I get this from my data? Is this relevant for imputed data?  ===&lt;br /&gt;
&lt;br /&gt;
These numbers were relevant to genotyped data but not for imputed data. We didn&#039;t intend to ask for this. To retain the same file format between results already submitted and those to be submitted please retain the columns with a &amp;quot;.&amp;quot; for the value. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: No action. You do not need to redo the file. We will skip these columns. &lt;br /&gt;
&lt;br /&gt;
=== 3. For the &amp;quot;Imputed&amp;quot; variable, what does imputed mean in the context of the data output from MACH and IMPUTE?  ===&lt;br /&gt;
&lt;br /&gt;
This is a hold over from the last round of analysis where we asked for results separately from genotyped SNPs and imputed SNPs and wanted to distinguish between the two. We will use r2_hat or info measures to estimate the accuracy of the genotypes. This column will be retained for consistency with files already submitted but should be filled in with &amp;quot;.&amp;quot; or &amp;quot;1&amp;quot;. It will not be used in the analysis. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: No action. You do not need to redo the file. We will skip this column.&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6123</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6123"/>
		<updated>2012-12-14T15:58:24Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* Troubleshooting Common Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Please download the latest version of EPACTS here:&amp;amp;nbsp;&amp;amp;nbsp;http://www.sph.umich.edu/csg/kang/epacts/download/&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install and then type the following commands&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp; tar xzvf EPACTS-3.0.0.tar.gz&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp;cd EPACTS-3.0.0&lt;br /&gt;
 &amp;amp;gt; ./configure --prefix [INSTALL&amp;amp;nbsp;DIRECTORY]&lt;br /&gt;
 &amp;amp;gt; make&lt;br /&gt;
 &amp;amp;gt; make install&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 EPACTS-3.0.0/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ EPACTS-3.0.0/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here]. &lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to pseudo VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.5.gz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file &lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt; &lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally much faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files for every chromosome are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI &lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
For &#039;&#039;&#039;analysis 1&#039;&#039;&#039;, please follow the following results file guidelines: &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;analyses 2 and 3&#039;&#039;&#039;, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The FTP hostname is: &amp;amp;nbsp;&#039;&#039;&#039;ftp.broadinstitute.org&#039;&#039;&#039;. &amp;amp;nbsp;Please place your files into to the /incoming/ directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors  ==&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript). &lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Results FIle Clarifications: ==&lt;br /&gt;
&lt;br /&gt;
=== 1. How do I code the INDEL variant names and alleles?  ===&lt;br /&gt;
&lt;br /&gt;
Please use the variant name and the allele name directly from IMPUTE or minimac. Please do NOT recode variant names or alleles. We will do this step in the analysis for consistency. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: If you have recoded your INDEL alleles, please tell us so we can remove your file and let us know when you can reupload with the original variable and allele names. &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;br&amp;gt;2. The document asks for the number of homozygotes and heterozygotes in case and control. How do I get this from my data? Is this relevant for imputed data?  ===&lt;br /&gt;
&lt;br /&gt;
These numbers were relevant to genotyped data but not for imputed data. We didn&#039;t intend to ask for this. To retain the same file format between results already submitted and those to be submitted please retain the columns with a &amp;quot;.&amp;quot; for the value. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: No action. You do not need to redo the file. We will skip these columns. &lt;br /&gt;
&lt;br /&gt;
=== 3. For the &amp;quot;Imputed&amp;quot; variable, what does imputed mean in the context of the data output from MACH and IMPUTE? ===&lt;br /&gt;
&lt;br /&gt;
This is a hold over from the last round of analysis where we asked for results separately from genotyped SNPs and imputed SNPs and wanted to distinguish between the two. We will use r2_hat or info measures to estimate the accuracy of the genotypes. This column will be retained for consistency with files already submitted but should be filled in with &amp;quot;.&amp;quot; or &amp;quot;1&amp;quot;. It will not be used in the analysis. &lt;br /&gt;
&lt;br /&gt;
ACTION IF YOU HAVE UPLOADED YOUR FILE: No action. You do not need to redo the file. We will skip this column.&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6091</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6091"/>
		<updated>2012-12-10T16:52:28Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* 5. &amp;amp;nbsp;Report EPACTS results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Please download the latest version of EPACTS here:&amp;amp;nbsp;&amp;amp;nbsp;http://www.sph.umich.edu/csg/kang/epacts/download/&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install and then type the following commands&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp; tar xzvf EPACTS-3.0.0.tar.gz&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp;cd EPACTS-3.0.0&lt;br /&gt;
 &amp;amp;gt; ./configure --prefix [INSTALL&amp;amp;nbsp;DIRECTORY]&lt;br /&gt;
 &amp;amp;gt; make&lt;br /&gt;
 &amp;amp;gt; make install&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 EPACTS-3.0.0/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ EPACTS-3.0.0/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here]. &lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to pseudo VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.5.gz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file &lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt; &lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally much faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files for every chromosome are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI &lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
For &#039;&#039;&#039;analysis 1&#039;&#039;&#039;, please follow the following results file guidelines: &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;analyses 2 and 3&#039;&#039;&#039;, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The FTP hostname is: &amp;amp;nbsp;&#039;&#039;&#039;ftp.broadinstitute.org&#039;&#039;&#039;. &amp;amp;nbsp;Please place your files into to the /incoming/ directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6090</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=6090"/>
		<updated>2012-12-10T16:49:54Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* For External Users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Please download the latest version of EPACTS here:&amp;amp;nbsp;&amp;amp;nbsp;http://www.sph.umich.edu/csg/kang/epacts/download/&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install and then type the following commands&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp; tar xzvf EPACTS-3.0.0.tar.gz&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp;cd EPACTS-3.0.0&lt;br /&gt;
 &amp;amp;gt; ./configure --prefix [INSTALL&amp;amp;nbsp;DIRECTORY]&lt;br /&gt;
 &amp;amp;gt; make&lt;br /&gt;
 &amp;amp;gt; make install&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 EPACTS-3.0.0/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ EPACTS-3.0.0/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here]. &lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to pseudo VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.5.gz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file &lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt; &lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally much faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files for every chromosome are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI &lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The FTP hostname is: &amp;amp;nbsp;&#039;&#039;&#039;ftp.broadinstitute.org&#039;&#039;&#039;. &amp;amp;nbsp;Please place your files into to the /incoming/ directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5974</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5974"/>
		<updated>2012-12-02T21:28:25Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*http://www.sph.umich.edu/csg/kang/epacts/download/EPACTS-3.0.0.tar.gz (99MB) &lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install and then type the following commands&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp; tar xzvf EPACTS-3.0.0.tar.gz&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp;cd EPACTS-3.0.0&lt;br /&gt;
 &amp;amp;gt; ./configure --prefix [INSTALL&amp;amp;nbsp;DIRECTORY]&lt;br /&gt;
 &amp;amp;gt; make&lt;br /&gt;
 &amp;amp;gt; make install&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 EPACTS-3.0.0/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ EPACTS-3.0.0/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here]. &lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to pseudo VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.5.gz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file &lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt; &lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally much faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files for every chromosome are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI &lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The FTP hostname is: &amp;amp;nbsp;&#039;&#039;&#039;ftp.broadinstitute.org&#039;&#039;&#039;. &amp;amp;nbsp;Please place your files into to the /incoming/ directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5973</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5973"/>
		<updated>2012-12-02T21:27:15Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* 5. &amp;amp;nbsp;Report EPACTS results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*http://www.sph.umich.edu/csg/kang/epacts/download/EPACTS-3.0.0.tar.gz (99MB) &lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install and then type the following commands&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp; tar xzvf EPACTS-3.0.0.tar.gz&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp;cd EPACTS-3.0.0&lt;br /&gt;
 &amp;amp;gt; ./configure --prefix [INSTALL&amp;amp;nbsp;DIRECTORY]&lt;br /&gt;
 &amp;amp;gt; make&lt;br /&gt;
 &amp;amp;gt; make install&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 EPACTS-3.0.0/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ EPACTS-3.0.0/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here]. &lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to pseudo VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.5.gz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file &lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt; &lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally much faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files for every chromosome are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI &lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server (ftp.broadinstitute.org): &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5972</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5972"/>
		<updated>2012-12-01T23:35:09Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*http://www.sph.umich.edu/csg/kang/epacts/download/EPACTS-3.0.0.tar.gz (99MB) &lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install and then type the following commands&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp; tar xzvf EPACTS-3.0.0.tar.gz&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp;cd EPACTS-3.0.0&lt;br /&gt;
 &amp;amp;gt; ./configure --prefix [INSTALL&amp;amp;nbsp;DIRECTORY]&lt;br /&gt;
 &amp;amp;gt; make&lt;br /&gt;
 &amp;amp;gt; make install&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 EPACTS-3.0.0/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ EPACTS-3.0.0/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here]. &lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to pseudo VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.5.gz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file &lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt; &lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)&amp;amp;nbsp;[please submit as soon as the analysis is complete]  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally much faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files for every chromosome are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;EPACTS-3.0.0/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI &lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5971</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5971"/>
		<updated>2012-12-01T23:34:12Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*http://www.sph.umich.edu/csg/kang/epacts/download/EPACTS-3.0.0.tar.gz (99MB) &lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install and then type the following commands&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp; tar xzvf EPACTS-3.0.0.tar.gz&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp;cd EPACTS-3.0.0&lt;br /&gt;
 &amp;amp;gt; ./configure --prefix [INSTALL&amp;amp;nbsp;DIRECTORY]&lt;br /&gt;
 &amp;amp;gt; make&lt;br /&gt;
 &amp;amp;gt; make install&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 EPACTS-3.0.0/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to pseudo VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.5.gz  here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]:&lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete] ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC&amp;amp;nbsp;[please submit as soon as the analysis is complete] ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)&amp;amp;nbsp;[please submit as soon as the analysis is complete] ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally much faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files for every chromosome are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5970</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5970"/>
		<updated>2012-12-01T23:33:39Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* 1. &amp;amp;nbsp;Download and install EPACTS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*http://www.sph.umich.edu/csg/kang/epacts/download/EPACTS-3.0.0.tar.gz (99MB) &lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install and then type the following commands&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp; tar xzvf EPACTS-3.0.0.tar.gz&lt;br /&gt;
 &amp;amp;gt;&amp;amp;nbsp;cd EPACTS-3.0.0&lt;br /&gt;
 &amp;amp;gt; ./configure --prefix [INSTALL&amp;amp;nbsp;DIRECTORY]&lt;br /&gt;
 &amp;amp;gt; make&lt;br /&gt;
 &amp;amp;gt; make install&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ EPACTS-3.0.0/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to pseudo VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.5.gz  here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]:&lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete] ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC&amp;amp;nbsp;[please submit as soon as the analysis is complete] ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)&amp;amp;nbsp;[please submit as soon as the analysis is complete] ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally much faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files for every chromosome are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5630</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5630"/>
		<updated>2012-10-27T20:58:28Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete] ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC&amp;amp;nbsp;[please submit as soon as the analysis is complete] ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)&amp;amp;nbsp;[please submit as soon as the analysis is complete] ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally much faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files for every chromosome are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5629</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5629"/>
		<updated>2012-10-27T20:57:42Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete] ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC&amp;amp;nbsp;[please submit as soon as the analysis is complete] ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)&amp;amp;nbsp;[please submit as soon as the analysis is complete] ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5628</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5628"/>
		<updated>2012-10-27T20:57:33Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete] ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC&amp;amp;nbsp;[please submit as soon as the analysis is complete] ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5627</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5627"/>
		<updated>2012-10-27T20:57:19Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* Primary analyses (without BMI) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI) [please submit as soon as the analysis is complete] ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5626</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5626"/>
		<updated>2012-10-27T03:36:02Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5625</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5625"/>
		<updated>2012-10-27T03:35:47Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== A. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== B. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== C. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== D. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== E. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5624</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5624"/>
		<updated>2012-10-27T03:35:31Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 D. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 E. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== 4. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 5. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5623</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5623"/>
		<updated>2012-10-27T03:35:16Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test C. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 4. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 5. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== 4. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 5. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5622</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5622"/>
		<updated>2012-10-27T03:35:07Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline A. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression B. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 4. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 5. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== 4. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 5. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5621</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5621"/>
		<updated>2012-10-27T03:34:05Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 4. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 5. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== 4. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 5. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5620</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5620"/>
		<updated>2012-10-27T03:32:18Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 4. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#5._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression_.28with_BMI.29 5. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI)]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200.&lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== 4. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 5. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI) ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5619</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5619"/>
		<updated>2012-10-27T03:31:55Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#4._Typical_DIAGRAM_analysis_using_existing_association_pipeline_.28with_BMI.29 4. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI)]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
5. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200.&lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== 4. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 5. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI) ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5618</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5618"/>
		<updated>2012-10-27T03:30:35Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: /* 4. &amp;amp;nbsp;Run EPACTS association pipeline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses (without BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Secondary analyses (with BMI)  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039;&amp;amp;nbsp;secondary analyses&#039;&#039;&#039;&amp;amp;nbsp;adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
4. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline (with BMI) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
5. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please send the 2 Primary analyses and the QC analysis when complete.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
As preparation for the Firth test analysis, we encourage you to analyze the data using the Wald test first, since it is computationally faster. &amp;amp;nbsp;This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS and resolve any problems you may have with your imputation or input files. &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)! &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10). &lt;br /&gt;
&lt;br /&gt;
=== 4. Typical DIAGRAM analysis using existing association pipeline (with BMI)&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software including BMI adjustment. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software:  ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 5. Analysis of low frequency variants using Firth bias-corrected logistic regression (with BMI) ===&lt;br /&gt;
&lt;br /&gt;
Again use the Firth test on EPACTS for your analysis with BMI&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5617</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5617"/>
		<updated>2012-10-26T19:48:32Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software: ====&lt;br /&gt;
&lt;br /&gt;
This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS.&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10).&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5616</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5616"/>
		<updated>2012-10-26T19:48:15Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#2._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software: ====&lt;br /&gt;
&lt;br /&gt;
This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS.&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10).&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two.epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5615</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5615"/>
		<updated>2012-10-26T19:47:36Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#1._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#C._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software: ====&lt;br /&gt;
&lt;br /&gt;
This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS.&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10).&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two.epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5614</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5614"/>
		<updated>2012-10-26T19:47:07Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#A._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#C._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software: ====&lt;br /&gt;
&lt;br /&gt;
This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS.&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10).&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two.epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5613</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5613"/>
		<updated>2012-10-26T19:45:51Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#A._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#C._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software: ====&lt;br /&gt;
&lt;br /&gt;
This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS.&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10).&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the two.epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5612</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5612"/>
		<updated>2012-10-26T19:45:07Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;2&#039;&#039;&#039; separate association analyses to be completed &#039;&#039;&#039;without adjusting for BMI&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#A._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#C._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software: ====&lt;br /&gt;
&lt;br /&gt;
This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS.&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10).&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the three .epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Firth test (with BMI):&#039;&#039;&#039; &amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5611</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5611"/>
		<updated>2012-10-26T19:44:03Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;4&#039;&#039;&#039; separate association analyses to be completed. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#A._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
(with or without BMI) &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
B. DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#C._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
(with or without BMI) &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
B. DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test with the EPACTS software: ====&lt;br /&gt;
&lt;br /&gt;
This will be a good way to check if your VCF and PED files are correctly formatted for EPACTS.&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.wald -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026 /epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10).&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the three .epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Firth test (with BMI):&#039;&#039;&#039; &amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5610</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5610"/>
		<updated>2012-10-26T19:41:19Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;4&#039;&#039;&#039; separate association analyses to be completed. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#A._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
(with or without BMI) &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
B. DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#C._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
(with or without BMI) &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
B. DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
==== Alternative: &amp;amp;nbsp;Analyze VCF and PED files using the Wald test ====&lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10).&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the three .epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Firth test (with BMI):&#039;&#039;&#039; &amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5609</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5609"/>
		<updated>2012-10-26T19:39:52Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts.v2.2.0.20121026/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Primary analyses  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;4&#039;&#039;&#039; separate association analyses to be completed. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#A._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
(with or without BMI) &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
B. DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#C._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
(with or without BMI) &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
B. DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10).&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the three .epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Firth test (with BMI):&#039;&#039;&#039; &amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5608</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5608"/>
		<updated>2012-10-26T19:39:23Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts.v2.2.0.20121026/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts.v2.2.0.20121026/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here].&lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Primary analyses  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;4&#039;&#039;&#039; separate association analyses to be completed. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#A._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
(with or without BMI) &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
B. DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#C._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
(with or without BMI) &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
B. DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10).&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the three .epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Firth test (with BMI):&#039;&#039;&#039; &amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5607</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5607"/>
		<updated>2012-10-26T19:38:13Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts.v2.2.0.20121026.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts.v2.2.0.20121026/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
 epacts.v2.2.0.20121026/example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts2.1/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts2.1/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here]. &lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Primary analyses  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;4&#039;&#039;&#039; separate association analyses to be completed. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#A._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
(with or without BMI) &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
B. DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#C._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
(with or without BMI) &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
B. DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10).&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the three .epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Firth test (with BMI):&#039;&#039;&#039; &amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5606</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5606"/>
		<updated>2012-10-26T19:36:49Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts.v2.2.0.20121026.tar.gz (94MB)&amp;amp;nbsp;&amp;amp;nbsp;http://www.sph.umich.edu/csg/kang/epacts/download/epacts_v2.12.noref_binary.2012_10_01.tar.gz (101MB) &lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts_v2.12.noref_binary.2012_10_01.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts2.1/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
  example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts2.1/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts2.1/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here]. &lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Primary analyses  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;4&#039;&#039;&#039; separate association analyses to be completed. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#A._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
(with or without BMI) &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
B. DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#C._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
(with or without BMI) &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
B. DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10).&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the three .epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Firth test (with BMI):&#039;&#039;&#039; &amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5549</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5549"/>
		<updated>2012-10-19T19:14:48Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts_v2.12.noref_binary.2012_10_01.tar.gz (101MB) &lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts_v2.12.noref_binary.2012_10_01.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts2.1/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
  example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts2.1/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts2.1/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here]. &lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / dosage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from [http://www.sph.umich.edu/csg/cfuchsb/dose2vcf_v0.4.tgz here]. If you used rs numbers during imputation, you can find mapping tables ready for dose2vcf [http://www.sph.umich.edu/csg/cfuchsb/mapping_rs_ALL.GIANT.phase1_release_v3.20101123.tgz here (214 Mb) ] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]: &lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file&lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Primary analyses  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;4&#039;&#039;&#039; separate association analyses to be completed. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#A._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
(with or without BMI) &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
B. DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#C._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
(with or without BMI) &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
B. DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10).&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the three .epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Firth test (with BMI):&#039;&#039;&#039; &amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5540</id>
		<title>EPACTS for DIAGRAM</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=EPACTS_for_DIAGRAM&amp;diff=5540"/>
		<updated>2012-10-19T15:05:16Z</updated>

		<summary type="html">&lt;p&gt;Clement Ma: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Motivation and Rationale  =&lt;br /&gt;
&lt;br /&gt;
[[EPACTS|EPACTS]]&amp;amp;nbsp;is a software pipeline developed to perform various statistical tests for analysis of whole-genome / whole-exome sequencing data. &amp;amp;nbsp;The main motivation for using EPACTS is to use a consistent analysis framework for association analysis in the DIAGRAM consortium. &amp;amp;nbsp;In addition, for analysis of low frequency variants (minor allele frequency [MAF] &amp;amp;lt; 5%), standard logistic regression Wald or likelihood ratio tests found in existing association software are conservative or anti-conservative respectively. &amp;amp;nbsp;We implemented two statistical tests we will use for for analysis of low frequency variants:&amp;amp;nbsp;(1) logistic regresion-based score test and (2) Firth bias-corrected logistic regression [http://www.stat.duke.edu/~scs/Courses/Stat376/Papers/GibbsFieldEst/BiasReductionMLE.pdf (Firth, 1993)]. &amp;amp;nbsp;For analysis of common variants, any asyptotic logistic regression test has well-controlled type I error rates and asymptotically equivalent power. &amp;amp;nbsp;For simplicity and consistency, we propose the use of both score and Firth tests for testing all allele frequencies. &lt;br /&gt;
&lt;br /&gt;
= Outline of analysis protocol  =&lt;br /&gt;
&lt;br /&gt;
This is an overview of the analysis protocol for analyzing imputed DIAGRAM datasets using the EPACTS pipeline. &amp;amp;nbsp;We assume that your dataset has been imputed using [[Minimac|minimac]] or I[[IMPUTE2|mpute2]]. &amp;amp;nbsp;Starting with minimac or impute2 output: &lt;br /&gt;
&lt;br /&gt;
#Download and install EPACTS &lt;br /&gt;
#Prepare VCF file with genotypes / dosages &lt;br /&gt;
#Prepare PED file with phenotypes and covariates &lt;br /&gt;
#Run EPACTS association pipeline &lt;br /&gt;
#Report association results in appropriate format&lt;br /&gt;
&lt;br /&gt;
== 1. &amp;amp;nbsp;Download and install EPACTS  ==&lt;br /&gt;
&lt;br /&gt;
=== For External Users  ===&lt;br /&gt;
&lt;br /&gt;
For external users, follow the instruction at [[EPACTS]] page, summarized below. &lt;br /&gt;
&lt;br /&gt;
*Download EPACTS binary at http://www.sph.umich.edu/csg/kang/epacts/download/epacts_v2.12.noref_binary.2012_10_01.tar.gz (101MB) &lt;br /&gt;
*Uncompress EPACTS package to the directory you would like to install&lt;br /&gt;
&lt;br /&gt;
  tar xzvf epacts_v2.12.noref_binary.2012_10_01.tar.gz&lt;br /&gt;
&lt;br /&gt;
*Download the reference FASTA files from 1000 Genomes FTP automatically by running the following commands&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd epacts2.1/&lt;br /&gt;
./ref_download.sh&lt;br /&gt;
(For advanced users, to save time for downloading the FASTA files (~900MB), you may copy a local copy of GRCh37 FASTA file and the index file to ${EPACTS_DIR}/ext/ref/)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Perform a test run by running the following command&lt;br /&gt;
&lt;br /&gt;
  example/test_run_epacts.sh&lt;br /&gt;
&lt;br /&gt;
=== For Local Users in CSG  ===&lt;br /&gt;
&lt;br /&gt;
For users in CSG, EPACTS can be found here: &lt;br /&gt;
&amp;lt;pre&amp;gt;/net/fantasia/home/hmkang/sw/epacts2.1/&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Getting started with an example  ===&lt;br /&gt;
&lt;br /&gt;
Once installed, test out the software by running a quick example using the test data provided in the &amp;quot;example&amp;quot; directory. The example VCF and PED files are: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz&lt;br /&gt;
&lt;br /&gt;
$ epacts2.1/example/1000G_dummy_pheno.ped&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Run the single variant score test on the example data using this command: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ epacts2.1/epacts single &lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz &lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped &lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno &lt;br /&gt;
--out {OUTPUT_DIR}/test --run 2 &amp;amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run the single variant test on the input VCF and PED files, with a minimum MAF threshold of 0.001. &amp;amp;nbsp;The phenotype is &amp;quot;DISEASE&amp;quot; and we are adjusting the analysis with covariates AGE and SEX. &amp;amp;nbsp;The output file directory prefix is {OUTPUT_DIR}/test. &amp;amp;nbsp;Finally, EPACTS will run the analysis in parallel on 2 CPUs. &lt;br /&gt;
&lt;br /&gt;
A more detailed description of the example can be found [http://genome.sph.umich.edu/wiki/Test_EPACTS_for_DIAGRAM here]. &lt;br /&gt;
&lt;br /&gt;
== 2. &amp;amp;nbsp;Prepare VCF file with genotypes / dosages  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS requires input genotype / doseage information in VCF format. &amp;amp;nbsp;From minimac or Impute2, you wil start with your imputed dosage file. &lt;br /&gt;
&lt;br /&gt;
=== A. &amp;amp;nbsp;Convert dosage file into VCF format  ===&lt;br /&gt;
&lt;br /&gt;
Use the wrapper program &amp;quot;dose2vcf&amp;quot; to convert your doseage output to VCF format. &amp;amp;nbsp;Download the tool from here. If you used rs numbers during imputation, you can find mapping tables here &lt;br /&gt;
&lt;br /&gt;
To run the wrapper program, use the following command &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose [ .dose file ]  --info [ .info file ] --out [ output file prefix ]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For example, for imputed chromosome 1 data from FUSION: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt; dose2vcf/dose2vcf --dose FUSION.GWAS.1KG.imp.chr1.dose --info FUSION.GWAS.1KG.imp.chr1.info --out out/FUSION.GWAS.1KG.imp.chr1&amp;lt;/pre&amp;gt; &lt;br /&gt;
The expected output file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;out/FUSION.GWAS.1KG.imp.chr1.vcf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that for longer chromosomes, the program is quite memory intensive. &amp;amp;nbsp;In this case, please convert dosages in shorter sections of the chromosome. &amp;amp;nbsp;For example, if the imputation was performed by sections, then convert these sections to vcf first, and then merge the vcf files together using vcftools [http://vcftools.sourceforge.net/docs.html#concat vcf-concat]:&lt;br /&gt;
&lt;br /&gt;
=== B. &amp;amp;nbsp;bgzip and tabix VCF files  ===&lt;br /&gt;
&lt;br /&gt;
Input VCF file must be bgzipped and tabixed before running association to allow efficient random access of the file. Below is an example command to conver plain VCF into bgzipped and tabixed VCF &lt;br /&gt;
&amp;lt;pre&amp;gt;bgzip input.vcf ## this command will produce input.vcf.gz&lt;br /&gt;
tabix -pvcf -f input.vcf.gz ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the VCF file is separated by chromosome, the VCF file must contain the string &amp;quot;chr1&amp;quot; in the chromosome 1 file, and corresponding chromosome name for other chromosomes.&amp;lt;br&amp;gt;Sample IDs in the VCF file must be consistent to those from PED file &lt;br /&gt;
&lt;br /&gt;
== 3. &amp;amp;nbsp;Prepare PED file for phenotypes and covariates  ==&lt;br /&gt;
&lt;br /&gt;
EPACTS accepts the PED format supported by MERLIN or [http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml PLINK ]to represent the phenotypes and covariates. &amp;amp;nbsp;You may prepare either (1) a PED file without column headers + accompanying DAT file, or (2) a PED file with column headers. &amp;amp;nbsp;The standard PED format has 6 mandatory columns: &lt;br /&gt;
&lt;br /&gt;
#Family ID &lt;br /&gt;
#Individual ID &lt;br /&gt;
#Paternal ID &lt;br /&gt;
#Maternal ID &lt;br /&gt;
#Sex (1=male; 2=female; other=unknown) &lt;br /&gt;
#Phenotype (1 = control; 2 = case)&lt;br /&gt;
&lt;br /&gt;
Columns 7 and onwards are additonal covariates and or phenotypes. &amp;amp;nbsp;For example &lt;br /&gt;
&lt;br /&gt;
#QT &lt;br /&gt;
#AGE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
etc. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;amp;nbsp;Categorical covariates must be coded as dummy variables! &amp;amp;nbsp;For example, Sex cannot be coded as &amp;quot;M&amp;quot; or &amp;quot;F&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example PED file with a header is as follows. &amp;amp;nbsp;Note that the header must start with a &amp;quot;#&amp;quot; symbol. &lt;br /&gt;
&amp;lt;pre&amp;gt;#FAM_ID IND_ID FAT_ID MOT_ID SEX DISEASE QT AGE&lt;br /&gt;
13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Alternatively, you can prepare a PED file without a header, and include a corresponding DAT file describing the column headers. &lt;br /&gt;
&amp;lt;pre&amp;gt;13281 NA12344 NA12347 NA12348 1 1 94.17 66.1&lt;br /&gt;
13281 NA12347 0 0 1 1 109.54 44.0&lt;br /&gt;
13281 NA12348 0 0 2 2 119.40 46.6&lt;br /&gt;
1328 NA06984 0 0 1 2 87.72 39.3&lt;br /&gt;
1328 NA06989 0 0 2 1 100.60 41.7&lt;br /&gt;
1328 NA12329 NA06984 NA06989 2 1 100.85 46.4&lt;br /&gt;
13291 NA06986 0 0 1 2 91.94 61.9&lt;br /&gt;
13291 NA06995 NA07435 NA07037 1 2 104.36 57.4&lt;br /&gt;
13291 NA06997 NA06986 NA07045 2 2 107.53 53.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The corresponding DAT file is: &lt;br /&gt;
&amp;lt;pre&amp;gt;A DISEASE&lt;br /&gt;
T QT&lt;br /&gt;
C AGE&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key: &amp;amp;nbsp;A =&amp;amp;nbsp;binary trait; T = quantitative trait; C = covariate&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. &amp;amp;nbsp;Run EPACTS association pipeline  ==&lt;br /&gt;
&lt;br /&gt;
For detailed description of options, use: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -man&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Primary analyses  ===&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;&#039;4&#039;&#039;&#039; separate association analyses to be completed. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Association Analysis &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Statistical Test &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Subset of SNPs &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output File Type &lt;br /&gt;
&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | &lt;br /&gt;
Output Filename Format &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#A._Typical_DIAGRAM_analysis_using_existing_association_pipeline 1. &amp;amp;nbsp;Typical DIAGRAM analysis using existing association pipeline] &lt;br /&gt;
&lt;br /&gt;
(with or without BMI) &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Wald or likelihood ratio &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
All SNPs with &lt;br /&gt;
&lt;br /&gt;
MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Custom file &lt;br /&gt;
&lt;br /&gt;
based on DIAGRAM format &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
B. DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_TTT_YYY_ZZZ.txt &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
[http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#C._Analysis_of_low_frequency_variants_using_Firth_bias-corrected_logistic_regression 2. &amp;amp;nbsp;Analysis of low frequency variants using Firth bias-corrected logistic regression] &lt;br /&gt;
&lt;br /&gt;
(with or without BMI) &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
Firth bias-corrected &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
SNPs with &lt;br /&gt;
&lt;br /&gt;
200 &amp;amp;gt;= MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
EPACTS output file &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
B. DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Analysis for QC  ===&lt;br /&gt;
&lt;br /&gt;
For quality control, please run an additional analysis using EPACTS on all SNPs for chromosome 20 only using the &#039;&#039;&#039;SCORE&#039;&#039;&#039; test without BMI adjustment. &amp;amp;nbsp;These results will be used to compare with results from the primary analyses, to ensure the new EPACTS software has been run correctly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;1650&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Association Analysis&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Statistical Test&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Subset of SNPs&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output File Type&#039;&#039;&#039; &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | &#039;&#039;&#039;Output Filename Format&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [http://genome.sph.umich.edu/wiki/EPACTS_for_DIAGRAM#3._Analysis_of_chromosome_20_using_logistic_regression_score_test 3. &amp;amp;nbsp;Analysis of chromosome 20 using logistic regression score test]&amp;amp;nbsp;(without BMI) &lt;br /&gt;
| Score test &lt;br /&gt;
| &lt;br /&gt;
Chromosome 20 SNPs &lt;br /&gt;
&lt;br /&gt;
with MAC &amp;amp;gt;= 1 &lt;br /&gt;
&lt;br /&gt;
| EPACTS output file &lt;br /&gt;
| A. DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Filename key:  ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iSNPs&#039;&#039;&#039; indicates the file contains imputed SNPs only&amp;lt;br&amp;gt;&#039;&#039;&#039;XXX &#039;&#039;&#039;indicates a uniquely identifiable STUDY NAME: (e.g.WTCCC, DGI, DGDG, FUSION, ERGO, DUNDEE, NHS,FHS, TYROL, EUROSPAN etc.)&amp;lt;br&amp;gt;&#039;&#039;&#039;“_adjBMI”&#039;&#039;&#039; – should be present for the model with BMI adjustment&amp;lt;br&amp;gt;&#039;&#039;&#039;KKK &#039;&#039;&#039;indicates date of the 1000Genomes map, Month and year (defined as MMMYY) of the 1000Genomes&amp;amp;nbsp;map that was used e.g. MAR12&amp;lt;br&amp;gt;&#039;&#039;&#039;TTT &#039;&#039;&#039;indicates the test used to evaluate significance &lt;br /&gt;
&lt;br /&gt;
*SCR = Score &lt;br /&gt;
*WLD = Wald &lt;br /&gt;
*LHR = Likelihood ratio &lt;br /&gt;
*FBC = Firth Bias Corrected Logistic Regression&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;YYY &#039;&#039;&#039;indicates the DATE of file generation (MMDDYY format, e.g. 021710 – apologies in advance to our&amp;amp;nbsp;European colleagues)&amp;lt;br&amp;gt;&#039;&#039;&#039;ZZZ &#039;&#039;&#039;indicates the name + other initials of the uploader (e.g., BFV, LJS, ABC, etc.) &lt;br /&gt;
&lt;br /&gt;
==== Comparative runtimes for Firth and score tests.  ====&lt;br /&gt;
&lt;br /&gt;
Firth test is relatively computationally intensive compared to the score test. &amp;amp;nbsp;However, Firth has better test properties (i.e. type I error rates and power) compare to score test when analyzing low frequency variants in studies with unequal numbers of cases and controls. &lt;br /&gt;
&lt;br /&gt;
For example, using a single CPU, analyzing 2333 FUSION individuals, chromosome 20, 22755 SNPs (adjusting for age, sex and 11 dummy variables for birth province): &lt;br /&gt;
&lt;br /&gt;
*Firth test: &amp;amp;nbsp;56 minutes (3360 seconds) &lt;br /&gt;
*Score test: &amp;amp;nbsp;32 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Hence, we only ask for Firth test results for SNPs with MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
=== 1. Typical DIAGRAM analysis using existing association pipeline&amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
This is the typical DIAGRAM analysis using your current association pipeline and software. &amp;amp;nbsp; [[Image:1000Genomes march2012 imputation analysis plan 08312012.pdf]] &lt;br /&gt;
&lt;br /&gt;
=== 2. Analysis of low frequency variants using Firth bias-corrected logistic regression  ===&lt;br /&gt;
&lt;br /&gt;
The Firth bias-corrected test has well-controlled type I error rate and good power for analysis of balanced and unbalanced studies. &amp;amp;nbsp;However, it is more computationally intensive. &amp;amp;nbsp;We only run Firth on&amp;amp;nbsp;the subset of variants with 1&amp;amp;lt;= MAC &amp;amp;lt;= 200. &lt;br /&gt;
&lt;br /&gt;
To run the Firth test using the EPACTS software: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.firth -pheno DISEASE -cov AGE -sepchr -anno -min-mac 1 -max-mac 200  -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Important:&#039;&#039;&#039; &amp;amp;nbsp;To analyze dosages (not genotypes), you must specify the dosage field with the &amp;quot;--field EC&amp;quot; option. &amp;amp;nbsp;Without this option, you will be analyzing the hard genotypes (i.e. --field option defaults to &amp;quot;GT&amp;quot; or &amp;quot;genotypes&amp;quot;)!&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 3. Analysis of chromosome 20 using logistic regression score test  ===&lt;br /&gt;
&lt;br /&gt;
The score test has well-controlled type I error rate and good power for meta-analysis of balanced (equal numbers of cases and controls) studies.&amp;amp;nbsp; It is also very computationally efficient.&amp;amp;nbsp; Please run the score test using the EPACTS software. &lt;br /&gt;
&lt;br /&gt;
The EPACTS command for the score test analysis of chromosome 20 is: &lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single -vcf [INPUT VCF FILENAME] -ped [INPUT PED FILENAME] -out [OUTPUT FILENAME PREFIX] \&lt;br /&gt;
-test b.score -pheno DISEASE -cov AGE -chr 20 -anno -min-mac 1 -field EC -run 10&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This command will run single variant analysis using the score test logistic regression on the DISEASE phenotype adjusting for AGE. Add the relevant additional covariates with additional &amp;quot;-cov&amp;quot; options. This assumes that the VCF files are separated by chromosomes (option -sepchr). All variants with at least one minor allele count will be analyzed (option -min-mac 1). It will annotate results by functional category (option -anno) and run the analysis on 10 parallel CPUs (option -run 10).&lt;br /&gt;
&lt;br /&gt;
== 5. &amp;amp;nbsp;Report EPACTS results&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
For analyses 2 and 3, please upload the three .epacts.gz files to the FTP server: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Firth test (no BMI): &#039;&#039;&#039;&amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Firth test (with BMI):&#039;&#039;&#039; &amp;amp;nbsp;DIAGRAMv4_iSNPs_XXX_adjBMI_1000G_KKK_FBC_YYY_ZZZ.epacts.gz &lt;br /&gt;
#&#039;&#039;&#039;Score test (chr 20, no BMI): &amp;amp;nbsp;&#039;&#039;&#039;DIAGRAMv4_iSNPs_XXX_1000G_KKK_SCR_YYY_ZZZ.epacts.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example score test .epacts file &lt;br /&gt;
&amp;lt;pre&amp;gt;$ head test.epacts&lt;br /&gt;
#CHROM  BEGIN   END     MARKER_ID       NS      AC      CALLRATE        MAF     PVALUE  SCORE   N.CASE  N.CTRL  AF.CASE AF.CTRL&lt;br /&gt;
20      68303   68303   20:68303_A/G_Upstream:DEFB125   266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68319   68319   20:68319_C/A_Upstream:DEFB125   266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      68396   68396   20:68396_C/T_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76635   76635   20:76635_A/T_Intron:DEFB125     266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76689   76689   20:76689_T/C_Synonymous:DEFB125 266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76690   76690   20:76690_T/C_Nonsynonymous:DEFB125      266     1       1       0.0018797       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76700   76700   20:76700_G/A_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76726   76726   20:76726_C/G_Nonsynonymous:DEFB125      266     0       1       0       NA      NA      NA      NA      NA      NA&lt;br /&gt;
20      76771   76771   20:76771_C/T_Nonsynonymous:DEFB125      266     3       1       0.0056391       0.68484 0.40587 145     121     0.013793        0.0082645&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Each column represents &lt;br /&gt;
&lt;br /&gt;
*CHROM&amp;amp;nbsp;: Chromosome Name &lt;br /&gt;
*BEGIN, END&amp;amp;nbsp;: Base position of the variant on each side &lt;br /&gt;
*MARKER_ID&amp;amp;nbsp;: [CHROM]:[POS]_[REF]/[ALT]_[ANNOTATION] formatted marker ID. [ANNOTATION] information will be available only with --anno option &lt;br /&gt;
*NS&amp;amp;nbsp;: Number of samples with non-missing genotypes &lt;br /&gt;
*AC&amp;amp;nbsp;: Non-reference allele count &lt;br /&gt;
*CALLRATE&amp;amp;nbsp;: Genotype call rate &lt;br /&gt;
*MAF&amp;amp;nbsp;: Minor allele frequency &lt;br /&gt;
*PVALUE&amp;amp;nbsp;: P-value&lt;br /&gt;
&lt;br /&gt;
The rest of columns varies by statistical tests. For example, in b.score test, SCORE represents score test statistics, N.CASE and N.CTRL represents the case/control counts, and AF.CASE and AF.CTRL represents the case/control allele frequencies. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting Common Issues  =&lt;br /&gt;
&lt;br /&gt;
== EPACTS installation errors ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors when running EPACTS ==&lt;br /&gt;
&lt;br /&gt;
=== Rscript execution error: No such file or directory  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;epacts2.1/epacts single \&lt;br /&gt;
&lt;br /&gt;
--vcf epacts2.1/example/1000G_exome_chr20_example_softFiltered.calls.vcf.gz \&lt;br /&gt;
--ped epacts2.1/example/1000G_dummy_pheno.ped \&lt;br /&gt;
--min-maf 0.001 --chr 20 --pheno DISEASE --cov AGE --cov SEX --test b.score --anno \&lt;br /&gt;
--out out/test --run 1 &amp;amp;amp;&lt;br /&gt;
[4] 13569&lt;br /&gt;
&lt;br /&gt;
$ Detected phenotypes with 2 unique values - 1 and 2 - considering them as binary phenotypes... re-encoding them into 1 and 2&lt;br /&gt;
Successfully written phenotypes and 2 covariates across 266 individuals&lt;br /&gt;
Processing chromosome 20...&lt;br /&gt;
Finished generating EPACTS Makefile&lt;br /&gt;
Running 1 parallel jobs of EPACTS&lt;br /&gt;
epacts2.1/bin/..//bin/make -f out/test.Makefile -j 1&lt;br /&gt;
&lt;br /&gt;
Rscript execution error: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The issue seems to be the absence with Rscript, which is usually installed with R. &lt;br /&gt;
&lt;br /&gt;
If you can find Rscript (e.g. /usr/bin/Rscript, /usr/local/bin/Rscript), or if you can re-install the full Rscript, you can simply avoid the problem by setting your environment variable. &lt;br /&gt;
&lt;br /&gt;
Otherwise, Hyun will modify EPACTS to not requiring this (so you can run R CMD BATCH instead of Rscript).&lt;br /&gt;
&lt;br /&gt;
=== ERROR: No overlapping IDs between VCF and PED file. Cannot proceed.  ===&lt;br /&gt;
&lt;br /&gt;
Check that your individual ID&#039;s in your PED&amp;amp;nbsp;file are the same as those in your VCF file. &lt;br /&gt;
&lt;br /&gt;
For example, if your VCF individual ID&#039;s include the family ID&#039;s (i.e.&amp;amp;nbsp;ABCD-&amp;amp;gt;ABCD001), the individual ID&#039;s in the PED file must match it exactly. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Estimated allele frequencies and analysis results do not exactly match results from my existing association software  ===&lt;br /&gt;
&lt;br /&gt;
Check that you have included the same set of covariates (with categorical variables encoded as dummy variables). &lt;br /&gt;
&lt;br /&gt;
Check that you have the same number of cases and controls analyzed. &lt;br /&gt;
&lt;br /&gt;
FInally, check that you used dosages by adding the appropriate &amp;quot;-field&amp;quot; option. &amp;amp;nbsp;For example, suppose your VCF is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A001 B001 C001&lt;br /&gt;
11 180567 11:180567 C G 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 186458 11:186458 G A 0 PASS . GT:EC 1/1:1.9850 1/1:1.9750 1/1:1.9840&lt;br /&gt;
11 186462 11:186462 C A 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192958 11:192958 G T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 192995 11:192995 C T 0 PASS . GT:EC 1/1:2.0000 1/1:2.0000 1/1:2.0000&lt;br /&gt;
11 193065 11:193065 G A 0 PASS . GT:EC 1/1:1.9980 1/1:1.9990 1/1:1.9960&lt;br /&gt;
11 193096 11:193096 C T 0 PASS . GT:EC 0/1:0.7840 0/1:0.6280 1/1:1.6550&lt;br /&gt;
11 193146 11:193146 G A 0 PASS . GT:EC 1/1:1.8550 1/1:1.8460 1/1:1.7940&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The genotype information has FORMAT &amp;quot;GT:EC&amp;quot;. &amp;amp;nbsp;For the first SNP (chr11:180567) and individual A001, the genotype is 1/1 and dosage is 2.0000. &amp;amp;nbsp;To access the dosages, you must specify the option &amp;quot;-field EC&amp;quot;&lt;/div&gt;</summary>
		<author><name>Clement Ma</name></author>
	</entry>
</feed>