<?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=Cristen</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=Cristen"/>
	<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/wiki/Special:Contributions/Cristen"/>
	<updated>2026-09-25T05:05:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=GREGOR&amp;diff=11634</id>
		<title>GREGOR</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=GREGOR&amp;diff=11634"/>
		<updated>2014-09-24T13:54:44Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Configuration File */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==GREGOR==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GREGOR&#039;&#039;&#039; (&#039;&#039;&#039;G&#039;&#039;&#039;enomic &#039;&#039;&#039;R&#039;&#039;&#039;egulatory &#039;&#039;&#039;E&#039;&#039;&#039;lements and &#039;&#039;&#039;G&#039;&#039;&#039;was &#039;&#039;&#039;O&#039;&#039;&#039;verlap algo&#039;&#039;&#039;R&#039;&#039;&#039;ithm) is a tool built to evaluate global enrichment of trait-associated variants in experimentally annotated epigenomic regulatory features. &lt;br /&gt;
&lt;br /&gt;
Because all reference data are version hg19, please make sure that your index SNP list and BED files are also version hg19.&lt;br /&gt;
&lt;br /&gt;
== Get GREGOR Source Codes ==&lt;br /&gt;
&lt;br /&gt;
=== Download from webpage === &lt;br /&gt;
Through this link [http://www.sph.umich.edu/csg/jich/FallInBed/  GREGOR Download], you can download a copy of GREGOR.&lt;br /&gt;
&lt;br /&gt;
=== Download from GitHub with Git ===&lt;br /&gt;
You can create your own git clone(copy) using:&lt;br /&gt;
&lt;br /&gt;
  git clone https://github.com/jinchen-umich/GREGOR.git&lt;br /&gt;
or&lt;br /&gt;
  git clone git://github.com/jinchen-umich/GREGOR.git&lt;br /&gt;
&lt;br /&gt;
Either of these two commands creates a directory called GREGOR in the current directory.&lt;br /&gt;
&lt;br /&gt;
=== Update your copy ===&lt;br /&gt;
If you have already downloaded your copy, use the following commands to update:&lt;br /&gt;
  1. cd pathToYourCopy/GREGOR&lt;br /&gt;
  2. git pull&lt;br /&gt;
&lt;br /&gt;
=== Download From GitHub without Git ===&lt;br /&gt;
If there is no git in your system, you can still download from GitHub:&lt;br /&gt;
# Latest Code (master branch)&lt;br /&gt;
#: via Website&lt;br /&gt;
#:# Go to : https://github.com/jinchen-umich/GREGOR&lt;br /&gt;
#:# Click on the &amp;lt;code&amp;gt;Download ZIP&amp;lt;/code&amp;gt; button on the right side panel.&lt;br /&gt;
#: via Command Line&lt;br /&gt;
#:: &amp;lt;code&amp;gt;wget https://github.com/jinchen-umich/GREGOR/archive/master.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After downloading the file, uncompress (unzip/untar) it.  The directory created will be named &amp;lt;code&amp;gt;GREGOR&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Build GREGOR ==&lt;br /&gt;
&lt;br /&gt;
To build GREGOR, copy the GREGOR package to the directory you want, and then run the following command:&lt;br /&gt;
&lt;br /&gt;
  tar xzvf GREGOR.tar.gz&lt;br /&gt;
&lt;br /&gt;
After you unzip, you can find 3 directories in &amp;quot;GREGOR&amp;quot; (./example  ./lib  ./script).&lt;br /&gt;
&lt;br /&gt;
== Download reference files ==&lt;br /&gt;
&lt;br /&gt;
Download the reference files from this link [http://www.sph.umich.edu/csg/jich/FallInBed/  GREGOR Download], then un-package the file&lt;br /&gt;
&lt;br /&gt;
  tar xzvf GREGOR.ref.tar.gz&lt;br /&gt;
&lt;br /&gt;
After unzip, you will get 47 reference files in the directory &amp;quot;~/ref&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Basic Usage Example ==&lt;br /&gt;
&lt;br /&gt;
When you run &lt;br /&gt;
&lt;br /&gt;
  perl GREGOR.pl&lt;br /&gt;
&lt;br /&gt;
you will get some information about GREGOR&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------&lt;br /&gt;
GREGOR.pl : Functional annotation of trait-associated variants&lt;br /&gt;
----------------------------------------------------------------------------------&lt;br /&gt;
This program tests for enrichment of an input list of trait-associated index&lt;br /&gt;
SNPs ([chr:pos] format or rsID, hg19) in experimentally annotated regulatory&lt;br /&gt;
domains (BED files).&lt;br /&gt;
&lt;br /&gt;
Note: the index SNPs should be hg19 version. All maf and LD data are from 1000G&lt;br /&gt;
EUR samples! (Release date : May 21, 2011)&lt;br /&gt;
&lt;br /&gt;
Version : 1.1.0&lt;br /&gt;
&lt;br /&gt;
Report Bug(s) : jich[at]umich[dot]edu&lt;br /&gt;
----------------------------------------------------------------------------------&lt;br /&gt;
Usage : perl GREGOR.pl --conf [conf.file]&lt;br /&gt;
----------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following command is a typical command line:&lt;br /&gt;
&lt;br /&gt;
  perl GREGOR.pl --conf [conf.file]&lt;br /&gt;
&lt;br /&gt;
Example configuration file can be found in example directory. Users have to modify the configurations before running.&lt;br /&gt;
&lt;br /&gt;
== Configuration File  ==&lt;br /&gt;
The example configuration file below illustrate how to configure the GREGOR configuration file.&lt;br /&gt;
&lt;br /&gt;
  ###############################################################################&lt;br /&gt;
  # CHIPSEQ ENRICHMENT CONFIGURATION FILE&lt;br /&gt;
  # This configuration file contains run-time configuration of&lt;br /&gt;
  # CHIP_SEQ ENRICHMENT&lt;br /&gt;
  ###############################################################################&lt;br /&gt;
  ## KEY ELEMENTS TO CONFIGURE : NEED TO MODIFY&lt;br /&gt;
  ###############################################################################&lt;br /&gt;
  INDEX_SNP_FILE = /workingdirectory/example/example.index.snps.rsid.list.txt    ## e.g. /workingdirectory/example/example.index.snps.rsid.list.txt&lt;br /&gt;
  BED_FILE_INDEX = /workingdirectory/example/example.bed.file.index ## e.g. /workingdirectory/example/example.bed.file.index&lt;br /&gt;
  REF_DIR = /workingdirectory/ref/ ## reference directory&lt;br /&gt;
  R2THRESHOLD = 0.7&lt;br /&gt;
  LDWINDOWSIZE = 1000000&lt;br /&gt;
  OUT_DIR = /workingdirectory/example/example.rsid.20130808/ ## e.g. /workingdirectory/example/example.rsid.20130808/&lt;br /&gt;
  MIN_NEIGHBOR_NUM = 500&lt;br /&gt;
  BEDFILE_IS_SORTED = True&lt;br /&gt;
  MOSRUN = mosbatch -E/tmp -i -m2000 -j20,43,122,135,137,138,149,151,153,154,155,156,162,163 sh -c&lt;br /&gt;
&lt;br /&gt;
In the config file, there are several parameters to adjust:&lt;br /&gt;
&lt;br /&gt;
INDEX_SNP_FILE: This file contains a single column of trait-associated input SNPs, without a header. Variants can be listed in rsid or hg19 chr:pos format.&lt;br /&gt;
&lt;br /&gt;
BED_FILE_INDEX: This file lists the datasets (e.g. BED files) to be used for enrichment analysis. Use complete paths to file locations and make sure positions are in hg19 format.&lt;br /&gt;
&lt;br /&gt;
REF_DIR: Define reference file directory which you download at here.&lt;br /&gt;
&lt;br /&gt;
R2THRESHOLD and LDWINDOWSIZE: These two parameters define the index SNP (and control SNP) LD proxies by r2 threshold and LD window size.&lt;br /&gt;
&lt;br /&gt;
OUT_DIR: All result files are saved to this folder, where the script will create multiple sub-directories. Index SNPs are in the folder &amp;quot;index_SNP&amp;quot;; Random SNPs are in the folder &amp;quot;random_SNP&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
MIN_NEIGHBOR_NUM: Define the minimum number of control SNPs for each index SNP. Script will find no less than this number around every index SNP.  If you make this number of control SNPs very large, the control SNPs will be less closely matched on the three matching properties (distance to nearest gene, frequency and number of SNPs in LD).&lt;br /&gt;
&lt;br /&gt;
BEDFILE_IS_SORTED: True or false, depending on whether the BED files listed in the index file are sorted.&lt;br /&gt;
&lt;br /&gt;
== Results Output ==&lt;br /&gt;
The file StatisticSummaryFile.txt in the output directory contains enrichment results with the following information:&lt;br /&gt;
&lt;br /&gt;
Bed_File: The individual datasets used in the enrichment analysis&lt;br /&gt;
&lt;br /&gt;
InBed_Index_SNP: Number of index SNPs or their LD proxies that overlaps regulatory regions in each dataset&lt;br /&gt;
&lt;br /&gt;
Pvalue: P-value calculated assuming a sum of binomial distributions to represent the number of index SNPs (or LD proxies) that overlap a dataset compared to the expectation observed in the matched control sets&lt;br /&gt;
&lt;br /&gt;
*Note:  SNPs that cannot be converted from rsID to chr:pos format are listed in the output file rsid.index.snp.txt.  SNPs for which there are no LD proxies or no MAF data available are listed in the output file nonannoted.index.snp.txt.&lt;br /&gt;
&lt;br /&gt;
== Testing GREGOR ==&lt;br /&gt;
There is an example directory in ~/GREGOR. You can find index SNP file, 3 bed files, bed file index and example config file.&lt;br /&gt;
After change your config file, you can run a test.&lt;br /&gt;
&lt;br /&gt;
  perl ~/GREGOR/script/GREGOR.pl --conf ~/GREGOR/example/example.conf&lt;br /&gt;
&lt;br /&gt;
After running 2 minutes +/- 1 minutes. You will get result file &amp;quot;StatisticSummaryFile.txt&amp;quot; in your defined output directory.&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements  ==&lt;br /&gt;
GREGOR is the result of collaborative efforts by Cristen Willer, Jin Chen, Wei Zhou, Ellen Schmidt, He Zhang, and Goncalo Abecasis. Please email Cristen Willer [cristen@umich.edu] with any questions.&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=7174</id>
		<title>LocusZoom</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=7174"/>
		<updated>2013-04-23T15:34:10Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Uploading Your Association Study Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:LocusZoomSmall.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LocusZoom&#039;&#039;&#039; is designed to facilitate viewing of local association results together with useful information about a locus, such as the location and orientation of the genes it includes, linkage disequilibrium coefficients and local estimates of recombination rates. It was developed by popular demand, as a result of many questions we have had about &amp;quot;How did you make the figures in your talk?&amp;quot; or &amp;quot;How did you make the figures for your GWAS paper?&amp;quot; (And for better or for worse, we have quite a few GWAS papers!!).&lt;br /&gt;
&lt;br /&gt;
LocusZoom can be used in four ways:&lt;br /&gt;
&lt;br /&gt;
; 1. Plot Summaries of Your Genomewide Scan Interactively&lt;br /&gt;
: You can upload summary results of your own genomewide scan or genomewide meta-analysis and request plots of regions of interest using a web-based form.&lt;br /&gt;
&lt;br /&gt;
; 2. Generate Many Plots in Batch Mode&lt;br /&gt;
: You can upload summary results for your genomewide scan or genomewide meta-analysis and request several plots in one go by uploading a batch file. You will receive results via e-mail. A snail-mail option is not available.&lt;br /&gt;
&lt;br /&gt;
; 3. Plot Summaries of Publicly Available Datasets&lt;br /&gt;
: Currently, this includes the results of [http://www.sph.umich.edu/csg/abecasis/public/lipids2008/ our genome-wide scan] for variants associated with HDL-cholesterol, LDL-cholesterol and triglyceride levels in ~20,000 individuals.&lt;br /&gt;
&lt;br /&gt;
; 4. Download LocusZoom and run on your local unix machine&lt;br /&gt;
: [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone Download LocusZoom] and [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Sources_of_SQLite_database_tables associated databases]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upload your own meta-analysis file and generate single plots using a web-based form  ==&lt;br /&gt;
&lt;br /&gt;
=== Uploading Your Association Study Results ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please note: You CAN plot SNPs without rsid using chr6:20122013 format.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Association results can be uploaded to our web server using the [http://csg.sph.umich.edu/locuszoom/ plot your data webpage]. Result files are limited to 20Mb in size, which allows for a [[gzip|gzipped]] text table including key columns (marker name, p-value and sample size) for up to ~3 million SNPs. In our tests, a typical GWAS results file is ~17 Mb in size after imputation of HapMap SNPs. Once a file is uploaded, LocusZoom will remember the file for the duration of your web session allowing you to generate multiple plots. If you have a slow connection or would like to save time, you can upload results for a region or chromosome of interest only. Your results are entirely confidential and won&#039;t be viewed by us or anyone else (except those with whom you share them!)&lt;br /&gt;
&lt;br /&gt;
To specify the region to be plotted, you will have to specify the name of a key marker in the region (typically, as an rs-number, but can be in chr:pos format), name a gene of interest or provide appropriate genome coordinates. When displaying linkage disequilibrium, plotting will be very fast for small windows when HapMap CEU linkage disequilibrium is requested (because pairwise coefficients have been precomputed) and will be a bit slower for larger windows (because linkage disequilibrium coefficients must be computed on the fly).&lt;br /&gt;
&lt;br /&gt;
If you include a sample size column in the result file, it will be used to control the size of each plotted marker.&lt;br /&gt;
&lt;br /&gt;
=== Custom Annotation ===&lt;br /&gt;
&lt;br /&gt;
You may choose to have SNPs displayed using different plotting symbols to distinguish them from each other.  To implement this, in the section &amp;quot;Custom Annotation&amp;quot; in the box &amp;quot;Column Name&amp;quot;, you need to provide the name of a column in your meta-analysis file.  This column will list a category for each SNP of your own choosing (i.e. &amp;quot;nonsynonymous&amp;quot;, &amp;quot;splice&amp;quot;,&amp;quot;intronic&amp;quot;,etc.) or (&amp;quot;Genotyped&amp;quot;,&amp;quot;Imputed&amp;quot;), however, the category names may not include any spaces.  To select the order of the categories to display in the legend and to match the order of pre-selected R plotting symbols (set as pch = 21, 22, 23, 24, 25, 4, 7, 8, 10, 11, 12, 13, 14, 3), you may provide the category names in the specified order in &amp;quot;Category Order&amp;quot; section of &amp;quot;Custom Annotation&amp;quot;.  Each entry (which may not contain spaces) does not need quotes but each entry should be separated by commas.&lt;br /&gt;
&lt;br /&gt;
Alternatively, we have provided functional annotation of all 1000 Genomes (Aug 2009) and HapMap r22 SNPs according to the following categories; Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). This can be implemented using the section &amp;quot;Show Annotation&amp;quot; and clicking the box beside each annotation category that you would like distinguished.  SNPs that are not in any selected category will still be displayed as having no annotation.&lt;br /&gt;
&lt;br /&gt;
=== Plotting of Pairwise Linkage Disequilibrium ===&lt;br /&gt;
&lt;br /&gt;
In the main plot window, data points are colored according to their level of linkage disequilibrium (LD) of the each SNP with the index SNP. If users specify the region to display using an index SNP and flanking region, LD of all data points will be relative to the user-specified index SNP. If users specify the region to display using genome coordinates or a gene name, LocusZoom will automatically select the most significant SNP in the region as the index SNP. For all other SNPs in the plot, the color of the data point will reflect the pairwise LD with this index SNP. The default LD measure is r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; calculated from the HapMap CEU population (release 22), but users have the option to replace this with D’ and of selecting the HapMap YRI, Hapmap CHB+JPT or 1000 Genomes CEU reference panels. To  display LD from 1000G CEU, please substitute rsid&#039;s for 1000G naming convention (chrxx:xxxx) whenever possible.  Because we have pre-computed LD for all SNPs in HapMap CEU, plots will often generate more quickly if using the default LD information. SNPs with missing LD information are shown in grey.&lt;br /&gt;
&lt;br /&gt;
=== Customizing the Display of Your Results ===&lt;br /&gt;
&lt;br /&gt;
All options listed in the Main Table above are available, as well as the options listed below&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Setting &lt;br /&gt;
! Default Value &lt;br /&gt;
! Details&lt;br /&gt;
|-&lt;br /&gt;
| Column Delimiter &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the type of column delimiter in the results file&lt;br /&gt;
|-&lt;br /&gt;
| Pvalue Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the name of the column that contains the p-values&lt;br /&gt;
|-&lt;br /&gt;
| Marker Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the heading of the column that contains marker names&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| none &lt;br /&gt;
| Plots can be generated based on hg18 (default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| HapMap Population for LD &lt;br /&gt;
| none &lt;br /&gt;
| This option allows the user to specify which HapMap population was used to obtain LD estimates. The default is CEU but users may select YRI or JPT+CHB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Batch Mode  ==&lt;br /&gt;
&lt;br /&gt;
To start batch mode, first upload your results file just as you would in interactive mode. The same file size restrictions apply.&lt;br /&gt;
&lt;br /&gt;
=== Generating a Hit Spec File ===&lt;br /&gt;
&lt;br /&gt;
Batch mode allows you to conveniently specify a set of plots to be generated in &amp;quot;Hit Spec&amp;quot; file. This is handy if you need to generate large numbers of plots or if you want to plot the same set of regions after updating a genomewide analysis (for example).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Hit Spec&amp;quot; file is a whitespace delimited text file. The file has six mandatory columns which can be followed by a series of optional &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs to allow for detailed customization of each plot. The first line in the file is assumed to be a header and is ignored. Each subsequent line describes a single plot. There are three ways to select a region to plot:&lt;br /&gt;
&lt;br /&gt;
; Plotting a window flanking an interesting SNP&lt;br /&gt;
: This option allows you to plot results for all markers within a specific distance (e.g. 500kb) of an index SNP. To use this option, set column 1 to have the name of the index SNP (e.g. &#039;&#039;rs2&#039;&#039; below) and set column 5 to specify the width of the region of interest (e.g. 500kb below). Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs1	   na	   na	    na       500kb        yes      rfrows=3 weightCol=”N” snpset=”HapMap” metalRug=”Our SNPs” &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking an interesting SNP&lt;br /&gt;
: This option is similar to the previous option, but allows you to specify an assymetric region of interest. For example, perhaps you interested in a plot that extends a bit further to the right of the SNP of interest. In this case, specify the coordinates of the region to be plotted in columns 2, 3, and 4. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs2	   1	   540000   580000   na	          yes      rfrows=4 legend=”right” showAnnot=T &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking a gene of interest&lt;br /&gt;
: This option allows you to focus on a particular gene, rather than a specific SNP. It is similar to the first option. You should set column 1 to be the name of the gene of interest and column 5 to be the desired window width. When you use this option, LocusZoom will automatically select an index SNP for each region; the SNP will be the site with the smallest p-value. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
CETP	   na      na	    na       200kb        yes      rfrows=6 showAnnot=T annotPch=”1,24,24,25,22,21,8,7”&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sixth column in the &amp;quot;Hit Spec&amp;quot; file can be used to enable (with the value &#039;&#039;yes&#039;&#039;) or disable (with the value &#039;&#039;no&#039;&#039;) an individual plot. For example, if you run a &amp;quot;Hit Spec&amp;quot; file with 15 plots and 14 of them turn out very nicely, you may wish to re-run the &amp;quot;Hit Spec&amp;quot; file with some tweaks to the problem plot. In this case (if you dislike waiting for your results as much as we do!), you could disable generation of the plots that seem nice by changing the 6th column to “no” and leave the plot that you tweaked as a “yes”.&lt;br /&gt;
&lt;br /&gt;
The 7th and final column contains additional LocusZoom arguments as &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs. Any number of &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pair arguments can be included. For details of available options, see the section entitled LocusZoom options below.&lt;br /&gt;
&lt;br /&gt;
== Generate single plots using our publicly-available lipids GWAS data  ==&lt;br /&gt;
&lt;br /&gt;
In addition to plotting your own results, you can plot the results of some publicly available GWAS. Currently, the only publicly available set of results is our GWAS for loci determining blood lipid levels (Kathiresan et al, Nature Genetics 2009). Just like when you are plotting your own data, you can specify 1) an index SNP and a flanking region, 2) the chromosome together with start and stop positions (in basepairs), or 3) gene name and a flanking region.&lt;br /&gt;
&lt;br /&gt;
== Commonly Used LocusZoom Options ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Web Form &lt;br /&gt;
! &amp;quot;Hit Spec&amp;quot; File Key-Value Pair &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Title on Plot &lt;br /&gt;
| title=”My Favorite Locus” &lt;br /&gt;
| Specifies large text displayed above the plot&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| n/a &lt;br /&gt;
| Plots can be generated based on hg18 (the default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| Legend Location &lt;br /&gt;
| legend=”left” &lt;br /&gt;
| This specifies the location of the legend within the plot, the default is auto. Auto tries to select a location that overlaps a minimal number of datapoints. (auto, left, right, none) &lt;br /&gt;
|-&lt;br /&gt;
| SNP Position Rug &lt;br /&gt;
| snpset=”HapMap” metalRug=”Rug SNPs” &lt;br /&gt;
| These options control display of tickmarks indicating SNP positions at the top of the plot. Setting snpset=&amp;quot;HapMap&amp;quot;, snpset=&amp;quot;Illu318&amp;quot; or snpset=&amp;quot;Affy500&amp;quot; display a fixed set of SNPs. (You can also try snpset=&amp;quot;Affy500,Illu318,HapMap&amp;quot; to see all 3). The metalRug option displays a rug which only includes the SNPs that are actually plotted. To remove the rug in batch mode set snpset=NULL. &lt;br /&gt;
|-&lt;br /&gt;
| Number of Rows for Gene Names &lt;br /&gt;
| rfrows=4 &lt;br /&gt;
| LocusZoom will automatically tries to determine the number of display rows to use for genes and gene names so they are not overlapping. This can make each plot prettier, but is not ideal when you want to compare many plots side by side. To ensure a fixed amount of space is used for gene names, use this option to set the maximum number of display rows. If LocusZoom runs out of plotting space and some genes are left out, a warning will be added to the plot.&lt;br /&gt;
|-&lt;br /&gt;
| Point Size  &lt;br /&gt;
| weightCol=”SampleSize” &lt;br /&gt;
| This specifies that the “dot size” of each data points will reflect the square-root of the sample size. The default is to have all dot sizes equal.&lt;br /&gt;
|-&lt;br /&gt;
| LD Measure &lt;br /&gt;
| ldCol=”dprime” (“rsquare”) &lt;br /&gt;
| Colors data points according to the selected LD  measure. The default is &amp;quot;rsquare&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| Reference Population for LD &lt;br /&gt;
| n/a &lt;br /&gt;
| This option allows the user to specify which reference panel is used to obtain LD estimates. The default is CEU from HapMap Phase II but users may select YRI or JPT+CHB from HapMap Phase II, or CEU from 1000 Genomes (August 2009 or June 2010 release).&lt;br /&gt;
|-&lt;br /&gt;
| Highlight Region of Interest &lt;br /&gt;
| hiStart=425Mb hiEnd=425.1Mb &lt;br /&gt;
| A grey box can be used to highlight important regions of the genome – this can reflect where an association signal peaks or a region selected for sequencing, for example.&lt;br /&gt;
|-&lt;br /&gt;
| Theme &lt;br /&gt;
| theme=”publication” &lt;br /&gt;
| We have created a theme that has larger text and is more easily readable for publication.&lt;br /&gt;
|-&lt;br /&gt;
| Show Annotation &lt;br /&gt;
| showAnnot=T showRefsnpAnnot=T annotPch=”21,24,24,25,22,22,8,7” &lt;br /&gt;
| SNP annotation is available for all 1000G SNPs (Aug 2009 release) and can be enabled with the showAnnot=T option. The annotPch command allows you to customize the R plotting symbol used for each kind of SNP; it is okay to use the same symbol for more than one category. The annotation categories, together with their default symbol setting are: Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). For more information about these annotation categories used, please see http://research.nhgri.nih.gov/tools/unisnp/?rm=ohelp&lt;br /&gt;
|-&lt;br /&gt;
| Recombination Rate Overlay &lt;br /&gt;
| showRecomb=T &lt;br /&gt;
| The estimated recombination rate from HapMap samples can be shown on the plot or left off. The data plotted are from Hapmap; http://hapmap.ncbi.nlm.nih.gov/downloads/recombination/2008-03_rel22_B36/rates/&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For a full list of options that can be used in Batch Mode using a hitspec file, please see [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Plotting_options this list]&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=6112</id>
		<title>LocusZoom</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=6112"/>
		<updated>2012-12-11T15:57:55Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Uploading Your Association Study Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:LocusZoomSmall.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LocusZoom&#039;&#039;&#039; is designed to facilitate viewing of local association results together with useful information about a locus, such as the location and orientation of the genes it includes, linkage disequilibrium coefficients and local estimates of recombination rates. It was developed by popular demand, as a result of many questions we have had about &amp;quot;How did you make the figures in your talk?&amp;quot; or &amp;quot;How did you make the figures for your GWAS paper?&amp;quot; (And for better or for worse, we have quite a few GWAS papers!!).&lt;br /&gt;
&lt;br /&gt;
LocusZoom can be used in four ways:&lt;br /&gt;
&lt;br /&gt;
; 1. Plot Summaries of Your Genomewide Scan Interactively&lt;br /&gt;
: You can upload summary results of your own genomewide scan or genomewide meta-analysis and request plots of regions of interest using a web-based form.&lt;br /&gt;
&lt;br /&gt;
; 2. Generate Many Plots in Batch Mode&lt;br /&gt;
: You can upload summary results for your genomewide scan or genomewide meta-analysis and request several plots in one go by uploading a batch file. You will receive results via e-mail. A snail-mail option is not available.&lt;br /&gt;
&lt;br /&gt;
; 3. Plot Summaries of Publicly Available Datasets&lt;br /&gt;
: Currently, this includes the results of [http://www.sph.umich.edu/csg/abecasis/public/lipids2008/ our genome-wide scan] for variants associated with HDL-cholesterol, LDL-cholesterol and triglyceride levels in ~20,000 individuals.&lt;br /&gt;
&lt;br /&gt;
; 4. Download LocusZoom and run on your local unix machine&lt;br /&gt;
: [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone Download LocusZoom] and [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Sources_of_SQLite_database_tables associated databases]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upload your own meta-analysis file and generate single plots using a web-based form  ==&lt;br /&gt;
&lt;br /&gt;
=== Uploading Your Association Study Results ===&lt;br /&gt;
&lt;br /&gt;
Association results can be uploaded to our web server using the [http://csg.sph.umich.edu/locuszoom/ plot your data webpage]. Result files are limited to 20Mb in size, which allows for a [[gzip|gzipped]] text table including key columns (marker name, p-value and sample size) for up to ~3 million SNPs. In our tests, a typical GWAS results file is ~17 Mb in size after imputation of HapMap SNPs. Once a file is uploaded, LocusZoom will remember the file for the duration of your web session allowing you to generate multiple plots. If you have a slow connection or would like to save time, you can upload results for a region or chromosome of interest only. Your results are entirely confidential and won&#039;t be viewed by us or anyone else (except those with whom you share them!)&lt;br /&gt;
&lt;br /&gt;
To specify the region to be plotted, you will have to specify the name of a key marker in the region (typically, as an rs-number, but can be in chr:pos format), name a gene of interest or provide appropriate genome coordinates. When displaying linkage disequilibrium, plotting will be very fast for small windows when HapMap CEU linkage disequilibrium is requested (because pairwise coefficients have been precomputed) and will be a bit slower for larger windows (because linkage disequilibrium coefficients must be computed on the fly).&lt;br /&gt;
&lt;br /&gt;
If you include a sample size column in the result file, it will be used to control the size of each plotted marker.&lt;br /&gt;
&lt;br /&gt;
=== Custom Annotation ===&lt;br /&gt;
&lt;br /&gt;
You may choose to have SNPs displayed using different plotting symbols to distinguish them from each other.  To implement this, in the section &amp;quot;Custom Annotation&amp;quot; in the box &amp;quot;Column Name&amp;quot;, you need to provide the name of a column in your meta-analysis file.  This column will list a category for each SNP of your own choosing (i.e. &amp;quot;nonsynonymous&amp;quot;, &amp;quot;splice&amp;quot;,&amp;quot;intronic&amp;quot;,etc.) or (&amp;quot;Genotyped&amp;quot;,&amp;quot;Imputed&amp;quot;), however, the category names may not include any spaces.  To select the order of the categories to display in the legend and to match the order of pre-selected R plotting symbols (set as pch = 21, 22, 23, 24, 25, 4, 7, 8, 10, 11, 12, 13, 14, 3), you may provide the category names in the specified order in &amp;quot;Category Order&amp;quot; section of &amp;quot;Custom Annotation&amp;quot;.  Each entry (which may not contain spaces) does not need quotes but each entry should be separated by commas.&lt;br /&gt;
&lt;br /&gt;
Alternatively, we have provided functional annotation of all 1000 Genomes (Aug 2009) and HapMap r22 SNPs according to the following categories; Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). This can be implemented using the section &amp;quot;Show Annotation&amp;quot; and clicking the box beside each annotation category that you would like distinguished.  SNPs that are not in any selected category will still be displayed as having no annotation.&lt;br /&gt;
&lt;br /&gt;
=== Plotting of Pairwise Linkage Disequilibrium ===&lt;br /&gt;
&lt;br /&gt;
In the main plot window, data points are colored according to their level of linkage disequilibrium (LD) of the each SNP with the index SNP. If users specify the region to display using an index SNP and flanking region, LD of all data points will be relative to the user-specified index SNP. If users specify the region to display using genome coordinates or a gene name, LocusZoom will automatically select the most significant SNP in the region as the index SNP. For all other SNPs in the plot, the color of the data point will reflect the pairwise LD with this index SNP. The default LD measure is r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; calculated from the HapMap CEU population (release 22), but users have the option to replace this with D’ and of selecting the HapMap YRI, Hapmap CHB+JPT or 1000 Genomes CEU reference panels. To  display LD from 1000G CEU, please substitute rsid&#039;s for 1000G naming convention (chrxx:xxxx) whenever possible.  Because we have pre-computed LD for all SNPs in HapMap CEU, plots will often generate more quickly if using the default LD information. SNPs with missing LD information are shown in grey.&lt;br /&gt;
&lt;br /&gt;
=== Customizing the Display of Your Results ===&lt;br /&gt;
&lt;br /&gt;
All options listed in the Main Table above are available, as well as the options listed below&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Setting &lt;br /&gt;
! Default Value &lt;br /&gt;
! Details&lt;br /&gt;
|-&lt;br /&gt;
| Column Delimiter &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the type of column delimiter in the results file&lt;br /&gt;
|-&lt;br /&gt;
| Pvalue Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the name of the column that contains the p-values&lt;br /&gt;
|-&lt;br /&gt;
| Marker Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the heading of the column that contains marker names&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| none &lt;br /&gt;
| Plots can be generated based on hg18 (default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| HapMap Population for LD &lt;br /&gt;
| none &lt;br /&gt;
| This option allows the user to specify which HapMap population was used to obtain LD estimates. The default is CEU but users may select YRI or JPT+CHB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Batch Mode  ==&lt;br /&gt;
&lt;br /&gt;
To start batch mode, first upload your results file just as you would in interactive mode. The same file size restrictions apply.&lt;br /&gt;
&lt;br /&gt;
=== Generating a Hit Spec File ===&lt;br /&gt;
&lt;br /&gt;
Batch mode allows you to conveniently specify a set of plots to be generated in &amp;quot;Hit Spec&amp;quot; file. This is handy if you need to generate large numbers of plots or if you want to plot the same set of regions after updating a genomewide analysis (for example).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Hit Spec&amp;quot; file is a whitespace delimited text file. The file has six mandatory columns which can be followed by a series of optional &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs to allow for detailed customization of each plot. The first line in the file is assumed to be a header and is ignored. Each subsequent line describes a single plot. There are three ways to select a region to plot:&lt;br /&gt;
&lt;br /&gt;
; Plotting a window flanking an interesting SNP&lt;br /&gt;
: This option allows you to plot results for all markers within a specific distance (e.g. 500kb) of an index SNP. To use this option, set column 1 to have the name of the index SNP (e.g. &#039;&#039;rs2&#039;&#039; below) and set column 5 to specify the width of the region of interest (e.g. 500kb below). Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs1	   na	   na	    na       500kb        yes      rfrows=3 weightCol=”N” snpset=”HapMap” metalRug=”Our SNPs” &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking an interesting SNP&lt;br /&gt;
: This option is similar to the previous option, but allows you to specify an assymetric region of interest. For example, perhaps you interested in a plot that extends a bit further to the right of the SNP of interest. In this case, specify the coordinates of the region to be plotted in columns 2, 3, and 4. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs2	   1	   540000   580000   na	          yes      rfrows=4 legend=”right” showAnnot=T &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking a gene of interest&lt;br /&gt;
: This option allows you to focus on a particular gene, rather than a specific SNP. It is similar to the first option. You should set column 1 to be the name of the gene of interest and column 5 to be the desired window width. When you use this option, LocusZoom will automatically select an index SNP for each region; the SNP will be the site with the smallest p-value. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
CETP	   na      na	    na       200kb        yes      rfrows=6 showAnnot=T annotPch=”1,24,24,25,22,21,8,7”&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sixth column in the &amp;quot;Hit Spec&amp;quot; file can be used to enable (with the value &#039;&#039;yes&#039;&#039;) or disable (with the value &#039;&#039;no&#039;&#039;) an individual plot. For example, if you run a &amp;quot;Hit Spec&amp;quot; file with 15 plots and 14 of them turn out very nicely, you may wish to re-run the &amp;quot;Hit Spec&amp;quot; file with some tweaks to the problem plot. In this case (if you dislike waiting for your results as much as we do!), you could disable generation of the plots that seem nice by changing the 6th column to “no” and leave the plot that you tweaked as a “yes”.&lt;br /&gt;
&lt;br /&gt;
The 7th and final column contains additional LocusZoom arguments as &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs. Any number of &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pair arguments can be included. For details of available options, see the section entitled LocusZoom options below.&lt;br /&gt;
&lt;br /&gt;
== Generate single plots using our publicly-available lipids GWAS data  ==&lt;br /&gt;
&lt;br /&gt;
In addition to plotting your own results, you can plot the results of some publicly available GWAS. Currently, the only publicly available set of results is our GWAS for loci determining blood lipid levels (Kathiresan et al, Nature Genetics 2009). Just like when you are plotting your own data, you can specify 1) an index SNP and a flanking region, 2) the chromosome together with start and stop positions (in basepairs), or 3) gene name and a flanking region.&lt;br /&gt;
&lt;br /&gt;
== Commonly Used LocusZoom Options ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Web Form &lt;br /&gt;
! &amp;quot;Hit Spec&amp;quot; File Key-Value Pair &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Title on Plot &lt;br /&gt;
| title=”My Favorite Locus” &lt;br /&gt;
| Specifies large text displayed above the plot&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| n/a &lt;br /&gt;
| Plots can be generated based on hg18 (the default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| Legend Location &lt;br /&gt;
| legend=”left” &lt;br /&gt;
| This specifies the location of the legend within the plot, the default is auto. Auto tries to select a location that overlaps a minimal number of datapoints. (auto, left, right, none) &lt;br /&gt;
|-&lt;br /&gt;
| SNP Position Rug &lt;br /&gt;
| snpset=”HapMap” metalRug=”Rug SNPs” &lt;br /&gt;
| These options control display of tickmarks indicating SNP positions at the top of the plot. Setting snpset=&amp;quot;HapMap&amp;quot;, snpset=&amp;quot;Illu318&amp;quot; or snpset=&amp;quot;Affy500&amp;quot; display a fixed set of SNPs. (You can also try snpset=&amp;quot;Affy500,Illu318,HapMap&amp;quot; to see all 3). The metalRug option displays a rug which only includes the SNPs that are actually plotted. To remove the rug in batch mode set snpset=NULL. &lt;br /&gt;
|-&lt;br /&gt;
| Number of Rows for Gene Names &lt;br /&gt;
| rfrows=4 &lt;br /&gt;
| LocusZoom will automatically tries to determine the number of display rows to use for genes and gene names so they are not overlapping. This can make each plot prettier, but is not ideal when you want to compare many plots side by side. To ensure a fixed amount of space is used for gene names, use this option to set the maximum number of display rows. If LocusZoom runs out of plotting space and some genes are left out, a warning will be added to the plot.&lt;br /&gt;
|-&lt;br /&gt;
| Point Size  &lt;br /&gt;
| weightCol=”SampleSize” &lt;br /&gt;
| This specifies that the “dot size” of each data points will reflect the square-root of the sample size. The default is to have all dot sizes equal.&lt;br /&gt;
|-&lt;br /&gt;
| LD Measure &lt;br /&gt;
| ldCol=”dprime” (“rsquare”) &lt;br /&gt;
| Colors data points according to the selected LD  measure. The default is &amp;quot;rsquare&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| Reference Population for LD &lt;br /&gt;
| n/a &lt;br /&gt;
| This option allows the user to specify which reference panel is used to obtain LD estimates. The default is CEU from HapMap Phase II but users may select YRI or JPT+CHB from HapMap Phase II, or CEU from 1000 Genomes (August 2009 or June 2010 release).&lt;br /&gt;
|-&lt;br /&gt;
| Highlight Region of Interest &lt;br /&gt;
| hiStart=425Mb hiEnd=425.1Mb &lt;br /&gt;
| A grey box can be used to highlight important regions of the genome – this can reflect where an association signal peaks or a region selected for sequencing, for example.&lt;br /&gt;
|-&lt;br /&gt;
| Theme &lt;br /&gt;
| theme=”publication” &lt;br /&gt;
| We have created a theme that has larger text and is more easily readable for publication.&lt;br /&gt;
|-&lt;br /&gt;
| Show Annotation &lt;br /&gt;
| showAnnot=T showRefsnpAnnot=T annotPch=”21,24,24,25,22,22,8,7” &lt;br /&gt;
| SNP annotation is available for all 1000G SNPs (Aug 2009 release) and can be enabled with the showAnnot=T option. The annotPch command allows you to customize the R plotting symbol used for each kind of SNP; it is okay to use the same symbol for more than one category. The annotation categories, together with their default symbol setting are: Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). For more information about these annotation categories used, please see http://research.nhgri.nih.gov/tools/unisnp/?rm=ohelp&lt;br /&gt;
|-&lt;br /&gt;
| Recombination Rate Overlay &lt;br /&gt;
| showRecomb=T &lt;br /&gt;
| The estimated recombination rate from HapMap samples can be shown on the plot or left off. The data plotted are from Hapmap; http://hapmap.ncbi.nlm.nih.gov/downloads/recombination/2008-03_rel22_B36/rates/&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For a full list of options that can be used in Batch Mode using a hitspec file, please see [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Plotting_options this list]&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=3222</id>
		<title>METAL Documentation</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=3222"/>
		<updated>2011-05-25T15:16:00Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Specifying Weights in P-value Based Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Useful Wiki Pages ==&lt;br /&gt;
&lt;br /&gt;
There are a few pages in this Wiki that may be useful to METAL users. Here are links to key pages:&lt;br /&gt;
&lt;br /&gt;
* The [[METAL Program|METAL Home Page]]&lt;br /&gt;
&lt;br /&gt;
* The [[METAL Quick Start|METAL Quick Start Tutorial]]&lt;br /&gt;
&lt;br /&gt;
* The [[METAL FAQ]]&lt;br /&gt;
&lt;br /&gt;
* The [[METAL Command Reference]]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
METAL was developed by Goncalo Abecasis, Yun Li and Cristen Willer ([http://www.sph.umich.edu/csg/abecasis/publications/pdf/Bioinformatics.vol.26-pp.2190.pdf manuscript available here]). The first version was developed in 2007 and was used for the analyses presented in [http://www.sph.umich.edu/csg/abecasis/publications/18193045.html Sanna et al (2008)] and [http://www.sph.umich.edu/csg/abecasis/publications/18193043.html Willer et al (2008)]. Since then, it has become quite a popular tool for the analysis of genomewide association scans.&lt;br /&gt;
&lt;br /&gt;
== Brief Description ==&lt;br /&gt;
&lt;br /&gt;
METAL is a tool for meta-analysis genomewide association scans. METAL can combine either (a) test statistics and standard errors or (b) p-values across studies (taking sample size and direction of effect into account).  METAL analysis is a convenient alternative to a direct analysis of merged data from multiple studies. It is especially appropriate when data from the individual studies cannot be analyzed together because of differences in ethnicity, phenotype distribution, gender or constraints in sharing of individual level data imposed. Meta-analysis results in little or no loss of efficiency compared to analysis of a combined dataset including data from all individual studies. &lt;br /&gt;
&lt;br /&gt;
== Approach ==&lt;br /&gt;
&lt;br /&gt;
One of the most common questions we receive is about the approach used by METAL to carry out a meta-analysis using p-values as input. The process is actually quite simple! First, for each marker, a reference allele is selected and a z-statistic characterizing the evidence for association is calculated. The z-statistic summarizes the magnitude and the direction of effect relative to the reference allele and all studies are aligned to the same reference allele.  Next, an overall z-statistic and p-value are then calculated from a weighted sum of the individual statistics. Weights are proportional to the square-root of the number of individuals examined in each sample and selected such that the squared weights sum to 1.0. For samples that contain related individuals, a smaller ‘effective’ sample size may be used, but simulations suggest that modest changes in the effective sample size have very little impact on the final p-value.&lt;br /&gt;
&lt;br /&gt;
== Basic Usage Instructions ==&lt;br /&gt;
&lt;br /&gt;
METAL is a command line tool. It is typically run from a Linux, Unix or DOS prompt by invoking the command &amp;lt;code&amp;gt;metal&amp;lt;/code&amp;gt;. Analyses can be run interactively or a simple script can be provided as input. Interactive analyses are usually convenient when learning how to use METAL, whereas the scripting approach is preferred for production use (as it allows analyses to be conveniently repeated).  An example METAL script is included at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
METAL has lots of options and here we have listed some common ones that, hopefully, will help you get started. &lt;br /&gt;
&lt;br /&gt;
=== Help! ===&lt;br /&gt;
&lt;br /&gt;
Issuing the &amp;lt;code&amp;gt;HELP&amp;lt;/code&amp;gt; command lists all available commands and the current settings for each option. The list of all available commands is also available in the [[METAL Command Reference]].&lt;br /&gt;
&lt;br /&gt;
=== Input File Separators ===&lt;br /&gt;
&lt;br /&gt;
METAL expects that each set of results will be summarized in a table. This table must be stored in a text file but otherwise METAL is quite flexible about details such as column separators, column headers and the like. This does mean that an essential bit of information needed before any meta-analysis is a description of each input file.&lt;br /&gt;
&lt;br /&gt;
The first thing you should specify is the column separator. By default, METAL assumes columns are separated by whitespace (which consists of any combination of space and tab characters). You can also specify:&lt;br /&gt;
&lt;br /&gt;
   SEPARATOR  WHITESPACE    - the default&lt;br /&gt;
   SEPARATOR  COMMA         - for comma delimited files that are popular in some platforms&lt;br /&gt;
   SEPARATOR  TAB           - columns separated by a single tab, so that consecutive tabs indicate an empty column&lt;br /&gt;
&lt;br /&gt;
=== Input File Columns ===&lt;br /&gt;
&lt;br /&gt;
Each input file should include the following information:&lt;br /&gt;
&lt;br /&gt;
* A column with marker name, which should be consistent across studies&lt;br /&gt;
* A column indicating the tested allele&lt;br /&gt;
* A column indicating the other allele&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a sample size weighted analysis (based on p-values), you will also need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the direction of effect for the tested allele&lt;br /&gt;
* A column indicating the corresponding p-value&lt;br /&gt;
* An optional column indicating the sample size (if the sample size varies by marker)&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a meta-analysis based on standard errors, you will need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the estimated effect size for each marker&lt;br /&gt;
* A column indicating the standard error of this effect size estimate&lt;br /&gt;
&lt;br /&gt;
The header for each of these columns must be specified so that METAL knows how to interpret the data. As noted below, additional columns including allele frequency information, strand information, and others can also be present.&lt;br /&gt;
&lt;br /&gt;
Here is a typical set of commands that would describe a table where the headers SNP, RefAllele, NonRefAllele, Pvalue and Beta correspond to the MARKER, ALLELE 1 and 2, PVALUE and EFFECT columns:&lt;br /&gt;
&lt;br /&gt;
  MARKERLABEL   SNP&lt;br /&gt;
  ALLELELABELS  RefAllele NonRefAllele&lt;br /&gt;
  PVALUELABEL   P-value&lt;br /&gt;
  EFFECTLABEL   Effect&lt;br /&gt;
&lt;br /&gt;
These can be abbreviated as:&lt;br /&gt;
&lt;br /&gt;
  MARKER        SNP&lt;br /&gt;
  ALLELE        RefAllele NonRefAllele&lt;br /&gt;
  PVALUE        P-value&lt;br /&gt;
  EFFECT        Effect&lt;br /&gt;
&lt;br /&gt;
=== Specifying Weights in P-value Based Analysis ===&lt;br /&gt;
&lt;br /&gt;
The weight for each MARKER can be stored in a column in the table (specified with the &amp;lt;code&amp;gt;WEIGHTLABEL&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;WEIGHT&amp;lt;/code&amp;gt; commands).&lt;br /&gt;
&lt;br /&gt;
  WEIGHT       N&lt;br /&gt;
&lt;br /&gt;
Alternatively, the same weight can be used for all markers for that inputfile (in which case the fixed weight can be set with the &amp;lt;code&amp;gt;DEFAULTWEIGHT&amp;lt;/code&amp;gt; command).  The WEIGHTLABEL command takes precedence over the DEFAULTWEIGHT command, so the WEIGHT column label in use must not match any columns in the inputfile.&lt;br /&gt;
&lt;br /&gt;
  WEIGHT          DONTUSECOLUMN&lt;br /&gt;
  DEFAULTWEIGHT   1000&lt;br /&gt;
&lt;br /&gt;
=== Reading Each Input File ===&lt;br /&gt;
&lt;br /&gt;
Once all appropriate headers have been specified, issuing the &amp;lt;code&amp;gt;PROCESS&amp;lt;/code&amp;gt; command will read an input file and update summary statistics to take the results it contains into account. Thus:&lt;br /&gt;
&lt;br /&gt;
  PROCESS      study1-results.tbl&lt;br /&gt;
&lt;br /&gt;
=== Performing the Final Analysis ===&lt;br /&gt;
&lt;br /&gt;
Once all input files have been processed, simply issue the &amp;lt;code&amp;gt;ANALYZE&amp;lt;/code&amp;gt; command to execute a meta-analysis. If you&#039;d like to execute interim analysis that include only a subset of the studies, issue the ANALYZE command after the corresponding input files have been processed.&lt;br /&gt;
&lt;br /&gt;
  ANALYZE&lt;br /&gt;
&lt;br /&gt;
To allow for heterogeneity, use the &amp;lt;code&amp;gt;ANALYZE HETEROGENEITY&amp;lt;/code&amp;gt; command. This command will take a little longer to run, because it requires each input file to be examined twice. The METAL heterogeneity analysis requires a second pass of analysis to decide whether observed effect sizes (or test statistics) are homogeneous across samples.  The resulting heterogeneity statistic has n-1 degrees of freedom for n samples.&lt;br /&gt;
&lt;br /&gt;
  ANALYZE HETEROGENEITY&lt;br /&gt;
&lt;br /&gt;
METAL does not require that all input files report a result for every marker.  Any available data is used.  To restrict the output to only markers that have at least a specific number of individuals analysed (or weight), use a command like the following:&lt;br /&gt;
&lt;br /&gt;
  MINWEIGHT 10000&lt;br /&gt;
&lt;br /&gt;
For example to restrict the output to show only Markers with a total sample size of at least 10,000 individuals.&lt;br /&gt;
&lt;br /&gt;
== Additional Analysis Options ==&lt;br /&gt;
&lt;br /&gt;
=== Selecting an Analysis Scheme ===&lt;br /&gt;
&lt;br /&gt;
  SCHEME SAMPLESIZE        - default approach, uses p-value and direction of effect, weighted according to sample size&lt;br /&gt;
  SCHEME STDERR            - classical approach, uses effect size estimates and standard errors&lt;br /&gt;
  STDERR SE                - specify the label for the standard error column.&lt;br /&gt;
&lt;br /&gt;
By default, METAL combines p-values across studies taking into account a study specific weight (typically, the sample size) and direction of effect. This behavior can be requested explicitly with the &amp;lt;code&amp;gt;SCHEME SAMPLESIZE&amp;lt;/code&amp;gt; command. An alternative can be requested with the &amp;lt;code&amp;gt;SCHEME STDERR&amp;lt;/code&amp;gt; command and weights effect size estimates using the inverse of the corresponding standard errors. To enable this option, you will also need to specify which of your input columns contains standard error information using the &amp;lt;code&amp;gt;STDERRLABEL&amp;lt;/code&amp;gt; command (or &amp;lt;code&amp;gt;STDERR&amp;lt;/code&amp;gt; for short). While standard error based weights are more common in the biostatistical literature, if you decide to use this approach, it is very important to ensure that effect size estimates (&#039;&#039;beta&#039;&#039; coefficients) and standard errors use the same units in all studies (i.e. make sure that the exact same trait was examined in each study and that the same transformations were applied). Inconsistent use of measurement units across studies is the most common cause of discrepancies between these two analysis strategies.&lt;br /&gt;
&lt;br /&gt;
=== Genomic Control Correction ===&lt;br /&gt;
&lt;br /&gt;
   GENOMICCONTROL OFF      - the default, no adjustment to test statistics&lt;br /&gt;
   GENOMICCONTROL ON       - automatically correct test statistics to account for small amounts of population stratification or unaccounted for relatedness&lt;br /&gt;
   GENOMICCONTROL [value]  - correct test statistics using the specified inflation factor&lt;br /&gt;
&lt;br /&gt;
METAL has the ability to apply a genomic control correction to all input files.  METAL will estimate the inflation of the test statistic by comparing the median test statistic to that expected by chance, and then apply the genomic control correction to the p-values (for SAMPLESIZE weighted meta-analysis) or the standard error (for STDERR weighted meta-analysis).  This should only be applied to files with whole genome data (i.e. should not be used for settings where results are only available for a candidate locus or a small number of SNPs selected for follow-up of [[GWAS]] results). Genomic control settings can be customized for each input file.  We recommend applying genomic control correction to all input files that include genomewide data and, in addition, to the meta-analysis results. To apply genomic control to the meta-analysis results, just perform an initial meta-analysis and then load the initial set of results into METAL to get final, genomic control adjusted results.&lt;br /&gt;
&lt;br /&gt;
=== Strand Information ===&lt;br /&gt;
&lt;br /&gt;
   USESTRAND   ON&lt;br /&gt;
   STRANDLABEL StrandColumnHeading&lt;br /&gt;
&lt;br /&gt;
Input files can contain a column that indicates which strand the alleles are coded on (given as +/-).  If this column is present, you should issue the &amp;lt;code&amp;gt;USESTRAND ON&amp;lt;/code&amp;gt; command and specify an appropriate header with the &amp;lt;code&amp;gt;STRANDLABEL&amp;lt;/code&amp;gt; command.  If USESTRAND is off, the strand is assumed to be “+” for all SNPs, although obvious strand problems are identified by METAL and appropriately handled (for example, when one study provides A/G alleles and a different study provides C/T alleles).&lt;br /&gt;
&lt;br /&gt;
=== Filtering ===&lt;br /&gt;
&lt;br /&gt;
Custom filters can be used to select SNPs for inclusion in the meta-analysis.  This can be used, for example, to select SNPs within a specified minor-allele frequency range for analysis. &lt;br /&gt;
&lt;br /&gt;
Here are some possible filters:&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER N &amp;gt; 1000&lt;br /&gt;
   ADDFILTER MAF &amp;gt; 0.01&lt;br /&gt;
&lt;br /&gt;
Together, these two filters would only consider entries where the value in the N column is greater than 1000 and the value in the MAF column is also greater than 0.01.&lt;br /&gt;
&lt;br /&gt;
Filters can be defined using the &amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;=, =, != and IN operators. The IS operator tests membership in a set. For example to restrict analysis to three interesting SNPs, use (&#039;&#039;note absence of spaces in list of SNPs&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER MARKER_ID IN (rs1234,rs123456,rs123)&lt;br /&gt;
&lt;br /&gt;
To remove all previously defined filters, use the command:&lt;br /&gt;
&lt;br /&gt;
   REMOVEFILTERS&lt;br /&gt;
&lt;br /&gt;
=== Verbose Mode ===&lt;br /&gt;
&lt;br /&gt;
   VERBOSE ON&lt;br /&gt;
&lt;br /&gt;
METAL allows for complete output of individual summary statistics for all SNPs in all input files.  This can create a very large file and should be used with caution.  Typically, one should create custom filters  to restrict analyses to interesting SNPs of interest before using this option.  This option can be useful for comparing direction of effect across many studies since METAL takes care of all the strand flipping and provides the direction of effect relative to the same allele.  This is also a way to double-check that the expected data are being used appropriately by METAL.&lt;br /&gt;
&lt;br /&gt;
=== Lenient Mode ===&lt;br /&gt;
 &lt;br /&gt;
    COLUMNCOUNTING STRICT         - requires expected number of columns in every row&lt;br /&gt;
    COLUMNCOUNTING LENIENT        - tries to interpret rows with fewer columns than expected&lt;br /&gt;
&lt;br /&gt;
By default, METAL will skip lines in each input file that don&#039;t have the expected number of columns. This is usually a good idea because it avoids producing incorrect results when a column is missing. Sometimes (for example, when there are optional extra columns at the end of each line), the &amp;lt;code&amp;gt;COLUMNCOUNTING LENIENT&amp;lt;/code&amp;gt; option can be useful.&lt;br /&gt;
&lt;br /&gt;
=== Tracking Allele Frequencies ===&lt;br /&gt;
&lt;br /&gt;
   AVERAGEFREQ ON&lt;br /&gt;
   MINMAXFREQ ON&lt;br /&gt;
&lt;br /&gt;
METAL can optionally track the effect allele frequency across all files and report the mean, minimum and maximum effect allele frequency.  These can be quite useful to check that allele frequencies are similar across different cohorts after METAL performs all strand alignment. Large differences in allele frequencies across studies can suggest inconsistent naming of reference alleles across studies. METAL requires all input files to have an allele frequency column when this feature is turned on. To specify the column header for allele frequency information, use the &amp;lt;code&amp;gt;FREQLABEL&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Custom Variables ===&lt;br /&gt;
&lt;br /&gt;
We allow users to keep cumulative counts of custom variables across input files.  An example of this might be to keep track of the sample size when performing standard-error weighted meta-analysis.  The name of the custom variable should be defined once, before input files are loaded.  The corresponding column label in each input file can be specified using the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command. For example, to create a custom variable labeled TotalSampleSize that tallies the total of the N column across files, one could issue the commands:&lt;br /&gt;
&lt;br /&gt;
  CUSTOMVARIABLE TotalSampleSize&lt;br /&gt;
  LABEL TotalSampleSize as N&lt;br /&gt;
&lt;br /&gt;
If needed, the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command can be used multiple times to customize column headers for each input file.&lt;br /&gt;
&lt;br /&gt;
=== Input File Recommendations ===&lt;br /&gt;
&lt;br /&gt;
We strongly recommend that both allele labels, corresponding to the the effect allele and non-effect allele, should be provided for all SNPs.  As long as both allele columns are given for each input file, METAL appropriately accounts for situations when different input files use different reference alleles. Alleles can be coded numerically (A=1,C=2,G=3,T=4) or alphabetically (A,C,G,T,a,c,g,t) and can be on either strand if not an A/T or C/G SNP.  For A/T or C/G SNPs, METAL requires SNPs to be on a consistent strand in different input files for the results to be interpretable.  For other SNPs, METAL can automatically identify and resolve strand inconsistencies. &lt;br /&gt;
&lt;br /&gt;
P-values that are &amp;amp;lt; 0.0, &amp;amp;gt; 1.0 or non-numeric will be treated as missing and generate a warning.  &lt;br /&gt;
&lt;br /&gt;
The EFFECT column can have positive and negative values (beta values from regression, for example), or simply directions of effect relative to the reference allele, listed as “+” and “-“.  An EFFECT of “+” (or any positive number) with respect to the reference allele A (or effect allele A), for example, represents a case where increasing number of copies of allele A are correlated with increasing trait values. For discrete traits, it is common to report odds ratios, which are always positive. In this case, to calculate the direction of effect, one should look at the log of the odds ratio. METAL can compute the odds ratio for you if you specify &amp;lt;code&amp;gt;EFFECT log(ODDS_RATIO_COLUMN)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To perform odds-ratio based meta-analysis, select SCHEME STDERR at the beginning of the script.  Then, for each file, provide the natural log of the odds ratio as the EFFECT column or another appropriate statistic (such as the corresponding regression coefficient from a logistic regression analysis).&lt;br /&gt;
&lt;br /&gt;
== Example: A METAL Meta-Analysis Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#THIS SCRIPT EXECUTES AN ANALYSIS OF EIGHT STUDIES&lt;br /&gt;
#THE RESULTS FOR EACH STUDY ARE STORED IN FILES Inputfile1.txt THROUGH Inputfile8.txt&lt;br /&gt;
&lt;br /&gt;
#LOAD THE FIRST EIGHT INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# UNCOMMENT THE NEXT LINE TO ENABLE GenomicControl CORRECTION&lt;br /&gt;
# GENOMICCONTROL ON&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIRST INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE REF_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile1.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SECOND INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile2.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE THIRD INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE A_REF OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE pvalue &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile3.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FOURTH INPUT FILE ===&lt;br /&gt;
MARKER MARKERNAME&lt;br /&gt;
ALLELE EFFECTALLELE NON_EFFECT_ALLELE&lt;br /&gt;
EFFECT EFFECT1&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT NONMISS&lt;br /&gt;
PROCESS inputfile4.txt &lt;br /&gt;
&lt;br /&gt;
# === CARRY OUT AN INTERIM ANALYSIS OF THE FIRST FOUR FILES ===&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1to4_ .tbl&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
# LOAD THE NEXT FOUR INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIFTH INPUT FILE ===&lt;br /&gt;
MARKER rsid&lt;br /&gt;
ALLELE EFFECT_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE Add_p&lt;br /&gt;
WEIGHT total_N&lt;br /&gt;
SEPARATOR COMMAS&lt;br /&gt;
PROCESS inputfile5.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SIXTH INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile6.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE SEVENTH INPUT FILE ===&lt;br /&gt;
ALLELE ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT N&lt;br /&gt;
SEPARATOR WHITESPACE&lt;br /&gt;
PROCESS inputfile7.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE EIGHTH INPUT FILE ===&lt;br /&gt;
ALLELE BETA_ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE P_VAL&lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile8.txt &lt;br /&gt;
&lt;br /&gt;
#for the final meta-analysis of all 8 samples only output results if the&lt;br /&gt;
#combined weight is greater than 10000 people&lt;br /&gt;
&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1-8_ .tbl&lt;br /&gt;
MINWEIGHT 10000&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
QUIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=3221</id>
		<title>METAL Documentation</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=3221"/>
		<updated>2011-05-25T15:15:47Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Specifying Weights in P-value Based Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Useful Wiki Pages ==&lt;br /&gt;
&lt;br /&gt;
There are a few pages in this Wiki that may be useful to METAL users. Here are links to key pages:&lt;br /&gt;
&lt;br /&gt;
* The [[METAL Program|METAL Home Page]]&lt;br /&gt;
&lt;br /&gt;
* The [[METAL Quick Start|METAL Quick Start Tutorial]]&lt;br /&gt;
&lt;br /&gt;
* The [[METAL FAQ]]&lt;br /&gt;
&lt;br /&gt;
* The [[METAL Command Reference]]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
METAL was developed by Goncalo Abecasis, Yun Li and Cristen Willer ([http://www.sph.umich.edu/csg/abecasis/publications/pdf/Bioinformatics.vol.26-pp.2190.pdf manuscript available here]). The first version was developed in 2007 and was used for the analyses presented in [http://www.sph.umich.edu/csg/abecasis/publications/18193045.html Sanna et al (2008)] and [http://www.sph.umich.edu/csg/abecasis/publications/18193043.html Willer et al (2008)]. Since then, it has become quite a popular tool for the analysis of genomewide association scans.&lt;br /&gt;
&lt;br /&gt;
== Brief Description ==&lt;br /&gt;
&lt;br /&gt;
METAL is a tool for meta-analysis genomewide association scans. METAL can combine either (a) test statistics and standard errors or (b) p-values across studies (taking sample size and direction of effect into account).  METAL analysis is a convenient alternative to a direct analysis of merged data from multiple studies. It is especially appropriate when data from the individual studies cannot be analyzed together because of differences in ethnicity, phenotype distribution, gender or constraints in sharing of individual level data imposed. Meta-analysis results in little or no loss of efficiency compared to analysis of a combined dataset including data from all individual studies. &lt;br /&gt;
&lt;br /&gt;
== Approach ==&lt;br /&gt;
&lt;br /&gt;
One of the most common questions we receive is about the approach used by METAL to carry out a meta-analysis using p-values as input. The process is actually quite simple! First, for each marker, a reference allele is selected and a z-statistic characterizing the evidence for association is calculated. The z-statistic summarizes the magnitude and the direction of effect relative to the reference allele and all studies are aligned to the same reference allele.  Next, an overall z-statistic and p-value are then calculated from a weighted sum of the individual statistics. Weights are proportional to the square-root of the number of individuals examined in each sample and selected such that the squared weights sum to 1.0. For samples that contain related individuals, a smaller ‘effective’ sample size may be used, but simulations suggest that modest changes in the effective sample size have very little impact on the final p-value.&lt;br /&gt;
&lt;br /&gt;
== Basic Usage Instructions ==&lt;br /&gt;
&lt;br /&gt;
METAL is a command line tool. It is typically run from a Linux, Unix or DOS prompt by invoking the command &amp;lt;code&amp;gt;metal&amp;lt;/code&amp;gt;. Analyses can be run interactively or a simple script can be provided as input. Interactive analyses are usually convenient when learning how to use METAL, whereas the scripting approach is preferred for production use (as it allows analyses to be conveniently repeated).  An example METAL script is included at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
METAL has lots of options and here we have listed some common ones that, hopefully, will help you get started. &lt;br /&gt;
&lt;br /&gt;
=== Help! ===&lt;br /&gt;
&lt;br /&gt;
Issuing the &amp;lt;code&amp;gt;HELP&amp;lt;/code&amp;gt; command lists all available commands and the current settings for each option. The list of all available commands is also available in the [[METAL Command Reference]].&lt;br /&gt;
&lt;br /&gt;
=== Input File Separators ===&lt;br /&gt;
&lt;br /&gt;
METAL expects that each set of results will be summarized in a table. This table must be stored in a text file but otherwise METAL is quite flexible about details such as column separators, column headers and the like. This does mean that an essential bit of information needed before any meta-analysis is a description of each input file.&lt;br /&gt;
&lt;br /&gt;
The first thing you should specify is the column separator. By default, METAL assumes columns are separated by whitespace (which consists of any combination of space and tab characters). You can also specify:&lt;br /&gt;
&lt;br /&gt;
   SEPARATOR  WHITESPACE    - the default&lt;br /&gt;
   SEPARATOR  COMMA         - for comma delimited files that are popular in some platforms&lt;br /&gt;
   SEPARATOR  TAB           - columns separated by a single tab, so that consecutive tabs indicate an empty column&lt;br /&gt;
&lt;br /&gt;
=== Input File Columns ===&lt;br /&gt;
&lt;br /&gt;
Each input file should include the following information:&lt;br /&gt;
&lt;br /&gt;
* A column with marker name, which should be consistent across studies&lt;br /&gt;
* A column indicating the tested allele&lt;br /&gt;
* A column indicating the other allele&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a sample size weighted analysis (based on p-values), you will also need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the direction of effect for the tested allele&lt;br /&gt;
* A column indicating the corresponding p-value&lt;br /&gt;
* An optional column indicating the sample size (if the sample size varies by marker)&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a meta-analysis based on standard errors, you will need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the estimated effect size for each marker&lt;br /&gt;
* A column indicating the standard error of this effect size estimate&lt;br /&gt;
&lt;br /&gt;
The header for each of these columns must be specified so that METAL knows how to interpret the data. As noted below, additional columns including allele frequency information, strand information, and others can also be present.&lt;br /&gt;
&lt;br /&gt;
Here is a typical set of commands that would describe a table where the headers SNP, RefAllele, NonRefAllele, Pvalue and Beta correspond to the MARKER, ALLELE 1 and 2, PVALUE and EFFECT columns:&lt;br /&gt;
&lt;br /&gt;
  MARKERLABEL   SNP&lt;br /&gt;
  ALLELELABELS  RefAllele NonRefAllele&lt;br /&gt;
  PVALUELABEL   P-value&lt;br /&gt;
  EFFECTLABEL   Effect&lt;br /&gt;
&lt;br /&gt;
These can be abbreviated as:&lt;br /&gt;
&lt;br /&gt;
  MARKER        SNP&lt;br /&gt;
  ALLELE        RefAllele NonRefAllele&lt;br /&gt;
  PVALUE        P-value&lt;br /&gt;
  EFFECT        Effect&lt;br /&gt;
&lt;br /&gt;
=== Specifying Weights in P-value Based Analysis ===&lt;br /&gt;
&lt;br /&gt;
The weight for each MARKER can be stored in a column in the table (specified with the &amp;lt;code&amp;gt;WEIGHTLABEL&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;WEIGHT&amp;lt;/code&amp;gt; commands).&lt;br /&gt;
&lt;br /&gt;
  WEIGHT       N&lt;br /&gt;
&lt;br /&gt;
  Alternatively, the same weight can be used for all markers for that inputfile (in which case the fixed weight can be set with the &amp;lt;code&amp;gt;DEFAULTWEIGHT&amp;lt;/code&amp;gt; command).  The WEIGHTLABEL command takes precedence over the DEFAULTWEIGHT command, so the WEIGHT column label in use must not match any columns in the inputfile.&lt;br /&gt;
&lt;br /&gt;
  WEIGHT          DONTUSECOLUMN&lt;br /&gt;
  DEFAULTWEIGHT   1000&lt;br /&gt;
&lt;br /&gt;
=== Reading Each Input File ===&lt;br /&gt;
&lt;br /&gt;
Once all appropriate headers have been specified, issuing the &amp;lt;code&amp;gt;PROCESS&amp;lt;/code&amp;gt; command will read an input file and update summary statistics to take the results it contains into account. Thus:&lt;br /&gt;
&lt;br /&gt;
  PROCESS      study1-results.tbl&lt;br /&gt;
&lt;br /&gt;
=== Performing the Final Analysis ===&lt;br /&gt;
&lt;br /&gt;
Once all input files have been processed, simply issue the &amp;lt;code&amp;gt;ANALYZE&amp;lt;/code&amp;gt; command to execute a meta-analysis. If you&#039;d like to execute interim analysis that include only a subset of the studies, issue the ANALYZE command after the corresponding input files have been processed.&lt;br /&gt;
&lt;br /&gt;
  ANALYZE&lt;br /&gt;
&lt;br /&gt;
To allow for heterogeneity, use the &amp;lt;code&amp;gt;ANALYZE HETEROGENEITY&amp;lt;/code&amp;gt; command. This command will take a little longer to run, because it requires each input file to be examined twice. The METAL heterogeneity analysis requires a second pass of analysis to decide whether observed effect sizes (or test statistics) are homogeneous across samples.  The resulting heterogeneity statistic has n-1 degrees of freedom for n samples.&lt;br /&gt;
&lt;br /&gt;
  ANALYZE HETEROGENEITY&lt;br /&gt;
&lt;br /&gt;
METAL does not require that all input files report a result for every marker.  Any available data is used.  To restrict the output to only markers that have at least a specific number of individuals analysed (or weight), use a command like the following:&lt;br /&gt;
&lt;br /&gt;
  MINWEIGHT 10000&lt;br /&gt;
&lt;br /&gt;
For example to restrict the output to show only Markers with a total sample size of at least 10,000 individuals.&lt;br /&gt;
&lt;br /&gt;
== Additional Analysis Options ==&lt;br /&gt;
&lt;br /&gt;
=== Selecting an Analysis Scheme ===&lt;br /&gt;
&lt;br /&gt;
  SCHEME SAMPLESIZE        - default approach, uses p-value and direction of effect, weighted according to sample size&lt;br /&gt;
  SCHEME STDERR            - classical approach, uses effect size estimates and standard errors&lt;br /&gt;
  STDERR SE                - specify the label for the standard error column.&lt;br /&gt;
&lt;br /&gt;
By default, METAL combines p-values across studies taking into account a study specific weight (typically, the sample size) and direction of effect. This behavior can be requested explicitly with the &amp;lt;code&amp;gt;SCHEME SAMPLESIZE&amp;lt;/code&amp;gt; command. An alternative can be requested with the &amp;lt;code&amp;gt;SCHEME STDERR&amp;lt;/code&amp;gt; command and weights effect size estimates using the inverse of the corresponding standard errors. To enable this option, you will also need to specify which of your input columns contains standard error information using the &amp;lt;code&amp;gt;STDERRLABEL&amp;lt;/code&amp;gt; command (or &amp;lt;code&amp;gt;STDERR&amp;lt;/code&amp;gt; for short). While standard error based weights are more common in the biostatistical literature, if you decide to use this approach, it is very important to ensure that effect size estimates (&#039;&#039;beta&#039;&#039; coefficients) and standard errors use the same units in all studies (i.e. make sure that the exact same trait was examined in each study and that the same transformations were applied). Inconsistent use of measurement units across studies is the most common cause of discrepancies between these two analysis strategies.&lt;br /&gt;
&lt;br /&gt;
=== Genomic Control Correction ===&lt;br /&gt;
&lt;br /&gt;
   GENOMICCONTROL OFF      - the default, no adjustment to test statistics&lt;br /&gt;
   GENOMICCONTROL ON       - automatically correct test statistics to account for small amounts of population stratification or unaccounted for relatedness&lt;br /&gt;
   GENOMICCONTROL [value]  - correct test statistics using the specified inflation factor&lt;br /&gt;
&lt;br /&gt;
METAL has the ability to apply a genomic control correction to all input files.  METAL will estimate the inflation of the test statistic by comparing the median test statistic to that expected by chance, and then apply the genomic control correction to the p-values (for SAMPLESIZE weighted meta-analysis) or the standard error (for STDERR weighted meta-analysis).  This should only be applied to files with whole genome data (i.e. should not be used for settings where results are only available for a candidate locus or a small number of SNPs selected for follow-up of [[GWAS]] results). Genomic control settings can be customized for each input file.  We recommend applying genomic control correction to all input files that include genomewide data and, in addition, to the meta-analysis results. To apply genomic control to the meta-analysis results, just perform an initial meta-analysis and then load the initial set of results into METAL to get final, genomic control adjusted results.&lt;br /&gt;
&lt;br /&gt;
=== Strand Information ===&lt;br /&gt;
&lt;br /&gt;
   USESTRAND   ON&lt;br /&gt;
   STRANDLABEL StrandColumnHeading&lt;br /&gt;
&lt;br /&gt;
Input files can contain a column that indicates which strand the alleles are coded on (given as +/-).  If this column is present, you should issue the &amp;lt;code&amp;gt;USESTRAND ON&amp;lt;/code&amp;gt; command and specify an appropriate header with the &amp;lt;code&amp;gt;STRANDLABEL&amp;lt;/code&amp;gt; command.  If USESTRAND is off, the strand is assumed to be “+” for all SNPs, although obvious strand problems are identified by METAL and appropriately handled (for example, when one study provides A/G alleles and a different study provides C/T alleles).&lt;br /&gt;
&lt;br /&gt;
=== Filtering ===&lt;br /&gt;
&lt;br /&gt;
Custom filters can be used to select SNPs for inclusion in the meta-analysis.  This can be used, for example, to select SNPs within a specified minor-allele frequency range for analysis. &lt;br /&gt;
&lt;br /&gt;
Here are some possible filters:&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER N &amp;gt; 1000&lt;br /&gt;
   ADDFILTER MAF &amp;gt; 0.01&lt;br /&gt;
&lt;br /&gt;
Together, these two filters would only consider entries where the value in the N column is greater than 1000 and the value in the MAF column is also greater than 0.01.&lt;br /&gt;
&lt;br /&gt;
Filters can be defined using the &amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;=, =, != and IN operators. The IS operator tests membership in a set. For example to restrict analysis to three interesting SNPs, use (&#039;&#039;note absence of spaces in list of SNPs&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER MARKER_ID IN (rs1234,rs123456,rs123)&lt;br /&gt;
&lt;br /&gt;
To remove all previously defined filters, use the command:&lt;br /&gt;
&lt;br /&gt;
   REMOVEFILTERS&lt;br /&gt;
&lt;br /&gt;
=== Verbose Mode ===&lt;br /&gt;
&lt;br /&gt;
   VERBOSE ON&lt;br /&gt;
&lt;br /&gt;
METAL allows for complete output of individual summary statistics for all SNPs in all input files.  This can create a very large file and should be used with caution.  Typically, one should create custom filters  to restrict analyses to interesting SNPs of interest before using this option.  This option can be useful for comparing direction of effect across many studies since METAL takes care of all the strand flipping and provides the direction of effect relative to the same allele.  This is also a way to double-check that the expected data are being used appropriately by METAL.&lt;br /&gt;
&lt;br /&gt;
=== Lenient Mode ===&lt;br /&gt;
 &lt;br /&gt;
    COLUMNCOUNTING STRICT         - requires expected number of columns in every row&lt;br /&gt;
    COLUMNCOUNTING LENIENT        - tries to interpret rows with fewer columns than expected&lt;br /&gt;
&lt;br /&gt;
By default, METAL will skip lines in each input file that don&#039;t have the expected number of columns. This is usually a good idea because it avoids producing incorrect results when a column is missing. Sometimes (for example, when there are optional extra columns at the end of each line), the &amp;lt;code&amp;gt;COLUMNCOUNTING LENIENT&amp;lt;/code&amp;gt; option can be useful.&lt;br /&gt;
&lt;br /&gt;
=== Tracking Allele Frequencies ===&lt;br /&gt;
&lt;br /&gt;
   AVERAGEFREQ ON&lt;br /&gt;
   MINMAXFREQ ON&lt;br /&gt;
&lt;br /&gt;
METAL can optionally track the effect allele frequency across all files and report the mean, minimum and maximum effect allele frequency.  These can be quite useful to check that allele frequencies are similar across different cohorts after METAL performs all strand alignment. Large differences in allele frequencies across studies can suggest inconsistent naming of reference alleles across studies. METAL requires all input files to have an allele frequency column when this feature is turned on. To specify the column header for allele frequency information, use the &amp;lt;code&amp;gt;FREQLABEL&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Custom Variables ===&lt;br /&gt;
&lt;br /&gt;
We allow users to keep cumulative counts of custom variables across input files.  An example of this might be to keep track of the sample size when performing standard-error weighted meta-analysis.  The name of the custom variable should be defined once, before input files are loaded.  The corresponding column label in each input file can be specified using the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command. For example, to create a custom variable labeled TotalSampleSize that tallies the total of the N column across files, one could issue the commands:&lt;br /&gt;
&lt;br /&gt;
  CUSTOMVARIABLE TotalSampleSize&lt;br /&gt;
  LABEL TotalSampleSize as N&lt;br /&gt;
&lt;br /&gt;
If needed, the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command can be used multiple times to customize column headers for each input file.&lt;br /&gt;
&lt;br /&gt;
=== Input File Recommendations ===&lt;br /&gt;
&lt;br /&gt;
We strongly recommend that both allele labels, corresponding to the the effect allele and non-effect allele, should be provided for all SNPs.  As long as both allele columns are given for each input file, METAL appropriately accounts for situations when different input files use different reference alleles. Alleles can be coded numerically (A=1,C=2,G=3,T=4) or alphabetically (A,C,G,T,a,c,g,t) and can be on either strand if not an A/T or C/G SNP.  For A/T or C/G SNPs, METAL requires SNPs to be on a consistent strand in different input files for the results to be interpretable.  For other SNPs, METAL can automatically identify and resolve strand inconsistencies. &lt;br /&gt;
&lt;br /&gt;
P-values that are &amp;amp;lt; 0.0, &amp;amp;gt; 1.0 or non-numeric will be treated as missing and generate a warning.  &lt;br /&gt;
&lt;br /&gt;
The EFFECT column can have positive and negative values (beta values from regression, for example), or simply directions of effect relative to the reference allele, listed as “+” and “-“.  An EFFECT of “+” (or any positive number) with respect to the reference allele A (or effect allele A), for example, represents a case where increasing number of copies of allele A are correlated with increasing trait values. For discrete traits, it is common to report odds ratios, which are always positive. In this case, to calculate the direction of effect, one should look at the log of the odds ratio. METAL can compute the odds ratio for you if you specify &amp;lt;code&amp;gt;EFFECT log(ODDS_RATIO_COLUMN)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To perform odds-ratio based meta-analysis, select SCHEME STDERR at the beginning of the script.  Then, for each file, provide the natural log of the odds ratio as the EFFECT column or another appropriate statistic (such as the corresponding regression coefficient from a logistic regression analysis).&lt;br /&gt;
&lt;br /&gt;
== Example: A METAL Meta-Analysis Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#THIS SCRIPT EXECUTES AN ANALYSIS OF EIGHT STUDIES&lt;br /&gt;
#THE RESULTS FOR EACH STUDY ARE STORED IN FILES Inputfile1.txt THROUGH Inputfile8.txt&lt;br /&gt;
&lt;br /&gt;
#LOAD THE FIRST EIGHT INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# UNCOMMENT THE NEXT LINE TO ENABLE GenomicControl CORRECTION&lt;br /&gt;
# GENOMICCONTROL ON&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIRST INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE REF_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile1.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SECOND INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile2.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE THIRD INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE A_REF OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE pvalue &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile3.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FOURTH INPUT FILE ===&lt;br /&gt;
MARKER MARKERNAME&lt;br /&gt;
ALLELE EFFECTALLELE NON_EFFECT_ALLELE&lt;br /&gt;
EFFECT EFFECT1&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT NONMISS&lt;br /&gt;
PROCESS inputfile4.txt &lt;br /&gt;
&lt;br /&gt;
# === CARRY OUT AN INTERIM ANALYSIS OF THE FIRST FOUR FILES ===&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1to4_ .tbl&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
# LOAD THE NEXT FOUR INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIFTH INPUT FILE ===&lt;br /&gt;
MARKER rsid&lt;br /&gt;
ALLELE EFFECT_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE Add_p&lt;br /&gt;
WEIGHT total_N&lt;br /&gt;
SEPARATOR COMMAS&lt;br /&gt;
PROCESS inputfile5.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SIXTH INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile6.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE SEVENTH INPUT FILE ===&lt;br /&gt;
ALLELE ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT N&lt;br /&gt;
SEPARATOR WHITESPACE&lt;br /&gt;
PROCESS inputfile7.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE EIGHTH INPUT FILE ===&lt;br /&gt;
ALLELE BETA_ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE P_VAL&lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile8.txt &lt;br /&gt;
&lt;br /&gt;
#for the final meta-analysis of all 8 samples only output results if the&lt;br /&gt;
#combined weight is greater than 10000 people&lt;br /&gt;
&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1-8_ .tbl&lt;br /&gt;
MINWEIGHT 10000&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
QUIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=3220</id>
		<title>METAL Documentation</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=3220"/>
		<updated>2011-05-25T15:14:00Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Specifying Weights in P-value Based Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Useful Wiki Pages ==&lt;br /&gt;
&lt;br /&gt;
There are a few pages in this Wiki that may be useful to METAL users. Here are links to key pages:&lt;br /&gt;
&lt;br /&gt;
* The [[METAL Program|METAL Home Page]]&lt;br /&gt;
&lt;br /&gt;
* The [[METAL Quick Start|METAL Quick Start Tutorial]]&lt;br /&gt;
&lt;br /&gt;
* The [[METAL FAQ]]&lt;br /&gt;
&lt;br /&gt;
* The [[METAL Command Reference]]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
METAL was developed by Goncalo Abecasis, Yun Li and Cristen Willer ([http://www.sph.umich.edu/csg/abecasis/publications/pdf/Bioinformatics.vol.26-pp.2190.pdf manuscript available here]). The first version was developed in 2007 and was used for the analyses presented in [http://www.sph.umich.edu/csg/abecasis/publications/18193045.html Sanna et al (2008)] and [http://www.sph.umich.edu/csg/abecasis/publications/18193043.html Willer et al (2008)]. Since then, it has become quite a popular tool for the analysis of genomewide association scans.&lt;br /&gt;
&lt;br /&gt;
== Brief Description ==&lt;br /&gt;
&lt;br /&gt;
METAL is a tool for meta-analysis genomewide association scans. METAL can combine either (a) test statistics and standard errors or (b) p-values across studies (taking sample size and direction of effect into account).  METAL analysis is a convenient alternative to a direct analysis of merged data from multiple studies. It is especially appropriate when data from the individual studies cannot be analyzed together because of differences in ethnicity, phenotype distribution, gender or constraints in sharing of individual level data imposed. Meta-analysis results in little or no loss of efficiency compared to analysis of a combined dataset including data from all individual studies. &lt;br /&gt;
&lt;br /&gt;
== Approach ==&lt;br /&gt;
&lt;br /&gt;
One of the most common questions we receive is about the approach used by METAL to carry out a meta-analysis using p-values as input. The process is actually quite simple! First, for each marker, a reference allele is selected and a z-statistic characterizing the evidence for association is calculated. The z-statistic summarizes the magnitude and the direction of effect relative to the reference allele and all studies are aligned to the same reference allele.  Next, an overall z-statistic and p-value are then calculated from a weighted sum of the individual statistics. Weights are proportional to the square-root of the number of individuals examined in each sample and selected such that the squared weights sum to 1.0. For samples that contain related individuals, a smaller ‘effective’ sample size may be used, but simulations suggest that modest changes in the effective sample size have very little impact on the final p-value.&lt;br /&gt;
&lt;br /&gt;
== Basic Usage Instructions ==&lt;br /&gt;
&lt;br /&gt;
METAL is a command line tool. It is typically run from a Linux, Unix or DOS prompt by invoking the command &amp;lt;code&amp;gt;metal&amp;lt;/code&amp;gt;. Analyses can be run interactively or a simple script can be provided as input. Interactive analyses are usually convenient when learning how to use METAL, whereas the scripting approach is preferred for production use (as it allows analyses to be conveniently repeated).  An example METAL script is included at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
METAL has lots of options and here we have listed some common ones that, hopefully, will help you get started. &lt;br /&gt;
&lt;br /&gt;
=== Help! ===&lt;br /&gt;
&lt;br /&gt;
Issuing the &amp;lt;code&amp;gt;HELP&amp;lt;/code&amp;gt; command lists all available commands and the current settings for each option. The list of all available commands is also available in the [[METAL Command Reference]].&lt;br /&gt;
&lt;br /&gt;
=== Input File Separators ===&lt;br /&gt;
&lt;br /&gt;
METAL expects that each set of results will be summarized in a table. This table must be stored in a text file but otherwise METAL is quite flexible about details such as column separators, column headers and the like. This does mean that an essential bit of information needed before any meta-analysis is a description of each input file.&lt;br /&gt;
&lt;br /&gt;
The first thing you should specify is the column separator. By default, METAL assumes columns are separated by whitespace (which consists of any combination of space and tab characters). You can also specify:&lt;br /&gt;
&lt;br /&gt;
   SEPARATOR  WHITESPACE    - the default&lt;br /&gt;
   SEPARATOR  COMMA         - for comma delimited files that are popular in some platforms&lt;br /&gt;
   SEPARATOR  TAB           - columns separated by a single tab, so that consecutive tabs indicate an empty column&lt;br /&gt;
&lt;br /&gt;
=== Input File Columns ===&lt;br /&gt;
&lt;br /&gt;
Each input file should include the following information:&lt;br /&gt;
&lt;br /&gt;
* A column with marker name, which should be consistent across studies&lt;br /&gt;
* A column indicating the tested allele&lt;br /&gt;
* A column indicating the other allele&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a sample size weighted analysis (based on p-values), you will also need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the direction of effect for the tested allele&lt;br /&gt;
* A column indicating the corresponding p-value&lt;br /&gt;
* An optional column indicating the sample size (if the sample size varies by marker)&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a meta-analysis based on standard errors, you will need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the estimated effect size for each marker&lt;br /&gt;
* A column indicating the standard error of this effect size estimate&lt;br /&gt;
&lt;br /&gt;
The header for each of these columns must be specified so that METAL knows how to interpret the data. As noted below, additional columns including allele frequency information, strand information, and others can also be present.&lt;br /&gt;
&lt;br /&gt;
Here is a typical set of commands that would describe a table where the headers SNP, RefAllele, NonRefAllele, Pvalue and Beta correspond to the MARKER, ALLELE 1 and 2, PVALUE and EFFECT columns:&lt;br /&gt;
&lt;br /&gt;
  MARKERLABEL   SNP&lt;br /&gt;
  ALLELELABELS  RefAllele NonRefAllele&lt;br /&gt;
  PVALUELABEL   P-value&lt;br /&gt;
  EFFECTLABEL   Effect&lt;br /&gt;
&lt;br /&gt;
These can be abbreviated as:&lt;br /&gt;
&lt;br /&gt;
  MARKER        SNP&lt;br /&gt;
  ALLELE        RefAllele NonRefAllele&lt;br /&gt;
  PVALUE        P-value&lt;br /&gt;
  EFFECT        Effect&lt;br /&gt;
&lt;br /&gt;
=== Specifying Weights in P-value Based Analysis ===&lt;br /&gt;
&lt;br /&gt;
The weight for each MARKER can be stored in a column in the table (specified with the &amp;lt;code&amp;gt;WEIGHTLABEL&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;WEIGHT&amp;lt;/code&amp;gt; commands).  Alternatively, the same weight can be used for all markers for that inputfile (in which case the fixed weight can be set with the &amp;lt;code&amp;gt;DEFAULTWEIGHT&amp;lt;/code&amp;gt; command).  The WEIGHTLABEL command takes precedence over the DEFAULTWEIGHT command, so the WEIGHT column label in use must not match any columns in the inputfile.&lt;br /&gt;
&lt;br /&gt;
=== Reading Each Input File ===&lt;br /&gt;
&lt;br /&gt;
Once all appropriate headers have been specified, issuing the &amp;lt;code&amp;gt;PROCESS&amp;lt;/code&amp;gt; command will read an input file and update summary statistics to take the results it contains into account. Thus:&lt;br /&gt;
&lt;br /&gt;
  PROCESS      study1-results.tbl&lt;br /&gt;
&lt;br /&gt;
=== Performing the Final Analysis ===&lt;br /&gt;
&lt;br /&gt;
Once all input files have been processed, simply issue the &amp;lt;code&amp;gt;ANALYZE&amp;lt;/code&amp;gt; command to execute a meta-analysis. If you&#039;d like to execute interim analysis that include only a subset of the studies, issue the ANALYZE command after the corresponding input files have been processed.&lt;br /&gt;
&lt;br /&gt;
  ANALYZE&lt;br /&gt;
&lt;br /&gt;
To allow for heterogeneity, use the &amp;lt;code&amp;gt;ANALYZE HETEROGENEITY&amp;lt;/code&amp;gt; command. This command will take a little longer to run, because it requires each input file to be examined twice. The METAL heterogeneity analysis requires a second pass of analysis to decide whether observed effect sizes (or test statistics) are homogeneous across samples.  The resulting heterogeneity statistic has n-1 degrees of freedom for n samples.&lt;br /&gt;
&lt;br /&gt;
  ANALYZE HETEROGENEITY&lt;br /&gt;
&lt;br /&gt;
METAL does not require that all input files report a result for every marker.  Any available data is used.  To restrict the output to only markers that have at least a specific number of individuals analysed (or weight), use a command like the following:&lt;br /&gt;
&lt;br /&gt;
  MINWEIGHT 10000&lt;br /&gt;
&lt;br /&gt;
For example to restrict the output to show only Markers with a total sample size of at least 10,000 individuals.&lt;br /&gt;
&lt;br /&gt;
== Additional Analysis Options ==&lt;br /&gt;
&lt;br /&gt;
=== Selecting an Analysis Scheme ===&lt;br /&gt;
&lt;br /&gt;
  SCHEME SAMPLESIZE        - default approach, uses p-value and direction of effect, weighted according to sample size&lt;br /&gt;
  SCHEME STDERR            - classical approach, uses effect size estimates and standard errors&lt;br /&gt;
  STDERR SE                - specify the label for the standard error column.&lt;br /&gt;
&lt;br /&gt;
By default, METAL combines p-values across studies taking into account a study specific weight (typically, the sample size) and direction of effect. This behavior can be requested explicitly with the &amp;lt;code&amp;gt;SCHEME SAMPLESIZE&amp;lt;/code&amp;gt; command. An alternative can be requested with the &amp;lt;code&amp;gt;SCHEME STDERR&amp;lt;/code&amp;gt; command and weights effect size estimates using the inverse of the corresponding standard errors. To enable this option, you will also need to specify which of your input columns contains standard error information using the &amp;lt;code&amp;gt;STDERRLABEL&amp;lt;/code&amp;gt; command (or &amp;lt;code&amp;gt;STDERR&amp;lt;/code&amp;gt; for short). While standard error based weights are more common in the biostatistical literature, if you decide to use this approach, it is very important to ensure that effect size estimates (&#039;&#039;beta&#039;&#039; coefficients) and standard errors use the same units in all studies (i.e. make sure that the exact same trait was examined in each study and that the same transformations were applied). Inconsistent use of measurement units across studies is the most common cause of discrepancies between these two analysis strategies.&lt;br /&gt;
&lt;br /&gt;
=== Genomic Control Correction ===&lt;br /&gt;
&lt;br /&gt;
   GENOMICCONTROL OFF      - the default, no adjustment to test statistics&lt;br /&gt;
   GENOMICCONTROL ON       - automatically correct test statistics to account for small amounts of population stratification or unaccounted for relatedness&lt;br /&gt;
   GENOMICCONTROL [value]  - correct test statistics using the specified inflation factor&lt;br /&gt;
&lt;br /&gt;
METAL has the ability to apply a genomic control correction to all input files.  METAL will estimate the inflation of the test statistic by comparing the median test statistic to that expected by chance, and then apply the genomic control correction to the p-values (for SAMPLESIZE weighted meta-analysis) or the standard error (for STDERR weighted meta-analysis).  This should only be applied to files with whole genome data (i.e. should not be used for settings where results are only available for a candidate locus or a small number of SNPs selected for follow-up of [[GWAS]] results). Genomic control settings can be customized for each input file.  We recommend applying genomic control correction to all input files that include genomewide data and, in addition, to the meta-analysis results. To apply genomic control to the meta-analysis results, just perform an initial meta-analysis and then load the initial set of results into METAL to get final, genomic control adjusted results.&lt;br /&gt;
&lt;br /&gt;
=== Strand Information ===&lt;br /&gt;
&lt;br /&gt;
   USESTRAND   ON&lt;br /&gt;
   STRANDLABEL StrandColumnHeading&lt;br /&gt;
&lt;br /&gt;
Input files can contain a column that indicates which strand the alleles are coded on (given as +/-).  If this column is present, you should issue the &amp;lt;code&amp;gt;USESTRAND ON&amp;lt;/code&amp;gt; command and specify an appropriate header with the &amp;lt;code&amp;gt;STRANDLABEL&amp;lt;/code&amp;gt; command.  If USESTRAND is off, the strand is assumed to be “+” for all SNPs, although obvious strand problems are identified by METAL and appropriately handled (for example, when one study provides A/G alleles and a different study provides C/T alleles).&lt;br /&gt;
&lt;br /&gt;
=== Filtering ===&lt;br /&gt;
&lt;br /&gt;
Custom filters can be used to select SNPs for inclusion in the meta-analysis.  This can be used, for example, to select SNPs within a specified minor-allele frequency range for analysis. &lt;br /&gt;
&lt;br /&gt;
Here are some possible filters:&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER N &amp;gt; 1000&lt;br /&gt;
   ADDFILTER MAF &amp;gt; 0.01&lt;br /&gt;
&lt;br /&gt;
Together, these two filters would only consider entries where the value in the N column is greater than 1000 and the value in the MAF column is also greater than 0.01.&lt;br /&gt;
&lt;br /&gt;
Filters can be defined using the &amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;=, =, != and IN operators. The IS operator tests membership in a set. For example to restrict analysis to three interesting SNPs, use (&#039;&#039;note absence of spaces in list of SNPs&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER MARKER_ID IN (rs1234,rs123456,rs123)&lt;br /&gt;
&lt;br /&gt;
To remove all previously defined filters, use the command:&lt;br /&gt;
&lt;br /&gt;
   REMOVEFILTERS&lt;br /&gt;
&lt;br /&gt;
=== Verbose Mode ===&lt;br /&gt;
&lt;br /&gt;
   VERBOSE ON&lt;br /&gt;
&lt;br /&gt;
METAL allows for complete output of individual summary statistics for all SNPs in all input files.  This can create a very large file and should be used with caution.  Typically, one should create custom filters  to restrict analyses to interesting SNPs of interest before using this option.  This option can be useful for comparing direction of effect across many studies since METAL takes care of all the strand flipping and provides the direction of effect relative to the same allele.  This is also a way to double-check that the expected data are being used appropriately by METAL.&lt;br /&gt;
&lt;br /&gt;
=== Lenient Mode ===&lt;br /&gt;
 &lt;br /&gt;
    COLUMNCOUNTING STRICT         - requires expected number of columns in every row&lt;br /&gt;
    COLUMNCOUNTING LENIENT        - tries to interpret rows with fewer columns than expected&lt;br /&gt;
&lt;br /&gt;
By default, METAL will skip lines in each input file that don&#039;t have the expected number of columns. This is usually a good idea because it avoids producing incorrect results when a column is missing. Sometimes (for example, when there are optional extra columns at the end of each line), the &amp;lt;code&amp;gt;COLUMNCOUNTING LENIENT&amp;lt;/code&amp;gt; option can be useful.&lt;br /&gt;
&lt;br /&gt;
=== Tracking Allele Frequencies ===&lt;br /&gt;
&lt;br /&gt;
   AVERAGEFREQ ON&lt;br /&gt;
   MINMAXFREQ ON&lt;br /&gt;
&lt;br /&gt;
METAL can optionally track the effect allele frequency across all files and report the mean, minimum and maximum effect allele frequency.  These can be quite useful to check that allele frequencies are similar across different cohorts after METAL performs all strand alignment. Large differences in allele frequencies across studies can suggest inconsistent naming of reference alleles across studies. METAL requires all input files to have an allele frequency column when this feature is turned on. To specify the column header for allele frequency information, use the &amp;lt;code&amp;gt;FREQLABEL&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Custom Variables ===&lt;br /&gt;
&lt;br /&gt;
We allow users to keep cumulative counts of custom variables across input files.  An example of this might be to keep track of the sample size when performing standard-error weighted meta-analysis.  The name of the custom variable should be defined once, before input files are loaded.  The corresponding column label in each input file can be specified using the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command. For example, to create a custom variable labeled TotalSampleSize that tallies the total of the N column across files, one could issue the commands:&lt;br /&gt;
&lt;br /&gt;
  CUSTOMVARIABLE TotalSampleSize&lt;br /&gt;
  LABEL TotalSampleSize as N&lt;br /&gt;
&lt;br /&gt;
If needed, the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command can be used multiple times to customize column headers for each input file.&lt;br /&gt;
&lt;br /&gt;
=== Input File Recommendations ===&lt;br /&gt;
&lt;br /&gt;
We strongly recommend that both allele labels, corresponding to the the effect allele and non-effect allele, should be provided for all SNPs.  As long as both allele columns are given for each input file, METAL appropriately accounts for situations when different input files use different reference alleles. Alleles can be coded numerically (A=1,C=2,G=3,T=4) or alphabetically (A,C,G,T,a,c,g,t) and can be on either strand if not an A/T or C/G SNP.  For A/T or C/G SNPs, METAL requires SNPs to be on a consistent strand in different input files for the results to be interpretable.  For other SNPs, METAL can automatically identify and resolve strand inconsistencies. &lt;br /&gt;
&lt;br /&gt;
P-values that are &amp;amp;lt; 0.0, &amp;amp;gt; 1.0 or non-numeric will be treated as missing and generate a warning.  &lt;br /&gt;
&lt;br /&gt;
The EFFECT column can have positive and negative values (beta values from regression, for example), or simply directions of effect relative to the reference allele, listed as “+” and “-“.  An EFFECT of “+” (or any positive number) with respect to the reference allele A (or effect allele A), for example, represents a case where increasing number of copies of allele A are correlated with increasing trait values. For discrete traits, it is common to report odds ratios, which are always positive. In this case, to calculate the direction of effect, one should look at the log of the odds ratio. METAL can compute the odds ratio for you if you specify &amp;lt;code&amp;gt;EFFECT log(ODDS_RATIO_COLUMN)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To perform odds-ratio based meta-analysis, select SCHEME STDERR at the beginning of the script.  Then, for each file, provide the natural log of the odds ratio as the EFFECT column or another appropriate statistic (such as the corresponding regression coefficient from a logistic regression analysis).&lt;br /&gt;
&lt;br /&gt;
== Example: A METAL Meta-Analysis Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#THIS SCRIPT EXECUTES AN ANALYSIS OF EIGHT STUDIES&lt;br /&gt;
#THE RESULTS FOR EACH STUDY ARE STORED IN FILES Inputfile1.txt THROUGH Inputfile8.txt&lt;br /&gt;
&lt;br /&gt;
#LOAD THE FIRST EIGHT INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# UNCOMMENT THE NEXT LINE TO ENABLE GenomicControl CORRECTION&lt;br /&gt;
# GENOMICCONTROL ON&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIRST INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE REF_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile1.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SECOND INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile2.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE THIRD INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE A_REF OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE pvalue &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile3.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FOURTH INPUT FILE ===&lt;br /&gt;
MARKER MARKERNAME&lt;br /&gt;
ALLELE EFFECTALLELE NON_EFFECT_ALLELE&lt;br /&gt;
EFFECT EFFECT1&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT NONMISS&lt;br /&gt;
PROCESS inputfile4.txt &lt;br /&gt;
&lt;br /&gt;
# === CARRY OUT AN INTERIM ANALYSIS OF THE FIRST FOUR FILES ===&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1to4_ .tbl&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
# LOAD THE NEXT FOUR INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIFTH INPUT FILE ===&lt;br /&gt;
MARKER rsid&lt;br /&gt;
ALLELE EFFECT_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE Add_p&lt;br /&gt;
WEIGHT total_N&lt;br /&gt;
SEPARATOR COMMAS&lt;br /&gt;
PROCESS inputfile5.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SIXTH INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile6.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE SEVENTH INPUT FILE ===&lt;br /&gt;
ALLELE ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT N&lt;br /&gt;
SEPARATOR WHITESPACE&lt;br /&gt;
PROCESS inputfile7.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE EIGHTH INPUT FILE ===&lt;br /&gt;
ALLELE BETA_ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE P_VAL&lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile8.txt &lt;br /&gt;
&lt;br /&gt;
#for the final meta-analysis of all 8 samples only output results if the&lt;br /&gt;
#combined weight is greater than 10000 people&lt;br /&gt;
&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1-8_ .tbl&lt;br /&gt;
MINWEIGHT 10000&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
QUIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=3011</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=3011"/>
		<updated>2011-03-07T03:20:04Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Specify a specific region and reference SNP to plot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Quick Start (Requirements)  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package (including [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Sources_of_SQLite_database_tables database tables]), see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. &lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date.&lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
See our [https://statgen.sph.umich.edu/locuszoom/download/ download] page for links to the latest as well as previous releases.&lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sources of information ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom uses various sources of information for annotation, positions, and calculating LD. &lt;br /&gt;
&lt;br /&gt;
For computing LD: &lt;br /&gt;
*[ftp://ftp.hapmap.org/hapmap/genotypes/2008-10_phaseII/ HapMap genotypes] for populations CEU, YRI, and JPT+CHB. &lt;br /&gt;
*[ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1 1000 Genomes genotypes] for CEU. &lt;br /&gt;
&lt;br /&gt;
For SNP, gene, and exon positions: &lt;br /&gt;
*[http://www.ncbi.nlm.nih.gov/projects/SNP/ dbSNP position] via the [http://genome.ucsc.edu UCSC Genome Browser]&lt;br /&gt;
*[http://www.ncbi.nlm.nih.gov/RefSeq/ Gene and exon positions] via the [http://genome.ucsc.edu UCSC Genome Browser].  We filtered SNPs that map to more than one location or where no allele matches the reference sequence.&lt;br /&gt;
&lt;br /&gt;
For annotation: &lt;br /&gt;
*We used various sources including RefSeq Genes (refFlat), TFBS Conserved (tfbsConsSites), and Conservation (phaseConsElements44wayPlacental), all available from the [http://genome.usc.edu UCSC Genome Browser]. &lt;br /&gt;
*[ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ Recombination rates from HapMap].&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 columns: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them.&lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. LD with the SNP with the most significant p-value in this region will be used to color data points. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
The SNP with the most significant p-value in this region will be used for estimating LD.&lt;br /&gt;
&lt;br /&gt;
=== Specifying LD source/population/build  ===&lt;br /&gt;
&lt;br /&gt;
We supply genotype files for computing LD between the reference SNP and all other SNPs within the region you are plotting. The tables below show the supported combinations of LD source, population, and build. Note that you can always provide your own LD files, see [[#User-supplied_LD|User-supplied LD]] for more information. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1000G&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Release&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Build&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Population&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 || hg18 || CEU || --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 || hg18 || YRI || --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 || hg18 || JPT+CHB || --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 || hg18 || CEU || --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 || hg18 || YRI || --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 || hg18 || JPT+CHB || --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HapMap Phase II&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Build&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Population&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 || CEU || --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 || YRI|| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 || JPT+CHB || --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to display on plot.&lt;br /&gt;
|-&lt;br /&gt;
| end &lt;br /&gt;
| End position to display on plot.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F.&lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist.&lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input|Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --end &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. See [[#Specifying_LD_source.2Fpopulation.2Fbuild|Specifying LD source/population/build]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. See [[#Specifying_LD_source.2Fpopulation.2Fbuild|Specifying LD source/population/build]] for more info. &lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| scaling factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| scaling factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for custom annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,8,7,21&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of custom annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset rug data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for recombination rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for recombination rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for recombination rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default (HapMap r22 CEU)  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Use HapMap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --end 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== An example using plotting options ===&lt;br /&gt;
&lt;br /&gt;
Note in this example the plotting options are placed at the &#039;&#039;&#039;end&#039;&#039;&#039; of the command-line, and are of the format &#039;&#039;&#039;arg&#039;&#039;&#039;=&#039;&#039;&#039;value&#039;&#039;&#039;. The value should be double-quoted if spaces are included in the value (see title= below.) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7903146 title=&amp;quot;My region&amp;quot; geneFontSize=1.1 recombColor=&amp;quot;gray&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.)&lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=3010</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=3010"/>
		<updated>2011-03-07T03:19:38Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* LocusZoom options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Quick Start (Requirements)  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package (including [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Sources_of_SQLite_database_tables database tables]), see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. &lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date.&lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
See our [https://statgen.sph.umich.edu/locuszoom/download/ download] page for links to the latest as well as previous releases.&lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sources of information ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom uses various sources of information for annotation, positions, and calculating LD. &lt;br /&gt;
&lt;br /&gt;
For computing LD: &lt;br /&gt;
*[ftp://ftp.hapmap.org/hapmap/genotypes/2008-10_phaseII/ HapMap genotypes] for populations CEU, YRI, and JPT+CHB. &lt;br /&gt;
*[ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1 1000 Genomes genotypes] for CEU. &lt;br /&gt;
&lt;br /&gt;
For SNP, gene, and exon positions: &lt;br /&gt;
*[http://www.ncbi.nlm.nih.gov/projects/SNP/ dbSNP position] via the [http://genome.ucsc.edu UCSC Genome Browser]&lt;br /&gt;
*[http://www.ncbi.nlm.nih.gov/RefSeq/ Gene and exon positions] via the [http://genome.ucsc.edu UCSC Genome Browser].  We filtered SNPs that map to more than one location or where no allele matches the reference sequence.&lt;br /&gt;
&lt;br /&gt;
For annotation: &lt;br /&gt;
*We used various sources including RefSeq Genes (refFlat), TFBS Conserved (tfbsConsSites), and Conservation (phaseConsElements44wayPlacental), all available from the [http://genome.usc.edu UCSC Genome Browser]. &lt;br /&gt;
*[ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ Recombination rates from HapMap].&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 columns: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them.&lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. LD with the SNP with the most significant p-value in this region will be used to color data points. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
The SNP with the most significant p-value in this region will be used for estimating LD.&lt;br /&gt;
&lt;br /&gt;
=== Specifying LD source/population/build  ===&lt;br /&gt;
&lt;br /&gt;
We supply genotype files for computing LD between the reference SNP and all other SNPs within the region you are plotting. The tables below show the supported combinations of LD source, population, and build. Note that you can always provide your own LD files, see [[#User-supplied_LD|User-supplied LD]] for more information. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1000G&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Release&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Build&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Population&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 || hg18 || CEU || --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 || hg18 || YRI || --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 || hg18 || JPT+CHB || --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 || hg18 || CEU || --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 || hg18 || YRI || --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 || hg18 || JPT+CHB || --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HapMap Phase II&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Build&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Population&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 || CEU || --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 || YRI|| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 || JPT+CHB || --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to display on plot.&lt;br /&gt;
|-&lt;br /&gt;
| end &lt;br /&gt;
| End position to display on plot.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F.&lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist.&lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input|Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --end &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. See [[#Specifying_LD_source.2Fpopulation.2Fbuild|Specifying LD source/population/build]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. See [[#Specifying_LD_source.2Fpopulation.2Fbuild|Specifying LD source/population/build]] for more info. &lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| scaling factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| scaling factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for custom annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,8,7,21&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of custom annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset rug data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for recombination rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for recombination rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for recombination rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default (HapMap r22 CEU)  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Use HapMap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== An example using plotting options ===&lt;br /&gt;
&lt;br /&gt;
Note in this example the plotting options are placed at the &#039;&#039;&#039;end&#039;&#039;&#039; of the command-line, and are of the format &#039;&#039;&#039;arg&#039;&#039;&#039;=&#039;&#039;&#039;value&#039;&#039;&#039;. The value should be double-quoted if spaces are included in the value (see title= below.) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7903146 title=&amp;quot;My region&amp;quot; geneFontSize=1.1 recombColor=&amp;quot;gray&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.)&lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=3009</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=3009"/>
		<updated>2011-03-07T03:19:18Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Batch mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Quick Start (Requirements)  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package (including [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Sources_of_SQLite_database_tables database tables]), see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. &lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date.&lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
See our [https://statgen.sph.umich.edu/locuszoom/download/ download] page for links to the latest as well as previous releases.&lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sources of information ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom uses various sources of information for annotation, positions, and calculating LD. &lt;br /&gt;
&lt;br /&gt;
For computing LD: &lt;br /&gt;
*[ftp://ftp.hapmap.org/hapmap/genotypes/2008-10_phaseII/ HapMap genotypes] for populations CEU, YRI, and JPT+CHB. &lt;br /&gt;
*[ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1 1000 Genomes genotypes] for CEU. &lt;br /&gt;
&lt;br /&gt;
For SNP, gene, and exon positions: &lt;br /&gt;
*[http://www.ncbi.nlm.nih.gov/projects/SNP/ dbSNP position] via the [http://genome.ucsc.edu UCSC Genome Browser]&lt;br /&gt;
*[http://www.ncbi.nlm.nih.gov/RefSeq/ Gene and exon positions] via the [http://genome.ucsc.edu UCSC Genome Browser].  We filtered SNPs that map to more than one location or where no allele matches the reference sequence.&lt;br /&gt;
&lt;br /&gt;
For annotation: &lt;br /&gt;
*We used various sources including RefSeq Genes (refFlat), TFBS Conserved (tfbsConsSites), and Conservation (phaseConsElements44wayPlacental), all available from the [http://genome.usc.edu UCSC Genome Browser]. &lt;br /&gt;
*[ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ Recombination rates from HapMap].&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 columns: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them.&lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. LD with the SNP with the most significant p-value in this region will be used to color data points. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
The SNP with the most significant p-value in this region will be used for estimating LD.&lt;br /&gt;
&lt;br /&gt;
=== Specifying LD source/population/build  ===&lt;br /&gt;
&lt;br /&gt;
We supply genotype files for computing LD between the reference SNP and all other SNPs within the region you are plotting. The tables below show the supported combinations of LD source, population, and build. Note that you can always provide your own LD files, see [[#User-supplied_LD|User-supplied LD]] for more information. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1000G&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Release&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Build&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Population&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 || hg18 || CEU || --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 || hg18 || YRI || --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 || hg18 || JPT+CHB || --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 || hg18 || CEU || --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 || hg18 || YRI || --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 || hg18 || JPT+CHB || --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HapMap Phase II&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Build&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Population&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 || CEU || --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 || YRI|| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 || JPT+CHB || --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to display on plot.&lt;br /&gt;
|-&lt;br /&gt;
| end &lt;br /&gt;
| End position to display on plot.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F.&lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist.&lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input|Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. See [[#Specifying_LD_source.2Fpopulation.2Fbuild|Specifying LD source/population/build]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. See [[#Specifying_LD_source.2Fpopulation.2Fbuild|Specifying LD source/population/build]] for more info. &lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| scaling factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| scaling factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for custom annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,8,7,21&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of custom annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset rug data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for recombination rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for recombination rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for recombination rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default (HapMap r22 CEU)  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Use HapMap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== An example using plotting options ===&lt;br /&gt;
&lt;br /&gt;
Note in this example the plotting options are placed at the &#039;&#039;&#039;end&#039;&#039;&#039; of the command-line, and are of the format &#039;&#039;&#039;arg&#039;&#039;&#039;=&#039;&#039;&#039;value&#039;&#039;&#039;. The value should be double-quoted if spaces are included in the value (see title= below.) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7903146 title=&amp;quot;My region&amp;quot; geneFontSize=1.1 recombColor=&amp;quot;gray&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.)&lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=Rare_variant_tests&amp;diff=2861</id>
		<title>Rare variant tests</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=Rare_variant_tests&amp;diff=2861"/>
		<updated>2011-02-05T01:48:30Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Summary of rare variant tests for sequence data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Summary of discussion from ESP rare variant working group ===&lt;br /&gt;
&lt;br /&gt;
The rare variant working group within ESP has discussed the issue of&lt;br /&gt;
rare variant tests on several conference calls.  The end result is&lt;br /&gt;
that we recommend selecting one test from each of these three&lt;br /&gt;
categories;&lt;br /&gt;
&lt;br /&gt;
1. Aggregate tests (typically with 1% threshold, nonsynonymous SNPs&lt;br /&gt;
only, with meta-analysis across different ethnic groups)&lt;br /&gt;
&lt;br /&gt;
2. Tests that allow for risk and/or protective variants (again,&lt;br /&gt;
probably 1% threshold, nonsynonymous SNPs only, with meta-analysis&lt;br /&gt;
across different ethnic groups)&lt;br /&gt;
&lt;br /&gt;
3. Weighted tests that allow incorporation of more common variants&lt;br /&gt;
(possibly apply 5% threshold?, nonsynonymous only, etc.)&lt;br /&gt;
&lt;br /&gt;
A brief summary of the RV discussion;&lt;br /&gt;
&lt;br /&gt;
- Permutations (where we permute phenotype while maintaining ethnic&lt;br /&gt;
group) will likely be required to get empirical p-values.  These RV&lt;br /&gt;
tests typically provide conservative p-values (deflated QQ plot), but&lt;br /&gt;
not always.  Thus, a computationally intensive test will not be&lt;br /&gt;
practical for performing large numbers of permutations (at least&lt;br /&gt;
1000).&lt;br /&gt;
&lt;br /&gt;
- Using too many tests will decrease the power overall because of&lt;br /&gt;
correction for family-wise error.&lt;br /&gt;
&lt;br /&gt;
- Although we&#039;d like to evaluate power and type I error rates of these&lt;br /&gt;
tests under a variety of genetic models, the reality is that we have&lt;br /&gt;
so few known positive examples it would be difficult to assess them&lt;br /&gt;
all in a fair way at this time.  Instead, we expect to re-convene this&lt;br /&gt;
discussion group at a later date once some true positive associations&lt;br /&gt;
are identified.&lt;br /&gt;
&lt;br /&gt;
- Shamil Sunyaev is performing a bake-off with some of these tests,&lt;br /&gt;
and we look forward to seeing his results in the future.&lt;br /&gt;
&lt;br /&gt;
- PLINKSeq is on its way, but is likely a month away from release (end Feb 2011)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Summary of rare variant tests for sequence data  ===&lt;br /&gt;
&lt;br /&gt;
Compiled by Cristen Willer and Suzanne Leal for the ESP&lt;br /&gt;
Feb 1, 2011&lt;br /&gt;
&lt;br /&gt;
 * indicates applicability to quantitative data&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1)   Aggregate tests using a cut off e.g. 1 % analyzing nonsynonymous variants to detect detrimental variants&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes &lt;br /&gt;
|-&lt;br /&gt;
| CMC/T1 test* || [http://www.ncbi.nlm.nih.gov/pubmed/18691683 Li &amp;amp; Leal, 2008] ||  || [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| KBAC || [http://www.ncbi.nlm.nih.gov/pubmed/20976247 Liu &amp;amp; Leal, 2010] || || [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| VT* || [http://www.ncbi.nlm.nih.gov/pubmed/20471002 Price et al., 2010] || http://genetics.bwh.harvard.edu/rare_variants/ || Incorporating functional weights but not VT, [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| WSS || [http://www.ncbi.nlm.nih.gov/pubmed/19214210 Madsen &amp;amp; Browning, 2009] || || with 1% cutoff, [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| CMAT || [http://www.ncbi.nlm.nih.gov/pubmed/21070896 Zawistowski et al. 2010] || || |&lt;br /&gt;
|-&lt;br /&gt;
| ANRV/GRANVIL* || [http://www.ncbi.nlm.nih.gov/pubmed/19810025 Morris &amp;amp; Zeggini] || || |&lt;br /&gt;
|-&lt;br /&gt;
| RARECOVER || [http://www.ploscompbiol.org/article/info:doi/10.1371/journal.pcbi.1000954 Bhati et al. 2010] || || |&lt;br /&gt;
|-&lt;br /&gt;
| CCRaVAT and QuTie* || [http://www.ncbi.nlm.nih.gov/pubmed/20964851 Lawrence et al. 2010] || http://www.sanger.ac.uk/resources/software/rarevariant/ || |&lt;br /&gt;
|-&lt;br /&gt;
| RVE (rare variant exclusive) || Cohen &amp;amp; Hobb || || underpowered, [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2)   Aggregate tests for protective and detrimental variants (recommend 1% cutoff)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes &lt;br /&gt;
|-&lt;br /&gt;
| C-alpha || [Neale et al., submitted] ||  || [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| Ionita-Laza &amp;amp; Lange || [http://www.plosgenetics.org/article/info%3Adoi%2F10.1371%2Fjournal.pgen.1001289 Ionita-Laza &amp;amp; Lange, 2011] || || |&lt;br /&gt;
|-&lt;br /&gt;
| DASH* || [http://www.ncbi.nlm.nih.gov/pubmed/20413981 Han &amp;amp; Pan] || || Computational burden |&lt;br /&gt;
|-&lt;br /&gt;
| SKAT* || [http://www.ncbi.nlm.nih.gov/pubmed/20560208 Wu et al., 2010] || http://www.hsph.harvard.edu/~xlin/software.html || For some kernel choices, need to code 0=major homozygote, 1=het, 2-minor homozygote |&lt;br /&gt;
|-&lt;br /&gt;
| WHaIT || [http://www.ncbi.nlm.nih.gov/pubmed/21055717 Li et al. 2010] || http://www.sph.umich.edu/csg/yli/whait/ || |&lt;br /&gt;
|-&lt;br /&gt;
| EMMPAT* || [http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2978703/pdf/pgen.1001202.pdf King et al. 2010] || http://home.uchicago.edu/~crk8e/papersup.html || |&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3) Analyzing common and rare variants together (could down-weight or threshold common variants)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| WSS || [http://www.ncbi.nlm.nih.gov/pubmed/19214210 Madsen &amp;amp; Browning, 2009] || || with 1% or 5% cutoff, [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| RARECOVER || [http://www.ploscompbiol.org/article/info:doi/10.1371/journal.pcbi.1000954 Bhati et al. 2010] || || |&lt;br /&gt;
|-&lt;br /&gt;
| Step-Up Collapsing* || [http://www.plosone.org/article/info:doi/10.1371/journal.pone.0013584 Hoffman et al. 2010] || || [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| CMC/T5 test* || [http://www.ncbi.nlm.nih.gov/pubmed/18691683 Li &amp;amp; Leal, 2008] ||  || [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| MENDEL* || [http://www.ncbi.nlm.nih.gov/pubmed/21121038 Zhou et al. 2011] || http://www.genetics.ucla.edu/software/download?package=1 || |&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4.) Analyze higher frequency rare variants &amp;gt;1% individually&#039;&#039;&#039;&lt;br /&gt;
                   Use same regression frame work which has been used for common variants*&lt;br /&gt;
                   Use meta analysis to combine results from sequence data and imputed genotypes to increase power*&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Additional tests&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes &lt;br /&gt;
|-&lt;br /&gt;
| Logic regression* || [http://kooperberg.fhcrc.org/papers/2001gaw.pdf Kooperberg et al. 2001] ||  || |&lt;br /&gt;
|-&lt;br /&gt;
| Sequence diversity || Anderson et al. 2006 || || |&lt;br /&gt;
|-&lt;br /&gt;
| Sequence dissimilarity* || Schork et al. 2008, Wessel et al. 2006 || || |&lt;br /&gt;
|-&lt;br /&gt;
| Ridge regression * || Malo et al. 2008 || || |&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=Rare_variant_tests&amp;diff=2860</id>
		<title>Rare variant tests</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=Rare_variant_tests&amp;diff=2860"/>
		<updated>2011-02-05T01:47:46Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Summary of rare variant tests for sequence data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Summary of discussion from ESP rare variant working group ===&lt;br /&gt;
&lt;br /&gt;
The rare variant working group within ESP has discussed the issue of&lt;br /&gt;
rare variant tests on several conference calls.  The end result is&lt;br /&gt;
that we recommend selecting one test from each of these three&lt;br /&gt;
categories;&lt;br /&gt;
&lt;br /&gt;
1. Aggregate tests (typically with 1% threshold, nonsynonymous SNPs&lt;br /&gt;
only, with meta-analysis across different ethnic groups)&lt;br /&gt;
&lt;br /&gt;
2. Tests that allow for risk and/or protective variants (again,&lt;br /&gt;
probably 1% threshold, nonsynonymous SNPs only, with meta-analysis&lt;br /&gt;
across different ethnic groups)&lt;br /&gt;
&lt;br /&gt;
3. Weighted tests that allow incorporation of more common variants&lt;br /&gt;
(possibly apply 5% threshold?, nonsynonymous only, etc.)&lt;br /&gt;
&lt;br /&gt;
A brief summary of the RV discussion;&lt;br /&gt;
&lt;br /&gt;
- Permutations (where we permute phenotype while maintaining ethnic&lt;br /&gt;
group) will likely be required to get empirical p-values.  These RV&lt;br /&gt;
tests typically provide conservative p-values (deflated QQ plot), but&lt;br /&gt;
not always.  Thus, a computationally intensive test will not be&lt;br /&gt;
practical for performing large numbers of permutations (at least&lt;br /&gt;
1000).&lt;br /&gt;
&lt;br /&gt;
- Using too many tests will decrease the power overall because of&lt;br /&gt;
correction for family-wise error.&lt;br /&gt;
&lt;br /&gt;
- Although we&#039;d like to evaluate power and type I error rates of these&lt;br /&gt;
tests under a variety of genetic models, the reality is that we have&lt;br /&gt;
so few known positive examples it would be difficult to assess them&lt;br /&gt;
all in a fair way at this time.  Instead, we expect to re-convene this&lt;br /&gt;
discussion group at a later date once some true positive associations&lt;br /&gt;
are identified.&lt;br /&gt;
&lt;br /&gt;
- Shamil Sunyaev is performing a bake-off with some of these tests,&lt;br /&gt;
and we look forward to seeing his results in the future.&lt;br /&gt;
&lt;br /&gt;
- PLINKSeq is on its way, but is likely a month away from release (end Feb 2011)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Summary of rare variant tests for sequence data  ===&lt;br /&gt;
&lt;br /&gt;
Compiled by Cristen Willer and Suzanne Leal for the ESP&lt;br /&gt;
Feb 1, 2011&lt;br /&gt;
&lt;br /&gt;
 * indicates applicability to quantitative data&lt;br /&gt;
? indicates possible applicability to quantitative data with adaptation&lt;br /&gt;
Blue font indicates implementation in upcoming PLINKSeq release (http://atgu.mgh.harvard.edu/plinkseq/)&lt;br /&gt;
&lt;br /&gt;
[http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1)   Aggregate tests using a cut off e.g. 1 % analyzing nonsynonymous variants to detect detrimental variants&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes &lt;br /&gt;
|-&lt;br /&gt;
| CMC/T1 test* || [http://www.ncbi.nlm.nih.gov/pubmed/18691683 Li &amp;amp; Leal, 2008] ||  || [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| KBAC || [http://www.ncbi.nlm.nih.gov/pubmed/20976247 Liu &amp;amp; Leal, 2010] || || [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| VT* || [http://www.ncbi.nlm.nih.gov/pubmed/20471002 Price et al., 2010] || http://genetics.bwh.harvard.edu/rare_variants/ || Incorporating functional weights but not VT, [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| WSS || [http://www.ncbi.nlm.nih.gov/pubmed/19214210 Madsen &amp;amp; Browning, 2009] || || with 1% cutoff, [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| CMAT || [http://www.ncbi.nlm.nih.gov/pubmed/21070896 Zawistowski et al. 2010] || || |&lt;br /&gt;
|-&lt;br /&gt;
| ANRV/GRANVIL* || [http://www.ncbi.nlm.nih.gov/pubmed/19810025 Morris &amp;amp; Zeggini] || || |&lt;br /&gt;
|-&lt;br /&gt;
| RARECOVER || [http://www.ploscompbiol.org/article/info:doi/10.1371/journal.pcbi.1000954 Bhati et al. 2010] || || |&lt;br /&gt;
|-&lt;br /&gt;
| CCRaVAT and QuTie* || [http://www.ncbi.nlm.nih.gov/pubmed/20964851 Lawrence et al. 2010] || http://www.sanger.ac.uk/resources/software/rarevariant/ || |&lt;br /&gt;
|-&lt;br /&gt;
| RVE (rare variant exclusive) || Cohen &amp;amp; Hobb || || underpowered, [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2)   Aggregate tests for protective and detrimental variants (recommend 1% cutoff)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes &lt;br /&gt;
|-&lt;br /&gt;
| C-alpha || [Neale et al., submitted] ||  || [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| Ionita-Laza &amp;amp; Lange || [http://www.plosgenetics.org/article/info%3Adoi%2F10.1371%2Fjournal.pgen.1001289 Ionita-Laza &amp;amp; Lange, 2011] || || |&lt;br /&gt;
|-&lt;br /&gt;
| DASH* || [http://www.ncbi.nlm.nih.gov/pubmed/20413981 Han &amp;amp; Pan] || || Computational burden |&lt;br /&gt;
|-&lt;br /&gt;
| SKAT* || [http://www.ncbi.nlm.nih.gov/pubmed/20560208 Wu et al., 2010] || http://www.hsph.harvard.edu/~xlin/software.html || For some kernel choices, need to code 0=major homozygote, 1=het, 2-minor homozygote |&lt;br /&gt;
|-&lt;br /&gt;
| WHaIT || [http://www.ncbi.nlm.nih.gov/pubmed/21055717 Li et al. 2010] || http://www.sph.umich.edu/csg/yli/whait/ || |&lt;br /&gt;
|-&lt;br /&gt;
| EMMPAT* || [http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2978703/pdf/pgen.1001202.pdf King et al. 2010] || http://home.uchicago.edu/~crk8e/papersup.html || |&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3) Analyzing common and rare variants together (could down-weight or threshold common variants)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| WSS || [http://www.ncbi.nlm.nih.gov/pubmed/19214210 Madsen &amp;amp; Browning, 2009] || || with 1% or 5% cutoff, [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| RARECOVER || [http://www.ploscompbiol.org/article/info:doi/10.1371/journal.pcbi.1000954 Bhati et al. 2010] || || |&lt;br /&gt;
|-&lt;br /&gt;
| Step-Up Collapsing* || [http://www.plosone.org/article/info:doi/10.1371/journal.pone.0013584 Hoffman et al. 2010] || || [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| CMC/T5 test* || [http://www.ncbi.nlm.nih.gov/pubmed/18691683 Li &amp;amp; Leal, 2008] ||  || [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| MENDEL* || [http://www.ncbi.nlm.nih.gov/pubmed/21121038 Zhou et al. 2011] || http://www.genetics.ucla.edu/software/download?package=1 || |&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4.) Analyze higher frequency rare variants &amp;gt;1% individually&#039;&#039;&#039;&lt;br /&gt;
                   Use same regression frame work which has been used for common variants*&lt;br /&gt;
                   Use meta analysis to combine results from sequence data and imputed genotypes to increase power*&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Additional tests&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes &lt;br /&gt;
|-&lt;br /&gt;
| Logic regression* || [http://kooperberg.fhcrc.org/papers/2001gaw.pdf Kooperberg et al. 2001] ||  || |&lt;br /&gt;
|-&lt;br /&gt;
| Sequence diversity || Anderson et al. 2006 || || |&lt;br /&gt;
|-&lt;br /&gt;
| Sequence dissimilarity* || Schork et al. 2008, Wessel et al. 2006 || || |&lt;br /&gt;
|-&lt;br /&gt;
| Ridge regression * || Malo et al. 2008 || || |&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=Rare_variant_tests&amp;diff=2859</id>
		<title>Rare variant tests</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=Rare_variant_tests&amp;diff=2859"/>
		<updated>2011-02-05T01:44:11Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Summary of rare variant tests for sequence data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Summary of rare variant tests for sequence data  ===&lt;br /&gt;
&lt;br /&gt;
Compiled by Cristen Willer and Suzanne Leal for the ESP&lt;br /&gt;
Feb 1, 2011&lt;br /&gt;
&lt;br /&gt;
 * indicates applicability to quantitative data&lt;br /&gt;
? indicates possible applicability to quantitative data with adaptation&lt;br /&gt;
Blue font indicates implementation in upcoming PLINKSeq release (http://atgu.mgh.harvard.edu/plinkseq/)&lt;br /&gt;
&lt;br /&gt;
[http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1)   Aggregate tests using a cut off e.g. 1 % analyzing nonsynonymous variants to detect detrimental variants&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes &lt;br /&gt;
|-&lt;br /&gt;
| CMC/T1 test* || [http://www.ncbi.nlm.nih.gov/pubmed/18691683 Li &amp;amp; Leal, 2008] ||  || [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| KBAC || [http://www.ncbi.nlm.nih.gov/pubmed/20976247 Liu &amp;amp; Leal, 2010] || || [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| VT* || [http://www.ncbi.nlm.nih.gov/pubmed/20471002 Price et al., 2010] || http://genetics.bwh.harvard.edu/rare_variants/ || Incorporating functional weights but not VT, [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| WSS || [http://www.ncbi.nlm.nih.gov/pubmed/19214210 Madsen &amp;amp; Browning, 2009] || || with 1% cutoff, [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| CMAT || [http://www.ncbi.nlm.nih.gov/pubmed/21070896 Zawistowski et al. 2010] || || |&lt;br /&gt;
|-&lt;br /&gt;
| ANRV/GRANVIL* || [http://www.ncbi.nlm.nih.gov/pubmed/19810025 Morris &amp;amp; Zeggini] || || |&lt;br /&gt;
|-&lt;br /&gt;
| RARECOVER || [http://www.ploscompbiol.org/article/info:doi/10.1371/journal.pcbi.1000954 Bhati et al. 2010] || || |&lt;br /&gt;
|-&lt;br /&gt;
| CCRaVAT and QuTie* || [http://www.ncbi.nlm.nih.gov/pubmed/20964851 Lawrence et al. 2010] || http://www.sanger.ac.uk/resources/software/rarevariant/ || |&lt;br /&gt;
|-&lt;br /&gt;
| RVE (rare variant exclusive) || Cohen &amp;amp; Hobb || || underpowered, [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2)   Aggregate tests for protective and detrimental variants (recommend 1% cutoff)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes &lt;br /&gt;
|-&lt;br /&gt;
| C-alpha || [Neale et al., submitted] ||  || [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| Ionita-Laza &amp;amp; Lange || [http://www.plosgenetics.org/article/info%3Adoi%2F10.1371%2Fjournal.pgen.1001289 Ionita-Laza &amp;amp; Lange, 2011] || || |&lt;br /&gt;
|-&lt;br /&gt;
| DASH* || [http://www.ncbi.nlm.nih.gov/pubmed/20413981 Han &amp;amp; Pan] || || Computational burden |&lt;br /&gt;
|-&lt;br /&gt;
| SKAT* || [http://www.ncbi.nlm.nih.gov/pubmed/20560208 Wu et al., 2010] || http://www.hsph.harvard.edu/~xlin/software.html || For some kernel choices, need to code 0=major homozygote, 1=het, 2-minor homozygote |&lt;br /&gt;
|-&lt;br /&gt;
| WHaIT || [http://www.ncbi.nlm.nih.gov/pubmed/21055717 Li et al. 2010] || http://www.sph.umich.edu/csg/yli/whait/ || |&lt;br /&gt;
|-&lt;br /&gt;
| EMMPAT* || [http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2978703/pdf/pgen.1001202.pdf King et al. 2010] || http://home.uchicago.edu/~crk8e/papersup.html || |&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3) Analyzing common and rare variants together (could down-weight or threshold common variants)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| WSS || [http://www.ncbi.nlm.nih.gov/pubmed/19214210 Madsen &amp;amp; Browning, 2009] || || with 1% or 5% cutoff, [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| RARECOVER || [http://www.ploscompbiol.org/article/info:doi/10.1371/journal.pcbi.1000954 Bhati et al. 2010] || || |&lt;br /&gt;
|-&lt;br /&gt;
| Step-Up Collapsing* || [http://www.plosone.org/article/info:doi/10.1371/journal.pone.0013584 Hoffman et al. 2010] || || [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| CMC/T5 test* || [http://www.ncbi.nlm.nih.gov/pubmed/18691683 Li &amp;amp; Leal, 2008] ||  || [http://atgu.mgh.harvard.edu/plinkseq/ Will be implemented in PlinkSeq] |&lt;br /&gt;
|-&lt;br /&gt;
| MENDEL* || [http://www.ncbi.nlm.nih.gov/pubmed/21121038 Zhou et al. 2011] || http://www.genetics.ucla.edu/software/download?package=1 || |&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4.) Analyze higher frequency rare variants &amp;gt;1% individually&#039;&#039;&#039;&lt;br /&gt;
                   Use same regression frame work which has been used for common variants*&lt;br /&gt;
                   Use meta analysis to combine results from sequence data and imputed genotypes to increase power*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additional tests&lt;br /&gt;
Test Name	Notes	Reference	Website/Code&lt;br /&gt;
Logic Regression*		Kooperberg et al. (2001)&lt;br /&gt;
http://kooperberg.fhcrc.org/papers/2001gaw.pdf	&lt;br /&gt;
Sequence diversity		Anderson (2006)	&lt;br /&gt;
Sequence dissimilarity*		Schork et al. (2008), Wessel et al. (2006)	&lt;br /&gt;
Ridge Regression*		Malo et al. (2008)&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Additional tests&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes &lt;br /&gt;
|-&lt;br /&gt;
| Logic regression* || [http://kooperberg.fhcrc.org/papers/2001gaw.pdf Kooperberg et al. 2001] ||  || |&lt;br /&gt;
|-&lt;br /&gt;
| Sequence diversity || Anderson et al. 2006 || || |&lt;br /&gt;
|-&lt;br /&gt;
| Sequence dissimilarity* || Schork et al. 2008, Wessel et al. 2006 || || |&lt;br /&gt;
|-&lt;br /&gt;
| Ridge regression * || Malo et al. 2008 || || |&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=Rare_variant_tests&amp;diff=2858</id>
		<title>Rare variant tests</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=Rare_variant_tests&amp;diff=2858"/>
		<updated>2011-02-05T01:27:24Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Summary of rare variant tests for sequence data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Summary of rare variant tests for sequence data  ===&lt;br /&gt;
&lt;br /&gt;
Compiled by Cristen Willer and Suzanne Leal for the ESP&lt;br /&gt;
Feb 1, 2011&lt;br /&gt;
&lt;br /&gt;
 * indicates applicability to quantitative data&lt;br /&gt;
? indicates possible applicability to quantitative data with adaptation&lt;br /&gt;
Blue font indicates implementation in upcoming PLINKSeq release (http://atgu.mgh.harvard.edu/plinkseq/)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1)   Aggregate tests using a cut off e.g. 1 % analyzing nonsynonymous variants to detect detrimental variants&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes &lt;br /&gt;
|-&lt;br /&gt;
| CMC/T1 test* || [http://www.ncbi.nlm.nih.gov/pubmed/18691683 Li &amp;amp; Leal, 2008] ||  || |&lt;br /&gt;
|-&lt;br /&gt;
| KBAC || [http://www.ncbi.nlm.nih.gov/pubmed/20976247 Liu &amp;amp; Leal, 2010] || || |&lt;br /&gt;
|-&lt;br /&gt;
| VT* || [http://www.ncbi.nlm.nih.gov/pubmed/20471002 Price et al., 2010] || http://genetics.bwh.harvard.edu/rare_variants/ || Incorporating functional weights but not VT |&lt;br /&gt;
|-&lt;br /&gt;
| WSS || [http://www.ncbi.nlm.nih.gov/pubmed/19214210 Madsen &amp;amp; Browning, 2009] || || with 1% cutoff |&lt;br /&gt;
|-&lt;br /&gt;
| CMAT || [http://www.ncbi.nlm.nih.gov/pubmed/21070896 Zawistowski et al. 2010] || || |&lt;br /&gt;
|-&lt;br /&gt;
| ANRV/GRANVIL* || [http://www.ncbi.nlm.nih.gov/pubmed/19810025 Morris &amp;amp; Zeggini] || || |&lt;br /&gt;
|-&lt;br /&gt;
| RARECOVER || [http://www.ploscompbiol.org/article/info:doi/10.1371/journal.pcbi.1000954 Bhati et al. 2010] || || |&lt;br /&gt;
|-&lt;br /&gt;
| CCRaVAT and QuTie* || [http://www.ncbi.nlm.nih.gov/pubmed/20964851 Lawrence et al. 2010] || http://www.sanger.ac.uk/resources/software/rarevariant/ || |&lt;br /&gt;
|-&lt;br /&gt;
| RVE (rare variant exclusive) || Cohen &amp;amp; Hobb || || underpowered |&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2)   Aggregate tests for protective and detrimental variants (recommend 1% cutoff)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes &lt;br /&gt;
|-&lt;br /&gt;
| C-alpha || [Neale et al., submitted] ||  || |&lt;br /&gt;
|-&lt;br /&gt;
| Ionita-Laza &amp;amp; Lange || [http://www.plosgenetics.org/article/info%3Adoi%2F10.1371%2Fjournal.pgen.1001289 Ionita-Laza &amp;amp; Lange, 2011] || || |&lt;br /&gt;
|-&lt;br /&gt;
| DASH* || [http://www.ncbi.nlm.nih.gov/pubmed/20413981 Han &amp;amp; Pan] || || Computational burden |&lt;br /&gt;
|-&lt;br /&gt;
| SKAT* || [http://www.ncbi.nlm.nih.gov/pubmed/20560208 Wu et al., 2010] || http://www.hsph.harvard.edu/~xlin/software.html || For some kernel choices, need to code 0=major homozygote, 1=het, 2-minor homozygote |&lt;br /&gt;
|-&lt;br /&gt;
| WHaIT || [http://www.ncbi.nlm.nih.gov/pubmed/21055717 Li et al. 2010] || http://www.sph.umich.edu/csg/yli/whait/ || |&lt;br /&gt;
|-&lt;br /&gt;
| EMMPAT* || [http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2978703/pdf/pgen.1001202.pdf King et al. 2010] || http://home.uchicago.edu/~crk8e/papersup.html || |&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3) Analyzing common and rare variants together (could down-weight or threshold common variants)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes |&lt;br /&gt;
|-&lt;br /&gt;
| WSS || [http://www.ncbi.nlm.nih.gov/pubmed/19214210 Madsen &amp;amp; Browning, 2009] || || with 1% or 5% cutoff |&lt;br /&gt;
|-&lt;br /&gt;
| RARECOVER || [http://www.ploscompbiol.org/article/info:doi/10.1371/journal.pcbi.1000954 Bhati et al. 2010] || || |&lt;br /&gt;
|-&lt;br /&gt;
| Step-Up Collapsing* || [http://www.plosone.org/article/info:doi/10.1371/journal.pone.0013584 Hoffman et al. 2010] || || |&lt;br /&gt;
|-&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=Rare_variant_tests&amp;diff=2857</id>
		<title>Rare variant tests</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=Rare_variant_tests&amp;diff=2857"/>
		<updated>2011-02-05T01:25:24Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Summary of rare variant tests for sequence data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Summary of rare variant tests for sequence data  ===&lt;br /&gt;
&lt;br /&gt;
Compiled by Cristen Willer and Suzanne Leal for the ESP&lt;br /&gt;
Feb 1, 2011&lt;br /&gt;
&lt;br /&gt;
 * indicates applicability to quantitative data&lt;br /&gt;
? indicates possible applicability to quantitative data with adaptation&lt;br /&gt;
Blue font indicates implementation in upcoming PLINKSeq release (http://atgu.mgh.harvard.edu/plinkseq/)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1)   Aggregate tests using a cut off e.g. 1 % analyzing nonsynonymous variants to detect detrimental variants&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes |&lt;br /&gt;
|-&lt;br /&gt;
| CMC/T1 test* || [http://www.ncbi.nlm.nih.gov/pubmed/18691683 Li &amp;amp; Leal, 2008] ||  || |&lt;br /&gt;
|-&lt;br /&gt;
| KBAC || [http://www.ncbi.nlm.nih.gov/pubmed/20976247 Liu &amp;amp; Leal, 2010] || || |&lt;br /&gt;
|-&lt;br /&gt;
| VT* || [http://www.ncbi.nlm.nih.gov/pubmed/20471002 Price et al., 2010] || http://genetics.bwh.harvard.edu/rare_variants/ || Incorporating functional weights but not VT |&lt;br /&gt;
|-&lt;br /&gt;
| WSS || [http://www.ncbi.nlm.nih.gov/pubmed/19214210 Madsen &amp;amp; Browning, 2009] || || with 1% cutoff |&lt;br /&gt;
|-&lt;br /&gt;
| CMAT || [http://www.ncbi.nlm.nih.gov/pubmed/21070896 Zawistowski et al. 2010] || || |&lt;br /&gt;
|-&lt;br /&gt;
| ANRV/GRANVIL* || [http://www.ncbi.nlm.nih.gov/pubmed/19810025 Morris &amp;amp; Zeggini] || || |&lt;br /&gt;
|-&lt;br /&gt;
| RARECOVER || [http://www.ploscompbiol.org/article/info:doi/10.1371/journal.pcbi.1000954 Bhati et al. 2010] || || |&lt;br /&gt;
|-&lt;br /&gt;
| CCRaVAT and QuTie* || [http://www.ncbi.nlm.nih.gov/pubmed/20964851 Lawrence et al. 2010] || http://www.sanger.ac.uk/resources/software/rarevariant/ || |&lt;br /&gt;
|-&lt;br /&gt;
| RVE (rare variant exclusive) || Cohen &amp;amp; Hobb || || underpowered |&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2)   Aggregate tests for protective and detrimental variants (recommend 1% cutoff)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes |&lt;br /&gt;
|-&lt;br /&gt;
| C-alpha || [Neale et al., submitted] ||  || |&lt;br /&gt;
|-&lt;br /&gt;
| Ionita-Laza &amp;amp; Lange || [http://www.plosgenetics.org/article/info%3Adoi%2F10.1371%2Fjournal.pgen.1001289 Ionita-Laza &amp;amp; Lange, 2011] || || |&lt;br /&gt;
|-&lt;br /&gt;
| DASH* || [http://www.ncbi.nlm.nih.gov/pubmed/20413981 Han &amp;amp; Pan] || || Computational burden |&lt;br /&gt;
|-&lt;br /&gt;
| SKAT* || [http://www.ncbi.nlm.nih.gov/pubmed/20560208 Wu et al., 2010] || http://www.hsph.harvard.edu/~xlin/software.html || For some kernel choices, need to code 0=major homozygote, 1=het, 2-minor homozygote |&lt;br /&gt;
|-&lt;br /&gt;
| WHaIT || [http://www.ncbi.nlm.nih.gov/pubmed/21055717 Li et al. 2010] || http://www.sph.umich.edu/csg/yli/whait/ || |&lt;br /&gt;
|-&lt;br /&gt;
| EMMPAT* || [http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2978703/pdf/pgen.1001202.pdf King et al. 2010] || http://home.uchicago.edu/~crk8e/papersup.html || |&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Analyzing common and rare variants together (could down-weight or threshold common variants)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes |&lt;br /&gt;
|-&lt;br /&gt;
| WSS || [http://www.ncbi.nlm.nih.gov/pubmed/19214210 Madsen &amp;amp; Browning, 2009] || || with 1% or 5% cutoff |&lt;br /&gt;
|-&lt;br /&gt;
| RARECOVER || [http://www.ploscompbiol.org/article/info:doi/10.1371/journal.pcbi.1000954 Bhati et al. 2010] || || |&lt;br /&gt;
|-&lt;br /&gt;
| Step-Up Collapsing* || [http://www.plosone.org/article/info:doi/10.1371/journal.pone.0013584&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=Rare_variant_tests&amp;diff=2856</id>
		<title>Rare variant tests</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=Rare_variant_tests&amp;diff=2856"/>
		<updated>2011-02-05T01:05:13Z</updated>

		<summary type="html">&lt;p&gt;Cristen: Created page with &amp;#039;=== Summary of rare variant tests for sequence data  ===  Compiled by Cristen Willer and Suzanne Leal for the ESP Feb 1, 2011   * indicates applicability to quantitative data ? i…&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Summary of rare variant tests for sequence data  ===&lt;br /&gt;
&lt;br /&gt;
Compiled by Cristen Willer and Suzanne Leal for the ESP&lt;br /&gt;
Feb 1, 2011&lt;br /&gt;
&lt;br /&gt;
 * indicates applicability to quantitative data&lt;br /&gt;
? indicates possible applicability to quantitative data with adaptation&lt;br /&gt;
Blue font indicates implementation in upcoming PLINKSeq release (http://atgu.mgh.harvard.edu/plinkseq/)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1)   Aggregate tests using a cut off e.g. 1 % analyzing nonsynonymous variants to detect detrimental variants&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Test Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Reference&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Software&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| CMC/T1 test* || Li &amp;amp; Leal, 2008 ||  || ||&lt;br /&gt;
|-&lt;br /&gt;
| KBAC || Liu &amp;amp; Leal, 2010 || || ||&lt;br /&gt;
|-&lt;br /&gt;
| VT* || Price et al., 2010 || http://genetics.bwh.harvard.edu/rare_variants/ || Incorporating functional weights but not VT&lt;br /&gt;
|-&lt;br /&gt;
| WSS || Madsen &amp;amp; Browning, 2009 || || with 1% cutoff&lt;br /&gt;
|-&lt;br /&gt;
| CMAT || Zawistowski et al. 2010 ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=2015</id>
		<title>LocusZoom</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=2015"/>
		<updated>2010-09-10T09:39:30Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Commonly Used LocusZoom Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:LocusZoomSmall.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LocusZoom&#039;&#039;&#039; is designed to facilitate viewing of local association results together with useful information about a locus, such as the location and orientation of the genes it includes, linkage disequilibrium coefficients and local estimates of recombination rates. It was developed by popular demand, as a result of many questions we have had about &amp;quot;How did you make the figures in your talk?&amp;quot; or &amp;quot;How did you make the figures for your GWAS paper?&amp;quot; (And for better or for worse, we have quite a few GWAS papers!!).&lt;br /&gt;
&lt;br /&gt;
LocusZoom can be used in four ways:&lt;br /&gt;
&lt;br /&gt;
; 1. Plot Summaries of Your Genomewide Scan Interactively&lt;br /&gt;
: You can upload summary results of your own genomewide scan or genomewide meta-analysis and request plots of regions of interest using a web-based form.&lt;br /&gt;
&lt;br /&gt;
; 2. Generate Many Plots in Batch Mode&lt;br /&gt;
: You can upload summary results for your genomewide scan or genomewide meta-analysis and request several plots in one go by uploading a batch file. You will receive results via e-mail. A snail-mail option is not available.&lt;br /&gt;
&lt;br /&gt;
; 3. Plot Summaries of Publicly Available Datasets&lt;br /&gt;
: Currently, this includes the results of [http://www.sph.umich.edu/csg/abecasis/public/lipids2008/ our genome-wide scan] for variants associated with HDL-cholesterol, LDL-cholesterol and triglyceride levels in ~20,000 individuals.&lt;br /&gt;
&lt;br /&gt;
; 4. Download LocusZoom and run on your local unix machine&lt;br /&gt;
: [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone Download LocusZoom] and [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Sources_of_SQLite_database_tables associated databases]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upload your own meta-analysis file and generate single plots using a web-based form  ==&lt;br /&gt;
&lt;br /&gt;
=== Uploading Your Association Study Results ===&lt;br /&gt;
&lt;br /&gt;
Association results can be uploaded to our web server using the [http://csg.sph.umich.edu/locuszoom/ plot your data webpage]. Result files are limited to 20Mb in size, which allows for a [[gzip|gzipped]] text table including key columns (marker name, p-value and sample size) for up to ~3 million SNPs. In our tests, a typical GWAS results file is ~17 Mb in size after imputation of HapMap SNPs. Once a file is uploaded, LocusZoom will remember the file for the duration of your web session allowing you to generate multiple plots. If you have a slow connection or would like to save time, you can upload results for a region or chromosome of interest only. Your results are entirely confidential and won&#039;t be viewed by us or anyone else (except those with whom you share them!)&lt;br /&gt;
&lt;br /&gt;
To specify the region to be plotted, you will have to specify the name of a key marker in the region (typically, as an rs-number), name a gene of interest or provide appropriate genome coordinates. When displaying linkage disequilibrium, plotting will be very fast for small windows when HapMap CEU linkage disequilibrium is requested (because pairwise coefficients have been precomputed) and will be a bit slower for larger windows (because linkage disequilibrium coefficients must be computed on the fly).&lt;br /&gt;
&lt;br /&gt;
If you include a sample size column in the result file, it will be used to control the size of each plotted marker.&lt;br /&gt;
&lt;br /&gt;
=== Custom Annotation ===&lt;br /&gt;
&lt;br /&gt;
You may choose to have SNPs displayed using different plotting symbols to distinguish them from each other.  To implement this, in the section &amp;quot;Custom Annotation&amp;quot; in the box &amp;quot;Column Name&amp;quot;, you need to provide the name of a column in your meta-analysis file.  This column will list a category for each SNP of your own choosing (i.e. &amp;quot;nonsynonymous&amp;quot;, &amp;quot;splice&amp;quot;,&amp;quot;intronic&amp;quot;,etc.) or (&amp;quot;Genotyped&amp;quot;,&amp;quot;Imputed&amp;quot;), however, the category names may not include any spaces.  To select the order of the categories to display in the legend and to match the order of pre-selected R plotting symbols (set as pch = 21, 22, 23, 24, 25, 4, 7, 8, 10, 11, 12, 13, 14, 3), you may provide the category names in the specified order in &amp;quot;Category Order&amp;quot; section of &amp;quot;Custom Annotation&amp;quot;.  Each entry (which may not contain spaces) does not need quotes but each entry should be separated by commas.&lt;br /&gt;
&lt;br /&gt;
Alternatively, we have provided functional annotation of all 1000 Genomes (Aug 2009) and HapMap r22 SNPs according to the following categories; Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). This can be implemented using the section &amp;quot;Show Annotation&amp;quot; and clicking the box beside each annotation category that you would like distinguished.  SNPs that are not in any selected category will still be displayed as having no annotation.&lt;br /&gt;
&lt;br /&gt;
=== Plotting of Pairwise Linkage Disequilibrium ===&lt;br /&gt;
&lt;br /&gt;
In the main plot window, data points are colored according to their level of linkage disequilibrium (LD) of the each SNP with the index SNP. If users specify the region to display using an index SNP and flanking region, LD of all data points will be relative to the user-specified index SNP. If users specify the region to display using genome coordinates or a gene name, LocusZoom will automatically select the most significant SNP in the region as the index SNP. For all other SNPs in the plot, the color of the data point will reflect the pairwise LD with this index SNP. The default LD measure is r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; calculated from the HapMap CEU population (release 22), but users have the option to replace this with D’ and of selecting the HapMap YRI, Hapmap CHB+JPT or 1000 Genomes CEU reference panels. To  display LD from 1000G CEU, please substitute rsid&#039;s for 1000G naming convention (chrxx:xxxx) whenever possible.  Because we have pre-computed LD for all SNPs in HapMap CEU, plots will often generate more quickly if using the default LD information. SNPs with missing LD information are shown in grey.&lt;br /&gt;
&lt;br /&gt;
=== Customizing the Display of Your Results ===&lt;br /&gt;
&lt;br /&gt;
All options listed in the Main Table above are available, as well as the options listed below&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Setting &lt;br /&gt;
! Default Value &lt;br /&gt;
! Details&lt;br /&gt;
|-&lt;br /&gt;
| Column Delimiter &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the type of column delimiter in the results file&lt;br /&gt;
|-&lt;br /&gt;
| Pvalue Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the name of the column that contains the p-values&lt;br /&gt;
|-&lt;br /&gt;
| Marker Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the heading of the column that contains marker names&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| none &lt;br /&gt;
| Plots can be generated based on hg18 (default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| HapMap Population for LD &lt;br /&gt;
| none &lt;br /&gt;
| This option allows the user to specify which HapMap population was used to obtain LD estimates. The default is CEU but users may select YRI or JPT+CHB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Batch Mode  ==&lt;br /&gt;
&lt;br /&gt;
To start batch mode, first upload your results file just as you would in interactive mode. The same file size restrictions apply.&lt;br /&gt;
&lt;br /&gt;
=== Generating a Hit Spec File ===&lt;br /&gt;
&lt;br /&gt;
Batch mode allows you to conveniently specify a set of plots to be generated in &amp;quot;Hit Spec&amp;quot; file. This is handy if you need to generate large numbers of plots or if you want to plot the same set of regions after updating a genomewide analysis (for example).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Hit Spec&amp;quot; file is a whitespace delimited text file. The file has six mandatory columns which can be followed by a series of optional &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs to allow for detailed customization of each plot. The first line in the file is assumed to be a header and is ignored. Each subsequent line describes a single plot. There are three ways to select a region to plot:&lt;br /&gt;
&lt;br /&gt;
; Plotting a window flanking an interesting SNP&lt;br /&gt;
: This option allows you to plot results for all markers within a specific distance (e.g. 500kb) of an index SNP. To use this option, set column 1 to have the name of the index SNP (e.g. &#039;&#039;rs2&#039;&#039; below) and set column 5 to specify the width of the region of interest (e.g. 500kb below). Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs1	   na	   na	    na       500kb        yes      rfrows=3 weightCol=”N” snpset=”HapMap” metalRug=”Our SNPs” &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking an interesting SNP&lt;br /&gt;
: This option is similar to the previous option, but allows you to specify an assymetric region of interest. For example, perhaps you interested in a plot that extends a bit further to the right of the SNP of interest. In this case, specify the coordinates of the region to be plotted in columns 2, 3, and 4. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs2	   1	   540000   580000   na	          yes      rfrows=4 legend=”right” showAnnot=T &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking a gene of interest&lt;br /&gt;
: This option allows you to focus on a particular gene, rather than a specific SNP. It is similar to the first option. You should set column 1 to be the name of the gene of interest and column 5 to be the desired window width. When you use this option, LocusZoom will automatically select an index SNP for each region; the SNP will be the site with the smallest p-value. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
CETP	   na      na	    na       200kb        yes      rfrows=6 showAnnot=T annotPch=”1,24,24,25,22,21,8,7”&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sixth column in the &amp;quot;Hit Spec&amp;quot; file can be used to enable (with the value &#039;&#039;yes&#039;&#039;) or disable (with the value &#039;&#039;no&#039;&#039;) an individual plot. For example, if you run a &amp;quot;Hit Spec&amp;quot; file with 15 plots and 14 of them turn out very nicely, you may wish to re-run the &amp;quot;Hit Spec&amp;quot; file with some tweaks to the problem plot. In this case (if you dislike waiting for your results as much as we do!), you could disable generation of the plots that seem nice by changing the 6th column to “no” and leave the plot that you tweaked as a “yes”.&lt;br /&gt;
&lt;br /&gt;
The 7th and final column contains additional LocusZoom arguments as &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs. Any number of &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pair arguments can be included. For details of available options, see the section entitled LocusZoom options below.&lt;br /&gt;
&lt;br /&gt;
== Generate single plots using our publicly-available lipids GWAS data  ==&lt;br /&gt;
&lt;br /&gt;
In addition to plotting your own results, you can plot the results of some publicly available GWAS. Currently, the only publicly available set of results is our GWAS for loci determining blood lipid levels (Kathiresan et al, Nature Genetics 2009). Just like when you are plotting your own data, you can specify 1) an index SNP and a flanking region, 2) the chromosome together with start and stop positions (in basepairs), or 3) gene name and a flanking region.&lt;br /&gt;
&lt;br /&gt;
== Commonly Used LocusZoom Options ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Web Form &lt;br /&gt;
! &amp;quot;Hit Spec&amp;quot; File Key-Value Pair &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Title on Plot &lt;br /&gt;
| title=”My Favorite Locus” &lt;br /&gt;
| Specifies large text displayed above the plot&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| n/a &lt;br /&gt;
| Plots can be generated based on hg18 (the default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| Legend Location &lt;br /&gt;
| legend=”left” &lt;br /&gt;
| This specifies the location of the legend within the plot, the default is auto. Auto tries to select a location that overlaps a minimal number of datapoints. (auto, left, right, none) &lt;br /&gt;
|-&lt;br /&gt;
| SNP Position Rug &lt;br /&gt;
| snpset=”HapMap” metalRug=”Rug SNPs” &lt;br /&gt;
| These options control display of tickmarks indicating SNP positions at the top of the plot. Setting snpset=&amp;quot;HapMap&amp;quot;, snpset=&amp;quot;Illu318&amp;quot; or snpset=&amp;quot;Affy500&amp;quot; display a fixed set of SNPs. (You can also try snpset=&amp;quot;Affy500,Illu318,HapMap&amp;quot; to see all 3). The metalRug option displays a rug which only includes the SNPs that are actually plotted. To remove the rug in batch mode set snpset=NULL. &lt;br /&gt;
|-&lt;br /&gt;
| Number of Rows for Gene Names &lt;br /&gt;
| rfrows=4 &lt;br /&gt;
| LocusZoom will automatically tries to determine the number of display rows to use for genes and gene names so they are not overlapping. This can make each plot prettier, but is not ideal when you want to compare many plots side by side. To ensure a fixed amount of space is used for gene names, use this option to set the maximum number of display rows. If LocusZoom runs out of plotting space and some genes are left out, a warning will be added to the plot.&lt;br /&gt;
|-&lt;br /&gt;
| Point Size  &lt;br /&gt;
| weightCol=”SampleSize” &lt;br /&gt;
| This specifies that the “dot size” of each data points will reflect the square-root of the sample size. The default is to have all dot sizes equal.&lt;br /&gt;
|-&lt;br /&gt;
| LD Measure &lt;br /&gt;
| ldCol=”dprime” (“rsquare”) &lt;br /&gt;
| Colors data points according to the selected LD  measure. The default is &amp;quot;rsquare&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| Reference Population for LD &lt;br /&gt;
| n/a &lt;br /&gt;
| This option allows the user to specify which reference panel is used to obtain LD estimates. The default is CEU from HapMap Phase II but users may select YRI or JPT+CHB from HapMap Phase II, or CEU from 1000 Genomes (August 2009 or June 2010 release).&lt;br /&gt;
|-&lt;br /&gt;
| Highlight Region of Interest &lt;br /&gt;
| hiStart=425Mb hiEnd=425.1Mb &lt;br /&gt;
| A grey box can be used to highlight important regions of the genome – this can reflect where an association signal peaks or a region selected for sequencing, for example.&lt;br /&gt;
|-&lt;br /&gt;
| Theme &lt;br /&gt;
| theme=”publication” &lt;br /&gt;
| We have created a theme that has larger text and is more easily readable for publication.&lt;br /&gt;
|-&lt;br /&gt;
| Show Annotation &lt;br /&gt;
| showAnnot=T showRefsnpAnnot=T annotPch=”21,24,24,25,22,22,8,7” &lt;br /&gt;
| SNP annotation is available for all 1000G SNPs (Aug 2009 release) and can be enabled with the showAnnot=T option. The annotPch command allows you to customize the R plotting symbol used for each kind of SNP; it is okay to use the same symbol for more than one category. The annotation categories, together with their default symbol setting are: Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). For more information about these annotation categories used, please see http://research.nhgri.nih.gov/tools/unisnp/?rm=ohelp&lt;br /&gt;
|-&lt;br /&gt;
| Recombination Rate Overlay &lt;br /&gt;
| showRecomb=T &lt;br /&gt;
| The estimated recombination rate from HapMap samples can be shown on the plot or left off. The data plotted are from Hapmap; http://hapmap.ncbi.nlm.nih.gov/downloads/recombination/2008-03_rel22_B36/rates/&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For a full list of options that can be used in Batch Mode using a hitspec file, please see [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Plotting_options this list]&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1681</id>
		<title>LocusZoom</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1681"/>
		<updated>2010-06-10T19:59:46Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Plotting of Pairwise Linkage Disequilibrium */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:LocusZoomSmall.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LocusZoom&#039;&#039;&#039; is designed to facilitate viewing of local association results together with useful information about a locus, such as the location and orientation of the genes it includes, linkage disequilibrium coefficients and local estimates of recombination rates. It was developed by popular demand, as a result of many questions we have had about &amp;quot;How did you make the figures in your talk?&amp;quot; or &amp;quot;How did you make the figures for your GWAS paper?&amp;quot; (And for better or for worse, we have quite a few GWAS papers!!).&lt;br /&gt;
&lt;br /&gt;
LocusZoom can be used in four ways:&lt;br /&gt;
&lt;br /&gt;
; 1. Plot Summaries of Your Genomewide Scan Interactively&lt;br /&gt;
: You can upload summary results of your own genomewide scan or genomewide meta-analysis and request plots of regions of interest using a web-based form.&lt;br /&gt;
&lt;br /&gt;
; 2. Generate Many Plots in Batch Mode&lt;br /&gt;
: You can upload summary results for your genomewide scan or genomewide meta-analysis and request several plots in one go by uploading a batch file. You will receive results via e-mail. A snail-mail option is not available.&lt;br /&gt;
&lt;br /&gt;
; 3. Plot Summaries of Publicly Available Datasets&lt;br /&gt;
: Currently, this includes the results of [http://www.sph.umich.edu/csg/abecasis/public/lipids2008/ our genome-wide scan] for variants associated with HDL-cholesterol, LDL-cholesterol and triglyceride levels in ~20,000 individuals.&lt;br /&gt;
&lt;br /&gt;
; 4. Download LocusZoom and run on your local unix machine&lt;br /&gt;
: [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone Download LocusZoom] and [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Sources_of_SQLite_database_tables associated databases]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upload your own meta-analysis file and generate single plots using a web-based form  ==&lt;br /&gt;
&lt;br /&gt;
=== Uploading Your Association Study Results ===&lt;br /&gt;
&lt;br /&gt;
Association results can be uploaded to our web server using the [http://csg.sph.umich.edu/locuszoom/ plot your data webpage]. Result files are limited to 20Mb in size, which allows for a [[gzip|gzipped]] text table including key columns (marker name, p-value and sample size) for up to ~3 million SNPs. In our tests, a typical GWAS results file is ~17 Mb in size after imputation of HapMap SNPs. Once a file is uploaded, LocusZoom will remember the file for the duration of your web session allowing you to generate multiple plots. If you have a slow connection or would like to save time, you can upload results for a region or chromosome of interest only. Your results are entirely confidential and won&#039;t be viewed by us or anyone else (except those with whom you share them!)&lt;br /&gt;
&lt;br /&gt;
To specify the region to be plotted, you will have to specify the name of a key marker in the region (typically, as an rs-number), name a gene of interest or provide appropriate genome coordinates. When displaying linkage disequilibrium, plotting will be very fast for small windows when HapMap CEU linkage disequilibrium is requested (because pairwise coefficients have been precomputed) and will be a bit slower for larger windows (because linkage disequilibrium coefficients must be computed on the fly).&lt;br /&gt;
&lt;br /&gt;
If you include a sample size column in the result file, it will be used to control the size of each plotted marker.&lt;br /&gt;
&lt;br /&gt;
=== Custom Annotation ===&lt;br /&gt;
&lt;br /&gt;
You may choose to have SNPs displayed using different plotting symbols to distinguish them from each other.  To implement this, in the section &amp;quot;Custom Annotation&amp;quot; in the box &amp;quot;Column Name&amp;quot;, you need to provide the name of a column in your meta-analysis file.  This column will list a category for each SNP of your own choosing (i.e. &amp;quot;nonsynonymous&amp;quot;, &amp;quot;splice&amp;quot;,&amp;quot;intronic&amp;quot;,etc.) or (&amp;quot;Genotyped&amp;quot;,&amp;quot;Imputed&amp;quot;), however, the category names may not include any spaces.  To select the order of the categories to display in the legend and to match the order of pre-selected R plotting symbols (set as pch = 21, 22, 23, 24, 25, 4, 7, 8, 10, 11, 12, 13, 14, 3), you may provide the category names in the specified order in &amp;quot;Category Order&amp;quot; section of &amp;quot;Custom Annotation&amp;quot;.  Each entry (which may not contain spaces) does not need quotes but each entry should be separated by commas.&lt;br /&gt;
&lt;br /&gt;
Alternatively, we have provided functional annotation of all 1000 Genomes (Aug 2009) and HapMap r22 SNPs according to the following categories; Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). This can be implemented using the section &amp;quot;Show Annotation&amp;quot; and clicking the box beside each annotation category that you would like distinguished.  SNPs that are not in any selected category will still be displayed as having no annotation.&lt;br /&gt;
&lt;br /&gt;
=== Plotting of Pairwise Linkage Disequilibrium ===&lt;br /&gt;
&lt;br /&gt;
In the main plot window, data points are colored according to their level of linkage disequilibrium (LD) of the each SNP with the index SNP. If users specify the region to display using an index SNP and flanking region, LD of all data points will be relative to the user-specified index SNP. If users specify the region to display using genome coordinates or a gene name, LocusZoom will automatically select the most significant SNP in the region as the index SNP. For all other SNPs in the plot, the color of the data point will reflect the pairwise LD with this index SNP. The default LD measure is r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; calculated from the HapMap CEU population (release 22), but users have the option to replace this with D’ and of selecting the HapMap YRI, Hapmap CHB+JPT or 1000 Genomes CEU reference panels. To  display LD from 1000G CEU, please substitute rsid&#039;s for 1000G naming convention (chrxx:xxxx) whenever possible.  Because we have pre-computed LD for all SNPs in HapMap CEU, plots will often generate more quickly if using the default LD information. SNPs with missing LD information are shown in grey.&lt;br /&gt;
&lt;br /&gt;
=== Customizing the Display of Your Results ===&lt;br /&gt;
&lt;br /&gt;
All options listed in the Main Table above are available, as well as the options listed below&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Setting &lt;br /&gt;
! Default Value &lt;br /&gt;
! Details&lt;br /&gt;
|-&lt;br /&gt;
| Column Delimiter &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the type of column delimiter in the results file&lt;br /&gt;
|-&lt;br /&gt;
| Pvalue Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the name of the column that contains the p-values&lt;br /&gt;
|-&lt;br /&gt;
| Marker Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the heading of the column that contains marker names&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| none &lt;br /&gt;
| Plots can be generated based on hg18 (default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| HapMap Population for LD &lt;br /&gt;
| none &lt;br /&gt;
| This option allows the user to specify which HapMap population was used to obtain LD estimates. The default is CEU but users may select YRI or JPT+CHB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Batch Mode  ==&lt;br /&gt;
&lt;br /&gt;
To start batch mode, first upload your results file just as you would in interactive mode. The same file size restrictions apply.&lt;br /&gt;
&lt;br /&gt;
=== Generating a Hit Spec File ===&lt;br /&gt;
&lt;br /&gt;
Batch mode allows you to conveniently specify a set of plots to be generated in &amp;quot;Hit Spec&amp;quot; file. This is handy if you need to generate large numbers of plots or if you want to plot the same set of regions after updating a genomewide analysis (for example).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Hit Spec&amp;quot; file is a whitespace delimited text file. The file has six mandatory columns which can be followed by a series of optional &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs to allow for detailed customization of each plot. The first line in the file is assumed to be a header and is ignored. Each subsequent line describes a single plot. There are three ways to select a region to plot:&lt;br /&gt;
&lt;br /&gt;
; Plotting a window flanking an interesting SNP&lt;br /&gt;
: This option allows you to plot results for all markers within a specific distance (e.g. 500kb) of an index SNP. To use this option, set column 1 to have the name of the index SNP (e.g. &#039;&#039;rs2&#039;&#039; below) and set column 5 to specify the width of the region of interest (e.g. 500kb below). Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs1	   na	   na	    na       500kb        yes      rfrows=3 weightCol=”N” snpset=”HapMap” metalRug=”Our SNPs” &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking an interesting SNP&lt;br /&gt;
: This option is similar to the previous option, but allows you to specify an assymetric region of interest. For example, perhaps you interested in a plot that extends a bit further to the right of the SNP of interest. In this case, specify the coordinates of the region to be plotted in columns 2, 3, and 4. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs2	   1	   540000   580000   na	          yes      rfrows=4 legend=”right” showAnnot=T &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking a gene of interest&lt;br /&gt;
: This option allows you to focus on a particular gene, rather than a specific SNP. It is similar to the first option. You should set column 1 to be the name of the gene of interest and column 5 to be the desired window width. When you use this option, LocusZoom will automatically select an index SNP for each region; the SNP will be the site with the smallest p-value. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
CETP	   na      na	    na       200kb        yes      rfrows=6 showAnnot=T annotPch=”1,24,24,25,22,21,8,7”&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sixth column in the &amp;quot;Hit Spec&amp;quot; file can be used to enable (with the value &#039;&#039;yes&#039;&#039;) or disable (with the value &#039;&#039;no&#039;&#039;) an individual plot. For example, if you run a &amp;quot;Hit Spec&amp;quot; file with 15 plots and 14 of them turn out very nicely, you may wish to re-run the &amp;quot;Hit Spec&amp;quot; file with some tweaks to the problem plot. In this case (if you dislike waiting for your results as much as we do!), you could disable generation of the plots that seem nice by changing the 6th column to “no” and leave the plot that you tweaked as a “yes”.&lt;br /&gt;
&lt;br /&gt;
The 7th and final column contains additional LocusZoom arguments as &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs. Any number of &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pair arguments can be included. For details of available options, see the section entitled LocusZoom options below.&lt;br /&gt;
&lt;br /&gt;
== Generate single plots using our publicly-available lipids GWAS data  ==&lt;br /&gt;
&lt;br /&gt;
In addition to plotting your own results, you can plot the results of some publicly available GWAS. Currently, the only publicly available set of results is our GWAS for loci determining blood lipid levels (Kathiresan et al, Nature Genetics 2009). Just like when you are plotting your own data, you can specify 1) an index SNP and a flanking region, 2) the chromosome together with start and stop positions (in basepairs), or 3) gene name and a flanking region.&lt;br /&gt;
&lt;br /&gt;
== Commonly Used LocusZoom Options ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Web Form &lt;br /&gt;
! &amp;quot;Hit Spec&amp;quot; File Key-Value Pair &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Title on Plot &lt;br /&gt;
| title=”My Favorite Locus” &lt;br /&gt;
| Specifies large text displayed above the plot&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| n/a &lt;br /&gt;
| Plots can be generated based on hg18 (the default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| Legend Location &lt;br /&gt;
| legend=”left” &lt;br /&gt;
| This specifies the location of the legend within the plot, the default is auto. Auto tries to select a location that overlaps a minimal number of datapoints. (auto, left, right, none) &lt;br /&gt;
|-&lt;br /&gt;
| SNP Position Rug &lt;br /&gt;
| snpset=”HapMap” metalRug=”Rug SNPs” &lt;br /&gt;
| These options control display of tickmarks indicating SNP positions at the top of the plot. Setting snpset=&amp;quot;HapMap&amp;quot;, snpset=&amp;quot;Illu318&amp;quot; or snpset=&amp;quot;Affy500&amp;quot; display a fixed set of SNPs. (You can also try snpset=&amp;quot;Affy500,Illu318,HapMap&amp;quot; to see all 3). The metalRug option displays a rug which only includes the SNPs that are actually plotted. To remove the rug in batch mode set snpset=NULL. &lt;br /&gt;
|-&lt;br /&gt;
| Number of Rows for Gene Names &lt;br /&gt;
| rfrows=4 &lt;br /&gt;
| LocusZoom will automatically tries to determine the number of display rows to use for genes and gene names so they are not overlapping. This can make each plot prettier, but is not ideal when you want to compare many plots side by side. To ensure a fixed amount of space is used for gene names, use this option to set the maximum number of display rows. If LocusZoom runs out of plotting space and some genes are left out, a warning will be added to the plot.&lt;br /&gt;
|-&lt;br /&gt;
| Point Size  &lt;br /&gt;
| weightCol=”SampleSize” &lt;br /&gt;
| This specifies that the “dot size” of each data points will reflect the square-root of the sample size. The default is to have all dot sizes equal.&lt;br /&gt;
|-&lt;br /&gt;
| LD Measure &lt;br /&gt;
| ldCol=”dprime” (“rsquare”) &lt;br /&gt;
| Colors data points according to the selected LD  measure. The default is &amp;quot;rsquare&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| Reference Population for LD &lt;br /&gt;
| n/a &lt;br /&gt;
| This option allows the user to specify which reference panel is used to obtain LD estimates. The default is CEU from HapMap Phase II but users may select YRI or JPT+CHB from HapMap Phase II, or CEU from 1000 Genomes (August 2009 release).&lt;br /&gt;
|-&lt;br /&gt;
| Highlight Region of Interest &lt;br /&gt;
| hiStart=425Mb hiEnd=425.1Mb &lt;br /&gt;
| A grey box can be used to highlight important regions of the genome – this can reflect where an association signal peaks or a region selected for sequencing, for example.&lt;br /&gt;
|-&lt;br /&gt;
| Theme &lt;br /&gt;
| theme=”publication” &lt;br /&gt;
| We have created a theme that has larger text and is more easily readable for publication.&lt;br /&gt;
|-&lt;br /&gt;
| Show Annotation &lt;br /&gt;
| showAnnot=T showRefsnpAnnot=T annotPch=”21,24,24,25,22,22,8,7” &lt;br /&gt;
| SNP annotation is available for all 1000G SNPs (Aug 2009 release) and can be enabled with the showAnnot=T option. The annotPch command allows you to customize the R plotting symbol used for each kind of SNP; it is okay to use the same symbol for more than one category. The annotation categories, together with their default symbol setting are: Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). For more information about these annotation categories used, please see http://research.nhgri.nih.gov/tools/unisnp/?rm=ohelp&lt;br /&gt;
|-&lt;br /&gt;
| Recombination Rate Overlay &lt;br /&gt;
| showRecomb=T &lt;br /&gt;
| The estimated recombination rate from HapMap samples can be shown on the plot or left off. The data plotted are from Hapmap; http://hapmap.ncbi.nlm.nih.gov/downloads/recombination/2008-03_rel22_B36/rates/&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For a full list of options that can be used in Batch Mode using a hitspec file, please see [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Plotting_options this list]&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1652</id>
		<title>LocusZoom</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1652"/>
		<updated>2010-06-07T16:32:19Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Commonly Used LocusZoom Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:LocusZoomSmall.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LocusZoom&#039;&#039;&#039; is designed to facilitate viewing of local association results together with useful information about a locus, such as the location and orientation of the genes it includes, linkage disequilibrium coefficients and local estimates of recombination rates. It was developed by popular demand, as a result of many questions we have had about &amp;quot;How did you make the figures in your talk?&amp;quot; or &amp;quot;How did you make the figures for your GWAS paper?&amp;quot; (And for better or for worse, we have quite a few GWAS papers!!).&lt;br /&gt;
&lt;br /&gt;
LocusZoom can be used in four ways:&lt;br /&gt;
&lt;br /&gt;
; 1. Plot Summaries of Your Genomewide Scan Interactively&lt;br /&gt;
: You can upload summary results of your own genomewide scan or genomewide meta-analysis and request plots of regions of interest using a web-based form.&lt;br /&gt;
&lt;br /&gt;
; 2. Generate Many Plots in Batch Mode&lt;br /&gt;
: You can upload summary results for your genomewide scan or genomewide meta-analysis and request several plots in one go by uploading a batch file. You will receive results via e-mail. A snail-mail option is not available.&lt;br /&gt;
&lt;br /&gt;
; 3. Plot Summaries of Publicly Available Datasets&lt;br /&gt;
: Currently, this includes the results of [http://www.sph.umich.edu/csg/abecasis/public/lipids2008/ our genome-wide scan] for variants associated with HDL-cholesterol, LDL-cholesterol and triglyceride levels in ~20,000 individuals.&lt;br /&gt;
&lt;br /&gt;
; 4. Download LocusZoom and run on your local unix machine&lt;br /&gt;
: [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone Download LocusZoom] and [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Sources_of_SQLite_database_tables associated databases]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upload your own meta-analysis file and generate single plots using a web-based form  ==&lt;br /&gt;
&lt;br /&gt;
=== Uploading Your Association Study Results ===&lt;br /&gt;
&lt;br /&gt;
Association results can be uploaded to our web server using the [http://csg.sph.umich.edu/locuszoom/ plot your data webpage]. Result files are limited to 20Mb in size, which allows for a [[gzip|gzipped]] text table including key columns (marker name, p-value and sample size) for up to ~3 million SNPs. In our tests, a typical GWAS results file is ~17 Mb in size after imputation of HapMap SNPs. Once a file is uploaded, LocusZoom will remember the file for the duration of your web session allowing you to generate multiple plots. If you have a slow connection or would like to save time, you can upload results for a region or chromosome of interest only. Your results are entirely confidential and won&#039;t be viewed by us or anyone else (except those with whom you share them!)&lt;br /&gt;
&lt;br /&gt;
To specify the region to be plotted, you will have to specify the name of a key marker in the region (typically, as an rs-number), name a gene of interest or provide appropriate genome coordinates. When displaying linkage disequilibrium, plotting will be very fast for small windows when HapMap CEU linkage disequilibrium is requested (because pairwise coefficients have been precomputed) and will be a bit slower for larger windows (because linkage disequilibrium coefficients must be computed on the fly).&lt;br /&gt;
&lt;br /&gt;
If you include a sample size column in the result file, it will be used to control the size of each plotted marker.&lt;br /&gt;
&lt;br /&gt;
=== Custom Annotation ===&lt;br /&gt;
&lt;br /&gt;
You may choose to have SNPs displayed using different plotting symbols to distinguish them from each other.  To implement this, in the section &amp;quot;Custom Annotation&amp;quot; in the box &amp;quot;Column Name&amp;quot;, you need to provide the name of a column in your meta-analysis file.  This column will list a category for each SNP of your own choosing (i.e. &amp;quot;nonsynonymous&amp;quot;, &amp;quot;splice&amp;quot;,&amp;quot;intronic&amp;quot;,etc.) or (&amp;quot;Genotyped&amp;quot;,&amp;quot;Imputed&amp;quot;), however, the category names may not include any spaces.  To select the order of the categories to display in the legend and to match the order of pre-selected R plotting symbols (set as pch = 21, 22, 23, 24, 25, 4, 7, 8, 10, 11, 12, 13, 14, 3), you may provide the category names in the specified order in &amp;quot;Category Order&amp;quot; section of &amp;quot;Custom Annotation&amp;quot;.  Each entry (which may not contain spaces) does not need quotes but each entry should be separated by commas.&lt;br /&gt;
&lt;br /&gt;
Alternatively, we have provided functional annotation of all 1000 Genomes (Aug 2009) and HapMap r22 SNPs according to the following categories; Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). This can be implemented using the section &amp;quot;Show Annotation&amp;quot; and clicking the box beside each annotation category that you would like distinguished.  SNPs that are not in any selected category will still be displayed as having no annotation.&lt;br /&gt;
&lt;br /&gt;
=== Plotting of Pairwise Linkage Disequilibrium ===&lt;br /&gt;
&lt;br /&gt;
In the main plot window, data points are colored according to their level of linkage disequilibrium (LD) of the each SNP with the index SNP. If users specify the region to display using an index SNP and flanking region, LD of all data points will be relative to the user-specified index SNP. If users specify the region to display using genome coordinates or a gene name, LocusZoom will automatically select the most significant SNP in the region as the index SNP. For all other SNPs in the plot, the color of the data point will reflect the pairwise LD with this index SNP. The default LD measure is r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; calculated from the HapMap CEU population (release 22), but users have the option to replace this with D’ and of selecting the HapMap YRI, Hapmap CHB+JPT or 1000 Genomes CEU reference panels. Because we have pre-computed LD for all SNPs in HapMap CEU, plots will often generate more quickly if using the default LD information. SNPs with missing LD information are shown in grey.&lt;br /&gt;
&lt;br /&gt;
=== Customizing the Display of Your Results ===&lt;br /&gt;
&lt;br /&gt;
All options listed in the Main Table above are available, as well as the options listed below&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Setting &lt;br /&gt;
! Default Value &lt;br /&gt;
! Details&lt;br /&gt;
|-&lt;br /&gt;
| Column Delimiter &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the type of column delimiter in the results file&lt;br /&gt;
|-&lt;br /&gt;
| Pvalue Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the name of the column that contains the p-values&lt;br /&gt;
|-&lt;br /&gt;
| Marker Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the heading of the column that contains marker names&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| none &lt;br /&gt;
| Plots can be generated based on hg18 (default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| HapMap Population for LD &lt;br /&gt;
| none &lt;br /&gt;
| This option allows the user to specify which HapMap population was used to obtain LD estimates. The default is CEU but users may select YRI or JPT+CHB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Batch Mode  ==&lt;br /&gt;
&lt;br /&gt;
To start batch mode, first upload your results file just as you would in interactive mode. The same file size restrictions apply.&lt;br /&gt;
&lt;br /&gt;
=== Generating a Hit Spec File ===&lt;br /&gt;
&lt;br /&gt;
Batch mode allows you to conveniently specify a set of plots to be generated in &amp;quot;Hit Spec&amp;quot; file. This is handy if you need to generate large numbers of plots or if you want to plot the same set of regions after updating a genomewide analysis (for example).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Hit Spec&amp;quot; file is a whitespace delimited text file. The file has six mandatory columns which can be followed by a series of optional &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs to allow for detailed customization of each plot. The first line in the file is assumed to be a header and is ignored. Each subsequent line describes a single plot. There are three ways to select a region to plot:&lt;br /&gt;
&lt;br /&gt;
; Plotting a window flanking an interesting SNP&lt;br /&gt;
: This option allows you to plot results for all markers within a specific distance (e.g. 500kb) of an index SNP. To use this option, set column 1 to have the name of the index SNP (e.g. &#039;&#039;rs2&#039;&#039; below) and set column 5 to specify the width of the region of interest (e.g. 500kb below). Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs1	   na	   na	    na       500kb        yes      rfrows=3 weightCol=”N” snpset=”HapMap” metalRug=”Our SNPs” &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking an interesting SNP&lt;br /&gt;
: This option is similar to the previous option, but allows you to specify an assymetric region of interest. For example, perhaps you interested in a plot that extends a bit further to the right of the SNP of interest. In this case, specify the coordinates of the region to be plotted in columns 2, 3, and 4. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs2	   1	   540000   580000   na	          yes      rfrows=4 legend=”right” showAnnot=T &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking a gene of interest&lt;br /&gt;
: This option allows you to focus on a particular gene, rather than a specific SNP. It is similar to the first option. You should set column 1 to be the name of the gene of interest and column 5 to be the desired window width. When you use this option, LocusZoom will automatically select an index SNP for each region; the SNP will be the site with the smallest p-value. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
CETP	   na      na	    na       200kb        yes      rfrows=6 showAnnot=T annotPch=”1,24,24,25,22,21,8,7”&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sixth column in the &amp;quot;Hit Spec&amp;quot; file can be used to enable (with the value &#039;&#039;yes&#039;&#039;) or disable (with the value &#039;&#039;no&#039;&#039;) an individual plot. For example, if you run a &amp;quot;Hit Spec&amp;quot; file with 15 plots and 14 of them turn out very nicely, you may wish to re-run the &amp;quot;Hit Spec&amp;quot; file with some tweaks to the problem plot. In this case (if you dislike waiting for your results as much as we do!), you could disable generation of the plots that seem nice by changing the 6th column to “no” and leave the plot that you tweaked as a “yes”.&lt;br /&gt;
&lt;br /&gt;
The 7th and final column contains additional LocusZoom arguments as &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs. Any number of &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pair arguments can be included. For details of available options, see the section entitled LocusZoom options below.&lt;br /&gt;
&lt;br /&gt;
== Generate single plots using our publicly-available lipids GWAS data  ==&lt;br /&gt;
&lt;br /&gt;
In addition to plotting your own results, you can plot the results of some publicly available GWAS. Currently, the only publicly available set of results is our GWAS for loci determining blood lipid levels (Kathiresan et al, Nature Genetics 2009). Just like when you are plotting your own data, you can specify 1) an index SNP and a flanking region, 2) the chromosome together with start and stop positions (in basepairs), or 3) gene name and a flanking region.&lt;br /&gt;
&lt;br /&gt;
== Commonly Used LocusZoom Options ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Web Form &lt;br /&gt;
! &amp;quot;Hit Spec&amp;quot; File Key-Value Pair &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Title on Plot &lt;br /&gt;
| title=”My Favorite Locus” &lt;br /&gt;
| Specifies large text displayed above the plot&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| n/a &lt;br /&gt;
| Plots can be generated based on hg18 (the default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| Legend Location &lt;br /&gt;
| legend=”left” &lt;br /&gt;
| This specifies the location of the legend within the plot, the default is auto. Auto tries to select a location that overlaps a minimal number of datapoints. (auto, left, right, none) &lt;br /&gt;
|-&lt;br /&gt;
| SNP Position Rug &lt;br /&gt;
| snpset=”HapMap” metalRug=”Rug SNPs” &lt;br /&gt;
| These options control display of tickmarks indicating SNP positions at the top of the plot. Setting snpset=&amp;quot;HapMap&amp;quot;, snpset=&amp;quot;Illu318&amp;quot; or snpset=&amp;quot;Affy500&amp;quot; display a fixed set of SNPs. (You can also try snpset=&amp;quot;Affy500,Illu318,HapMap&amp;quot; to see all 3). The metalRug option displays a rug which only includes the SNPs that are actually plotted. To remove the rug in batch mode set snpset=NULL. &lt;br /&gt;
|-&lt;br /&gt;
| Number of Rows for Gene Names &lt;br /&gt;
| rfrows=4 &lt;br /&gt;
| LocusZoom will automatically tries to determine the number of display rows to use for genes and gene names so they are not overlapping. This can make each plot prettier, but is not ideal when you want to compare many plots side by side. To ensure a fixed amount of space is used for gene names, use this option to set the maximum number of display rows. If LocusZoom runs out of plotting space and some genes are left out, a warning will be added to the plot.&lt;br /&gt;
|-&lt;br /&gt;
| Point Size  &lt;br /&gt;
| weightCol=”SampleSize” &lt;br /&gt;
| This specifies that the “dot size” of each data points will reflect the square-root of the sample size. The default is to have all dot sizes equal.&lt;br /&gt;
|-&lt;br /&gt;
| LD Measure &lt;br /&gt;
| ldCol=”dprime” (“rsquare”) &lt;br /&gt;
| Colors data points according to the selected LD  measure. The default is &amp;quot;rsquare&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| Reference Population for LD &lt;br /&gt;
| n/a &lt;br /&gt;
| This option allows the user to specify which reference panel is used to obtain LD estimates. The default is CEU from HapMap Phase II but users may select YRI or JPT+CHB from HapMap Phase II, or CEU from 1000 Genomes (August 2009 release).&lt;br /&gt;
|-&lt;br /&gt;
| Highlight Region of Interest &lt;br /&gt;
| hiStart=425Mb hiEnd=425.1Mb &lt;br /&gt;
| A grey box can be used to highlight important regions of the genome – this can reflect where an association signal peaks or a region selected for sequencing, for example.&lt;br /&gt;
|-&lt;br /&gt;
| Theme &lt;br /&gt;
| theme=”publication” &lt;br /&gt;
| We have created a theme that has larger text and is more easily readable for publication.&lt;br /&gt;
|-&lt;br /&gt;
| Show Annotation &lt;br /&gt;
| showAnnot=T showRefsnpAnnot=T annotPch=”21,24,24,25,22,22,8,7” &lt;br /&gt;
| SNP annotation is available for all 1000G SNPs (Aug 2009 release) and can be enabled with the showAnnot=T option. The annotPch command allows you to customize the R plotting symbol used for each kind of SNP; it is okay to use the same symbol for more than one category. The annotation categories, together with their default symbol setting are: Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). For more information about these annotation categories used, please see http://research.nhgri.nih.gov/tools/unisnp/?rm=ohelp&lt;br /&gt;
|-&lt;br /&gt;
| Recombination Rate Overlay &lt;br /&gt;
| showRecomb=T &lt;br /&gt;
| The estimated recombination rate from HapMap samples can be shown on the plot or left off. The data plotted are from Hapmap; http://hapmap.ncbi.nlm.nih.gov/downloads/recombination/2008-03_rel22_B36/rates/&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For a full list of options that can be used in Batch Mode using a hitspec file, please see [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Plotting_options this list]&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1651</id>
		<title>LocusZoom</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1651"/>
		<updated>2010-06-07T16:31:39Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Commonly Used LocusZoom Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:LocusZoomSmall.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LocusZoom&#039;&#039;&#039; is designed to facilitate viewing of local association results together with useful information about a locus, such as the location and orientation of the genes it includes, linkage disequilibrium coefficients and local estimates of recombination rates. It was developed by popular demand, as a result of many questions we have had about &amp;quot;How did you make the figures in your talk?&amp;quot; or &amp;quot;How did you make the figures for your GWAS paper?&amp;quot; (And for better or for worse, we have quite a few GWAS papers!!).&lt;br /&gt;
&lt;br /&gt;
LocusZoom can be used in four ways:&lt;br /&gt;
&lt;br /&gt;
; 1. Plot Summaries of Your Genomewide Scan Interactively&lt;br /&gt;
: You can upload summary results of your own genomewide scan or genomewide meta-analysis and request plots of regions of interest using a web-based form.&lt;br /&gt;
&lt;br /&gt;
; 2. Generate Many Plots in Batch Mode&lt;br /&gt;
: You can upload summary results for your genomewide scan or genomewide meta-analysis and request several plots in one go by uploading a batch file. You will receive results via e-mail. A snail-mail option is not available.&lt;br /&gt;
&lt;br /&gt;
; 3. Plot Summaries of Publicly Available Datasets&lt;br /&gt;
: Currently, this includes the results of [http://www.sph.umich.edu/csg/abecasis/public/lipids2008/ our genome-wide scan] for variants associated with HDL-cholesterol, LDL-cholesterol and triglyceride levels in ~20,000 individuals.&lt;br /&gt;
&lt;br /&gt;
; 4. Download LocusZoom and run on your local unix machine&lt;br /&gt;
: [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone Download LocusZoom] and [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Sources_of_SQLite_database_tables associated databases]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upload your own meta-analysis file and generate single plots using a web-based form  ==&lt;br /&gt;
&lt;br /&gt;
=== Uploading Your Association Study Results ===&lt;br /&gt;
&lt;br /&gt;
Association results can be uploaded to our web server using the [http://csg.sph.umich.edu/locuszoom/ plot your data webpage]. Result files are limited to 20Mb in size, which allows for a [[gzip|gzipped]] text table including key columns (marker name, p-value and sample size) for up to ~3 million SNPs. In our tests, a typical GWAS results file is ~17 Mb in size after imputation of HapMap SNPs. Once a file is uploaded, LocusZoom will remember the file for the duration of your web session allowing you to generate multiple plots. If you have a slow connection or would like to save time, you can upload results for a region or chromosome of interest only. Your results are entirely confidential and won&#039;t be viewed by us or anyone else (except those with whom you share them!)&lt;br /&gt;
&lt;br /&gt;
To specify the region to be plotted, you will have to specify the name of a key marker in the region (typically, as an rs-number), name a gene of interest or provide appropriate genome coordinates. When displaying linkage disequilibrium, plotting will be very fast for small windows when HapMap CEU linkage disequilibrium is requested (because pairwise coefficients have been precomputed) and will be a bit slower for larger windows (because linkage disequilibrium coefficients must be computed on the fly).&lt;br /&gt;
&lt;br /&gt;
If you include a sample size column in the result file, it will be used to control the size of each plotted marker.&lt;br /&gt;
&lt;br /&gt;
=== Custom Annotation ===&lt;br /&gt;
&lt;br /&gt;
You may choose to have SNPs displayed using different plotting symbols to distinguish them from each other.  To implement this, in the section &amp;quot;Custom Annotation&amp;quot; in the box &amp;quot;Column Name&amp;quot;, you need to provide the name of a column in your meta-analysis file.  This column will list a category for each SNP of your own choosing (i.e. &amp;quot;nonsynonymous&amp;quot;, &amp;quot;splice&amp;quot;,&amp;quot;intronic&amp;quot;,etc.) or (&amp;quot;Genotyped&amp;quot;,&amp;quot;Imputed&amp;quot;), however, the category names may not include any spaces.  To select the order of the categories to display in the legend and to match the order of pre-selected R plotting symbols (set as pch = 21, 22, 23, 24, 25, 4, 7, 8, 10, 11, 12, 13, 14, 3), you may provide the category names in the specified order in &amp;quot;Category Order&amp;quot; section of &amp;quot;Custom Annotation&amp;quot;.  Each entry (which may not contain spaces) does not need quotes but each entry should be separated by commas.&lt;br /&gt;
&lt;br /&gt;
Alternatively, we have provided functional annotation of all 1000 Genomes (Aug 2009) and HapMap r22 SNPs according to the following categories; Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). This can be implemented using the section &amp;quot;Show Annotation&amp;quot; and clicking the box beside each annotation category that you would like distinguished.  SNPs that are not in any selected category will still be displayed as having no annotation.&lt;br /&gt;
&lt;br /&gt;
=== Plotting of Pairwise Linkage Disequilibrium ===&lt;br /&gt;
&lt;br /&gt;
In the main plot window, data points are colored according to their level of linkage disequilibrium (LD) of the each SNP with the index SNP. If users specify the region to display using an index SNP and flanking region, LD of all data points will be relative to the user-specified index SNP. If users specify the region to display using genome coordinates or a gene name, LocusZoom will automatically select the most significant SNP in the region as the index SNP. For all other SNPs in the plot, the color of the data point will reflect the pairwise LD with this index SNP. The default LD measure is r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; calculated from the HapMap CEU population (release 22), but users have the option to replace this with D’ and of selecting the HapMap YRI, Hapmap CHB+JPT or 1000 Genomes CEU reference panels. Because we have pre-computed LD for all SNPs in HapMap CEU, plots will often generate more quickly if using the default LD information. SNPs with missing LD information are shown in grey.&lt;br /&gt;
&lt;br /&gt;
=== Customizing the Display of Your Results ===&lt;br /&gt;
&lt;br /&gt;
All options listed in the Main Table above are available, as well as the options listed below&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Setting &lt;br /&gt;
! Default Value &lt;br /&gt;
! Details&lt;br /&gt;
|-&lt;br /&gt;
| Column Delimiter &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the type of column delimiter in the results file&lt;br /&gt;
|-&lt;br /&gt;
| Pvalue Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the name of the column that contains the p-values&lt;br /&gt;
|-&lt;br /&gt;
| Marker Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the heading of the column that contains marker names&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| none &lt;br /&gt;
| Plots can be generated based on hg18 (default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| HapMap Population for LD &lt;br /&gt;
| none &lt;br /&gt;
| This option allows the user to specify which HapMap population was used to obtain LD estimates. The default is CEU but users may select YRI or JPT+CHB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Batch Mode  ==&lt;br /&gt;
&lt;br /&gt;
To start batch mode, first upload your results file just as you would in interactive mode. The same file size restrictions apply.&lt;br /&gt;
&lt;br /&gt;
=== Generating a Hit Spec File ===&lt;br /&gt;
&lt;br /&gt;
Batch mode allows you to conveniently specify a set of plots to be generated in &amp;quot;Hit Spec&amp;quot; file. This is handy if you need to generate large numbers of plots or if you want to plot the same set of regions after updating a genomewide analysis (for example).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Hit Spec&amp;quot; file is a whitespace delimited text file. The file has six mandatory columns which can be followed by a series of optional &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs to allow for detailed customization of each plot. The first line in the file is assumed to be a header and is ignored. Each subsequent line describes a single plot. There are three ways to select a region to plot:&lt;br /&gt;
&lt;br /&gt;
; Plotting a window flanking an interesting SNP&lt;br /&gt;
: This option allows you to plot results for all markers within a specific distance (e.g. 500kb) of an index SNP. To use this option, set column 1 to have the name of the index SNP (e.g. &#039;&#039;rs2&#039;&#039; below) and set column 5 to specify the width of the region of interest (e.g. 500kb below). Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs1	   na	   na	    na       500kb        yes      rfrows=3 weightCol=”N” snpset=”HapMap” metalRug=”Our SNPs” &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking an interesting SNP&lt;br /&gt;
: This option is similar to the previous option, but allows you to specify an assymetric region of interest. For example, perhaps you interested in a plot that extends a bit further to the right of the SNP of interest. In this case, specify the coordinates of the region to be plotted in columns 2, 3, and 4. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs2	   1	   540000   580000   na	          yes      rfrows=4 legend=”right” showAnnot=T &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking a gene of interest&lt;br /&gt;
: This option allows you to focus on a particular gene, rather than a specific SNP. It is similar to the first option. You should set column 1 to be the name of the gene of interest and column 5 to be the desired window width. When you use this option, LocusZoom will automatically select an index SNP for each region; the SNP will be the site with the smallest p-value. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
CETP	   na      na	    na       200kb        yes      rfrows=6 showAnnot=T annotPch=”1,24,24,25,22,21,8,7”&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sixth column in the &amp;quot;Hit Spec&amp;quot; file can be used to enable (with the value &#039;&#039;yes&#039;&#039;) or disable (with the value &#039;&#039;no&#039;&#039;) an individual plot. For example, if you run a &amp;quot;Hit Spec&amp;quot; file with 15 plots and 14 of them turn out very nicely, you may wish to re-run the &amp;quot;Hit Spec&amp;quot; file with some tweaks to the problem plot. In this case (if you dislike waiting for your results as much as we do!), you could disable generation of the plots that seem nice by changing the 6th column to “no” and leave the plot that you tweaked as a “yes”.&lt;br /&gt;
&lt;br /&gt;
The 7th and final column contains additional LocusZoom arguments as &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs. Any number of &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pair arguments can be included. For details of available options, see the section entitled LocusZoom options below.&lt;br /&gt;
&lt;br /&gt;
== Generate single plots using our publicly-available lipids GWAS data  ==&lt;br /&gt;
&lt;br /&gt;
In addition to plotting your own results, you can plot the results of some publicly available GWAS. Currently, the only publicly available set of results is our GWAS for loci determining blood lipid levels (Kathiresan et al, Nature Genetics 2009). Just like when you are plotting your own data, you can specify 1) an index SNP and a flanking region, 2) the chromosome together with start and stop positions (in basepairs), or 3) gene name and a flanking region.&lt;br /&gt;
&lt;br /&gt;
== Commonly Used LocusZoom Options ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Web Form &lt;br /&gt;
! &amp;quot;Hit Spec&amp;quot; File Key-Value Pair &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Title on Plot &lt;br /&gt;
| title=”My Favorite Locus” &lt;br /&gt;
| Specifies large text displayed above the plot&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| n/a &lt;br /&gt;
| Plots can be generated based on hg18 (the default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| Legend Location &lt;br /&gt;
| legend=”left” &lt;br /&gt;
| This specifies the location of the legend within the plot, the default is auto. Auto tries to select a location that overlaps a minimal number of datapoints. (auto, left, right, none) &lt;br /&gt;
|-&lt;br /&gt;
| SNP Position Rug &lt;br /&gt;
| snpset=”HapMap” metalRug=”Rug SNPs” &lt;br /&gt;
| These options control display of tickmarks indicating SNP positions at the top of the plot. Setting snpset=&amp;quot;HapMap&amp;quot;, snpset=&amp;quot;Illu318&amp;quot; or snpset=&amp;quot;Affy500&amp;quot; display a fixed set of SNPs. (You can also try snpset=&amp;quot;Affy500,Illu318,HapMap&amp;quot; to see all 3). The metalRug option displays a rug which only includes the SNPs that are actually plotted. To remove the rug in batch mode set snpset=NULL. &lt;br /&gt;
|-&lt;br /&gt;
| Number of Rows for Gene Names &lt;br /&gt;
| rfrows=4 &lt;br /&gt;
| LocusZoom will automatically tries to determine the number of display rows to use for genes and gene names so they are not overlapping. This can make each plot prettier, but is not ideal when you want to compare many plots side by side. To ensure a fixed amount of space is used for gene names, use this option to set the maximum number of display rows. If LocusZoom runs out of plotting space and some genes are left out, a warning will be added to the plot.&lt;br /&gt;
|-&lt;br /&gt;
| Point Size  &lt;br /&gt;
| weightCol=”SampleSize” &lt;br /&gt;
| This specifies that the “dot size” of each data points will reflect the square-root of the sample size. The default is to have all dot sizes equal.&lt;br /&gt;
|-&lt;br /&gt;
| LD Measure &lt;br /&gt;
| ldCol=”dprime” (“rsquare”) &lt;br /&gt;
| Colors data points according to the selected LD  measure. The default is &amp;quot;rsquare&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| Reference Population for LD &lt;br /&gt;
| n/a &lt;br /&gt;
| This option allows the user to specify which reference panel is used to obtain LD estimates. The default is CEU from HapMap Phase II but users may select YRI or JPT+CHB from HapMap Phase II, or CEU from 1000 Genomes (August 2009 release).&lt;br /&gt;
|-&lt;br /&gt;
| Highlight Region of Interest &lt;br /&gt;
| hiStart=425Mb hiEnd=425.1Mb &lt;br /&gt;
| A grey box can be used to highlight important regions of the genome – this can reflect where an association signal peaks or a region selected for sequencing, for example.&lt;br /&gt;
|-&lt;br /&gt;
| Theme &lt;br /&gt;
| theme=”publication” &lt;br /&gt;
| We have created a theme that has larger text and is more easily readable for publication.&lt;br /&gt;
|-&lt;br /&gt;
| Show Annotation &lt;br /&gt;
| showAnnot=T showRefsnpAnnot=T annotPch=”21,24,24,25,22,22,8,7” &lt;br /&gt;
| SNP annotation is available for all 1000G SNPs (Aug 2009 release) and can be enabled with the showAnnot=T option. The annotPch command allows you to customize the R plotting symbol used for each kind of SNP; it is okay to use the same symbol for more than one category. The annotation categories, together with their default symbol setting are: Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). For more information about these annotation categories used, please see http://research.nhgri.nih.gov/tools/unisnp/?rm=ohelp&lt;br /&gt;
|-&lt;br /&gt;
| Recombination Rate Overlay &lt;br /&gt;
| showRecomb=T &lt;br /&gt;
| The estimated recombination rate from HapMap samples can be shown on the plot or left off. The data plotted are from Hapmap; http://hapmap.ncbi.nlm.nih.gov/downloads/recombination/2008-03_rel22_B36/rates/&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For a full list of options that can be used in Batch Mode using a hitspec file, please see [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#LocusZoom_options this list]&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1649</id>
		<title>LocusZoom</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1649"/>
		<updated>2010-06-07T15:12:14Z</updated>

		<summary type="html">&lt;p&gt;Cristen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:LocusZoomSmall.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LocusZoom&#039;&#039;&#039; is designed to facilitate viewing of local association results together with useful information about a locus, such as the location and orientation of the genes it includes, linkage disequilibrium coefficients and local estimates of recombination rates. It was developed by popular demand, as a result of many questions we have had about &amp;quot;How did you make the figures in your talk?&amp;quot; or &amp;quot;How did you make the figures for your GWAS paper?&amp;quot; (And for better or for worse, we have quite a few GWAS papers!!).&lt;br /&gt;
&lt;br /&gt;
LocusZoom can be used in four ways:&lt;br /&gt;
&lt;br /&gt;
; 1. Plot Summaries of Your Genomewide Scan Interactively&lt;br /&gt;
: You can upload summary results of your own genomewide scan or genomewide meta-analysis and request plots of regions of interest using a web-based form.&lt;br /&gt;
&lt;br /&gt;
; 2. Generate Many Plots in Batch Mode&lt;br /&gt;
: You can upload summary results for your genomewide scan or genomewide meta-analysis and request several plots in one go by uploading a batch file. You will receive results via e-mail. A snail-mail option is not available.&lt;br /&gt;
&lt;br /&gt;
; 3. Plot Summaries of Publicly Available Datasets&lt;br /&gt;
: Currently, this includes the results of [http://www.sph.umich.edu/csg/abecasis/public/lipids2008/ our genome-wide scan] for variants associated with HDL-cholesterol, LDL-cholesterol and triglyceride levels in ~20,000 individuals.&lt;br /&gt;
&lt;br /&gt;
; 4. Download LocusZoom and run on your local unix machine&lt;br /&gt;
: [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone Download LocusZoom] and [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Sources_of_SQLite_database_tables associated databases]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upload your own meta-analysis file and generate single plots using a web-based form  ==&lt;br /&gt;
&lt;br /&gt;
=== Uploading Your Association Study Results ===&lt;br /&gt;
&lt;br /&gt;
Association results can be uploaded to our web server using the [http://csg.sph.umich.edu/locuszoom/ plot your data webpage]. Result files are limited to 20Mb in size, which allows for a [[gzip|gzipped]] text table including key columns (marker name, p-value and sample size) for up to ~3 million SNPs. In our tests, a typical GWAS results file is ~17 Mb in size after imputation of HapMap SNPs. Once a file is uploaded, LocusZoom will remember the file for the duration of your web session allowing you to generate multiple plots. If you have a slow connection or would like to save time, you can upload results for a region or chromosome of interest only. Your results are entirely confidential and won&#039;t be viewed by us or anyone else (except those with whom you share them!)&lt;br /&gt;
&lt;br /&gt;
To specify the region to be plotted, you will have to specify the name of a key marker in the region (typically, as an rs-number), name a gene of interest or provide appropriate genome coordinates. When displaying linkage disequilibrium, plotting will be very fast for small windows when HapMap CEU linkage disequilibrium is requested (because pairwise coefficients have been precomputed) and will be a bit slower for larger windows (because linkage disequilibrium coefficients must be computed on the fly).&lt;br /&gt;
&lt;br /&gt;
If you include a sample size column in the result file, it will be used to control the size of each plotted marker.&lt;br /&gt;
&lt;br /&gt;
=== Custom Annotation ===&lt;br /&gt;
&lt;br /&gt;
You may choose to have SNPs displayed using different plotting symbols to distinguish them from each other.  To implement this, in the section &amp;quot;Custom Annotation&amp;quot; in the box &amp;quot;Column Name&amp;quot;, you need to provide the name of a column in your meta-analysis file.  This column will list a category for each SNP of your own choosing (i.e. &amp;quot;nonsynonymous&amp;quot;, &amp;quot;splice&amp;quot;,&amp;quot;intronic&amp;quot;,etc.) or (&amp;quot;Genotyped&amp;quot;,&amp;quot;Imputed&amp;quot;), however, the category names may not include any spaces.  To select the order of the categories to display in the legend and to match the order of pre-selected R plotting symbols (set as pch = 21, 22, 23, 24, 25, 4, 7, 8, 10, 11, 12, 13, 14, 3), you may provide the category names in the specified order in &amp;quot;Category Order&amp;quot; section of &amp;quot;Custom Annotation&amp;quot;.  Each entry (which may not contain spaces) does not need quotes but each entry should be separated by commas.&lt;br /&gt;
&lt;br /&gt;
Alternatively, we have provided functional annotation of all 1000 Genomes (Aug 2009) and HapMap r22 SNPs according to the following categories; Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). This can be implemented using the section &amp;quot;Show Annotation&amp;quot; and clicking the box beside each annotation category that you would like distinguished.  SNPs that are not in any selected category will still be displayed as having no annotation.&lt;br /&gt;
&lt;br /&gt;
=== Plotting of Pairwise Linkage Disequilibrium ===&lt;br /&gt;
&lt;br /&gt;
In the main plot window, data points are colored according to their level of linkage disequilibrium (LD) of the each SNP with the index SNP. If users specify the region to display using an index SNP and flanking region, LD of all data points will be relative to the user-specified index SNP. If users specify the region to display using genome coordinates or a gene name, LocusZoom will automatically select the most significant SNP in the region as the index SNP. For all other SNPs in the plot, the color of the data point will reflect the pairwise LD with this index SNP. The default LD measure is r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; calculated from the HapMap CEU population (release 22), but users have the option to replace this with D’ and of selecting the HapMap YRI, Hapmap CHB+JPT or 1000 Genomes CEU reference panels. Because we have pre-computed LD for all SNPs in HapMap CEU, plots will often generate more quickly if using the default LD information. SNPs with missing LD information are shown in grey.&lt;br /&gt;
&lt;br /&gt;
=== Customizing the Display of Your Results ===&lt;br /&gt;
&lt;br /&gt;
All options listed in the Main Table above are available, as well as the options listed below&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Setting &lt;br /&gt;
! Default Value &lt;br /&gt;
! Details&lt;br /&gt;
|-&lt;br /&gt;
| Column Delimiter &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the type of column delimiter in the results file&lt;br /&gt;
|-&lt;br /&gt;
| Pvalue Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the name of the column that contains the p-values&lt;br /&gt;
|-&lt;br /&gt;
| Marker Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the heading of the column that contains marker names&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| none &lt;br /&gt;
| Plots can be generated based on hg18 (default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| HapMap Population for LD &lt;br /&gt;
| none &lt;br /&gt;
| This option allows the user to specify which HapMap population was used to obtain LD estimates. The default is CEU but users may select YRI or JPT+CHB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Batch Mode  ==&lt;br /&gt;
&lt;br /&gt;
To start batch mode, first upload your results file just as you would in interactive mode. The same file size restrictions apply.&lt;br /&gt;
&lt;br /&gt;
=== Generating a Hit Spec File ===&lt;br /&gt;
&lt;br /&gt;
Batch mode allows you to conveniently specify a set of plots to be generated in &amp;quot;Hit Spec&amp;quot; file. This is handy if you need to generate large numbers of plots or if you want to plot the same set of regions after updating a genomewide analysis (for example).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Hit Spec&amp;quot; file is a whitespace delimited text file. The file has six mandatory columns which can be followed by a series of optional &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs to allow for detailed customization of each plot. The first line in the file is assumed to be a header and is ignored. Each subsequent line describes a single plot. There are three ways to select a region to plot:&lt;br /&gt;
&lt;br /&gt;
; Plotting a window flanking an interesting SNP&lt;br /&gt;
: This option allows you to plot results for all markers within a specific distance (e.g. 500kb) of an index SNP. To use this option, set column 1 to have the name of the index SNP (e.g. &#039;&#039;rs2&#039;&#039; below) and set column 5 to specify the width of the region of interest (e.g. 500kb below). Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs1	   na	   na	    na       500kb        yes      rfrows=3 weightCol=”N” snpset=”HapMap” metalRug=”Our SNPs” &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking an interesting SNP&lt;br /&gt;
: This option is similar to the previous option, but allows you to specify an assymetric region of interest. For example, perhaps you interested in a plot that extends a bit further to the right of the SNP of interest. In this case, specify the coordinates of the region to be plotted in columns 2, 3, and 4. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs2	   1	   540000   580000   na	          yes      rfrows=4 legend=”right” showAnnot=T &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking a gene of interest&lt;br /&gt;
: This option allows you to focus on a particular gene, rather than a specific SNP. It is similar to the first option. You should set column 1 to be the name of the gene of interest and column 5 to be the desired window width. When you use this option, LocusZoom will automatically select an index SNP for each region; the SNP will be the site with the smallest p-value. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
CETP	   na      na	    na       200kb        yes      rfrows=6 showAnnot=T annotPch=”1,24,24,25,22,21,8,7”&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sixth column in the &amp;quot;Hit Spec&amp;quot; file can be used to enable (with the value &#039;&#039;yes&#039;&#039;) or disable (with the value &#039;&#039;no&#039;&#039;) an individual plot. For example, if you run a &amp;quot;Hit Spec&amp;quot; file with 15 plots and 14 of them turn out very nicely, you may wish to re-run the &amp;quot;Hit Spec&amp;quot; file with some tweaks to the problem plot. In this case (if you dislike waiting for your results as much as we do!), you could disable generation of the plots that seem nice by changing the 6th column to “no” and leave the plot that you tweaked as a “yes”.&lt;br /&gt;
&lt;br /&gt;
The 7th and final column contains additional LocusZoom arguments as &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs. Any number of &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pair arguments can be included. For details of available options, see the section entitled LocusZoom options below.&lt;br /&gt;
&lt;br /&gt;
== Generate single plots using our publicly-available lipids GWAS data  ==&lt;br /&gt;
&lt;br /&gt;
In addition to plotting your own results, you can plot the results of some publicly available GWAS. Currently, the only publicly available set of results is our GWAS for loci determining blood lipid levels (Kathiresan et al, Nature Genetics 2009). Just like when you are plotting your own data, you can specify 1) an index SNP and a flanking region, 2) the chromosome together with start and stop positions (in basepairs), or 3) gene name and a flanking region.&lt;br /&gt;
&lt;br /&gt;
== Commonly Used LocusZoom Options ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Web Form &lt;br /&gt;
! &amp;quot;Hit Spec&amp;quot; File Key-Value Pair &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Title on Plot &lt;br /&gt;
| title=”My Favorite Locus” &lt;br /&gt;
| Specifies large text displayed above the plot&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| n/a &lt;br /&gt;
| Plots can be generated based on hg18 (the default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| Legend Location &lt;br /&gt;
| legend=”left” &lt;br /&gt;
| This specifies the location of the legend within the plot, the default is auto. Auto tries to select a location that overlaps a minimal number of datapoints. (auto, left, right, none) &lt;br /&gt;
|-&lt;br /&gt;
| SNP Position Rug &lt;br /&gt;
| snpset=”HapMap” metalRug=”Rug SNPs” &lt;br /&gt;
| These options control display of tickmarks indicating SNP positions at the top of the plot. Setting snpset=&amp;quot;HapMap&amp;quot;, snpset=&amp;quot;Illu318&amp;quot; or snpset=&amp;quot;Affy500&amp;quot; display a fixed set of SNPs. (You can also try snpset=&amp;quot;Affy500,Illu318,HapMap&amp;quot; to see all 3). The metalRug option displays a rug which only includes the SNPs that are actually plotted. To remove the rug in batch mode set snpset=NULL. &lt;br /&gt;
|-&lt;br /&gt;
| Number of Rows for Gene Names &lt;br /&gt;
| rfrows=4 &lt;br /&gt;
| LocusZoom will automatically tries to determine the number of display rows to use for genes and gene names so they are not overlapping. This can make each plot prettier, but is not ideal when you want to compare many plots side by side. To ensure a fixed amount of space is used for gene names, use this option to set the maximum number of display rows. If LocusZoom runs out of plotting space and some genes are left out, a warning will be added to the plot.&lt;br /&gt;
|-&lt;br /&gt;
| Point Size  &lt;br /&gt;
| weightCol=”SampleSize” &lt;br /&gt;
| This specifies that the “dot size” of each data points will reflect the square-root of the sample size. The default is to have all dot sizes equal.&lt;br /&gt;
|-&lt;br /&gt;
| LD Measure &lt;br /&gt;
| ldCol=”dprime” (“rsquare”) &lt;br /&gt;
| Colors data points according to the selected LD  measure. The default is &amp;quot;rsquare&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| Reference Population for LD &lt;br /&gt;
| n/a &lt;br /&gt;
| This option allows the user to specify which reference panel is used to obtain LD estimates. The default is CEU from HapMap Phase II but users may select YRI or JPT+CHB from HapMap Phase II, or CEU from 1000 Genomes (August 2009 release).&lt;br /&gt;
|-&lt;br /&gt;
| Highlight Region of Interest &lt;br /&gt;
| hiStart=425Mb hiEnd=425.1Mb &lt;br /&gt;
| A grey box can be used to highlight important regions of the genome – this can reflect where an association signal peaks or a region selected for sequencing, for example.&lt;br /&gt;
|-&lt;br /&gt;
| Theme &lt;br /&gt;
| theme=”publication” &lt;br /&gt;
| We have created a theme that has larger text and is more easily readable for publication.&lt;br /&gt;
|-&lt;br /&gt;
| Show Annotation &lt;br /&gt;
| showAnnot=T showRefsnpAnnot=T annotPch=”21,24,24,25,22,22,8,7” &lt;br /&gt;
| SNP annotation is available for all 1000G SNPs (Aug 2009 release) and can be enabled with the showAnnot=T option. The annotPch command allows you to customize the R plotting symbol used for each kind of SNP; it is okay to use the same symbol for more than one category. The annotation categories, together with their default symbol setting are: Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). For more information about these annotation categories used, please see http://research.nhgri.nih.gov/tools/unisnp/?rm=ohelp&lt;br /&gt;
|-&lt;br /&gt;
| Recombination Rate Overlay &lt;br /&gt;
| showRecomb=T &lt;br /&gt;
| The estimated recombination rate from HapMap samples can be shown on the plot or left off. The data plotted are from Hapmap; http://hapmap.ncbi.nlm.nih.gov/downloads/recombination/2008-03_rel22_B36/rates/&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1648</id>
		<title>LocusZoom</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1648"/>
		<updated>2010-06-07T15:12:03Z</updated>

		<summary type="html">&lt;p&gt;Cristen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:LocusZoomSmall.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LocusZoom&#039;&#039;&#039; is designed to facilitate viewing of local association results together with useful information about a locus, such as the location and orientation of the genes it includes, linkage disequilibrium coefficients and local estimates of recombination rates. It was developed by popular demand, as a result of many questions we have had about &amp;quot;How did you make the figures in your talk?&amp;quot; or &amp;quot;How did you make the figures for your GWAS paper?&amp;quot; (And for better or for worse, we have quite a few GWAS papers!!).&lt;br /&gt;
&lt;br /&gt;
LocusZoom can be used in four ways:&lt;br /&gt;
&lt;br /&gt;
; 1. Plot Summaries of Your Genomewide Scan Interactively&lt;br /&gt;
: You can upload summary results of your own genomewide scan or genomewide meta-analysis and request plots of regions of interest using a web-based form.&lt;br /&gt;
&lt;br /&gt;
; 2. Generate Many Plots in Batch Mode&lt;br /&gt;
: You can upload summary results for your genomewide scan or genomewide meta-analysis and request several plots in one go by uploading a batch file. You will receive results via e-mail. A snail-mail option is not available.&lt;br /&gt;
&lt;br /&gt;
; 3. Plot Summaries of Publicly Available Datasets&lt;br /&gt;
: Currently, this includes the results of [http://www.sph.umich.edu/csg/abecasis/public/lipids2008/ our genome-wide scan] for variants associated with HDL-cholesterol, LDL-cholesterol and triglyceride levels in ~20,000 individuals.&lt;br /&gt;
&lt;br /&gt;
; 4. Download LocusZoom and run on your local unix machine&lt;br /&gt;
: *[http://genome.sph.umich.edu/wiki/LocusZoom_Standalone Download LocusZoom] and [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Sources_of_SQLite_database_tables associated databases]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upload your own meta-analysis file and generate single plots using a web-based form  ==&lt;br /&gt;
&lt;br /&gt;
=== Uploading Your Association Study Results ===&lt;br /&gt;
&lt;br /&gt;
Association results can be uploaded to our web server using the [http://csg.sph.umich.edu/locuszoom/ plot your data webpage]. Result files are limited to 20Mb in size, which allows for a [[gzip|gzipped]] text table including key columns (marker name, p-value and sample size) for up to ~3 million SNPs. In our tests, a typical GWAS results file is ~17 Mb in size after imputation of HapMap SNPs. Once a file is uploaded, LocusZoom will remember the file for the duration of your web session allowing you to generate multiple plots. If you have a slow connection or would like to save time, you can upload results for a region or chromosome of interest only. Your results are entirely confidential and won&#039;t be viewed by us or anyone else (except those with whom you share them!)&lt;br /&gt;
&lt;br /&gt;
To specify the region to be plotted, you will have to specify the name of a key marker in the region (typically, as an rs-number), name a gene of interest or provide appropriate genome coordinates. When displaying linkage disequilibrium, plotting will be very fast for small windows when HapMap CEU linkage disequilibrium is requested (because pairwise coefficients have been precomputed) and will be a bit slower for larger windows (because linkage disequilibrium coefficients must be computed on the fly).&lt;br /&gt;
&lt;br /&gt;
If you include a sample size column in the result file, it will be used to control the size of each plotted marker.&lt;br /&gt;
&lt;br /&gt;
=== Custom Annotation ===&lt;br /&gt;
&lt;br /&gt;
You may choose to have SNPs displayed using different plotting symbols to distinguish them from each other.  To implement this, in the section &amp;quot;Custom Annotation&amp;quot; in the box &amp;quot;Column Name&amp;quot;, you need to provide the name of a column in your meta-analysis file.  This column will list a category for each SNP of your own choosing (i.e. &amp;quot;nonsynonymous&amp;quot;, &amp;quot;splice&amp;quot;,&amp;quot;intronic&amp;quot;,etc.) or (&amp;quot;Genotyped&amp;quot;,&amp;quot;Imputed&amp;quot;), however, the category names may not include any spaces.  To select the order of the categories to display in the legend and to match the order of pre-selected R plotting symbols (set as pch = 21, 22, 23, 24, 25, 4, 7, 8, 10, 11, 12, 13, 14, 3), you may provide the category names in the specified order in &amp;quot;Category Order&amp;quot; section of &amp;quot;Custom Annotation&amp;quot;.  Each entry (which may not contain spaces) does not need quotes but each entry should be separated by commas.&lt;br /&gt;
&lt;br /&gt;
Alternatively, we have provided functional annotation of all 1000 Genomes (Aug 2009) and HapMap r22 SNPs according to the following categories; Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). This can be implemented using the section &amp;quot;Show Annotation&amp;quot; and clicking the box beside each annotation category that you would like distinguished.  SNPs that are not in any selected category will still be displayed as having no annotation.&lt;br /&gt;
&lt;br /&gt;
=== Plotting of Pairwise Linkage Disequilibrium ===&lt;br /&gt;
&lt;br /&gt;
In the main plot window, data points are colored according to their level of linkage disequilibrium (LD) of the each SNP with the index SNP. If users specify the region to display using an index SNP and flanking region, LD of all data points will be relative to the user-specified index SNP. If users specify the region to display using genome coordinates or a gene name, LocusZoom will automatically select the most significant SNP in the region as the index SNP. For all other SNPs in the plot, the color of the data point will reflect the pairwise LD with this index SNP. The default LD measure is r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; calculated from the HapMap CEU population (release 22), but users have the option to replace this with D’ and of selecting the HapMap YRI, Hapmap CHB+JPT or 1000 Genomes CEU reference panels. Because we have pre-computed LD for all SNPs in HapMap CEU, plots will often generate more quickly if using the default LD information. SNPs with missing LD information are shown in grey.&lt;br /&gt;
&lt;br /&gt;
=== Customizing the Display of Your Results ===&lt;br /&gt;
&lt;br /&gt;
All options listed in the Main Table above are available, as well as the options listed below&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Setting &lt;br /&gt;
! Default Value &lt;br /&gt;
! Details&lt;br /&gt;
|-&lt;br /&gt;
| Column Delimiter &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the type of column delimiter in the results file&lt;br /&gt;
|-&lt;br /&gt;
| Pvalue Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the name of the column that contains the p-values&lt;br /&gt;
|-&lt;br /&gt;
| Marker Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the heading of the column that contains marker names&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| none &lt;br /&gt;
| Plots can be generated based on hg18 (default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| HapMap Population for LD &lt;br /&gt;
| none &lt;br /&gt;
| This option allows the user to specify which HapMap population was used to obtain LD estimates. The default is CEU but users may select YRI or JPT+CHB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Batch Mode  ==&lt;br /&gt;
&lt;br /&gt;
To start batch mode, first upload your results file just as you would in interactive mode. The same file size restrictions apply.&lt;br /&gt;
&lt;br /&gt;
=== Generating a Hit Spec File ===&lt;br /&gt;
&lt;br /&gt;
Batch mode allows you to conveniently specify a set of plots to be generated in &amp;quot;Hit Spec&amp;quot; file. This is handy if you need to generate large numbers of plots or if you want to plot the same set of regions after updating a genomewide analysis (for example).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Hit Spec&amp;quot; file is a whitespace delimited text file. The file has six mandatory columns which can be followed by a series of optional &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs to allow for detailed customization of each plot. The first line in the file is assumed to be a header and is ignored. Each subsequent line describes a single plot. There are three ways to select a region to plot:&lt;br /&gt;
&lt;br /&gt;
; Plotting a window flanking an interesting SNP&lt;br /&gt;
: This option allows you to plot results for all markers within a specific distance (e.g. 500kb) of an index SNP. To use this option, set column 1 to have the name of the index SNP (e.g. &#039;&#039;rs2&#039;&#039; below) and set column 5 to specify the width of the region of interest (e.g. 500kb below). Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs1	   na	   na	    na       500kb        yes      rfrows=3 weightCol=”N” snpset=”HapMap” metalRug=”Our SNPs” &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking an interesting SNP&lt;br /&gt;
: This option is similar to the previous option, but allows you to specify an assymetric region of interest. For example, perhaps you interested in a plot that extends a bit further to the right of the SNP of interest. In this case, specify the coordinates of the region to be plotted in columns 2, 3, and 4. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs2	   1	   540000   580000   na	          yes      rfrows=4 legend=”right” showAnnot=T &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking a gene of interest&lt;br /&gt;
: This option allows you to focus on a particular gene, rather than a specific SNP. It is similar to the first option. You should set column 1 to be the name of the gene of interest and column 5 to be the desired window width. When you use this option, LocusZoom will automatically select an index SNP for each region; the SNP will be the site with the smallest p-value. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
CETP	   na      na	    na       200kb        yes      rfrows=6 showAnnot=T annotPch=”1,24,24,25,22,21,8,7”&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sixth column in the &amp;quot;Hit Spec&amp;quot; file can be used to enable (with the value &#039;&#039;yes&#039;&#039;) or disable (with the value &#039;&#039;no&#039;&#039;) an individual plot. For example, if you run a &amp;quot;Hit Spec&amp;quot; file with 15 plots and 14 of them turn out very nicely, you may wish to re-run the &amp;quot;Hit Spec&amp;quot; file with some tweaks to the problem plot. In this case (if you dislike waiting for your results as much as we do!), you could disable generation of the plots that seem nice by changing the 6th column to “no” and leave the plot that you tweaked as a “yes”.&lt;br /&gt;
&lt;br /&gt;
The 7th and final column contains additional LocusZoom arguments as &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs. Any number of &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pair arguments can be included. For details of available options, see the section entitled LocusZoom options below.&lt;br /&gt;
&lt;br /&gt;
== Generate single plots using our publicly-available lipids GWAS data  ==&lt;br /&gt;
&lt;br /&gt;
In addition to plotting your own results, you can plot the results of some publicly available GWAS. Currently, the only publicly available set of results is our GWAS for loci determining blood lipid levels (Kathiresan et al, Nature Genetics 2009). Just like when you are plotting your own data, you can specify 1) an index SNP and a flanking region, 2) the chromosome together with start and stop positions (in basepairs), or 3) gene name and a flanking region.&lt;br /&gt;
&lt;br /&gt;
== Commonly Used LocusZoom Options ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Web Form &lt;br /&gt;
! &amp;quot;Hit Spec&amp;quot; File Key-Value Pair &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Title on Plot &lt;br /&gt;
| title=”My Favorite Locus” &lt;br /&gt;
| Specifies large text displayed above the plot&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| n/a &lt;br /&gt;
| Plots can be generated based on hg18 (the default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| Legend Location &lt;br /&gt;
| legend=”left” &lt;br /&gt;
| This specifies the location of the legend within the plot, the default is auto. Auto tries to select a location that overlaps a minimal number of datapoints. (auto, left, right, none) &lt;br /&gt;
|-&lt;br /&gt;
| SNP Position Rug &lt;br /&gt;
| snpset=”HapMap” metalRug=”Rug SNPs” &lt;br /&gt;
| These options control display of tickmarks indicating SNP positions at the top of the plot. Setting snpset=&amp;quot;HapMap&amp;quot;, snpset=&amp;quot;Illu318&amp;quot; or snpset=&amp;quot;Affy500&amp;quot; display a fixed set of SNPs. (You can also try snpset=&amp;quot;Affy500,Illu318,HapMap&amp;quot; to see all 3). The metalRug option displays a rug which only includes the SNPs that are actually plotted. To remove the rug in batch mode set snpset=NULL. &lt;br /&gt;
|-&lt;br /&gt;
| Number of Rows for Gene Names &lt;br /&gt;
| rfrows=4 &lt;br /&gt;
| LocusZoom will automatically tries to determine the number of display rows to use for genes and gene names so they are not overlapping. This can make each plot prettier, but is not ideal when you want to compare many plots side by side. To ensure a fixed amount of space is used for gene names, use this option to set the maximum number of display rows. If LocusZoom runs out of plotting space and some genes are left out, a warning will be added to the plot.&lt;br /&gt;
|-&lt;br /&gt;
| Point Size  &lt;br /&gt;
| weightCol=”SampleSize” &lt;br /&gt;
| This specifies that the “dot size” of each data points will reflect the square-root of the sample size. The default is to have all dot sizes equal.&lt;br /&gt;
|-&lt;br /&gt;
| LD Measure &lt;br /&gt;
| ldCol=”dprime” (“rsquare”) &lt;br /&gt;
| Colors data points according to the selected LD  measure. The default is &amp;quot;rsquare&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| Reference Population for LD &lt;br /&gt;
| n/a &lt;br /&gt;
| This option allows the user to specify which reference panel is used to obtain LD estimates. The default is CEU from HapMap Phase II but users may select YRI or JPT+CHB from HapMap Phase II, or CEU from 1000 Genomes (August 2009 release).&lt;br /&gt;
|-&lt;br /&gt;
| Highlight Region of Interest &lt;br /&gt;
| hiStart=425Mb hiEnd=425.1Mb &lt;br /&gt;
| A grey box can be used to highlight important regions of the genome – this can reflect where an association signal peaks or a region selected for sequencing, for example.&lt;br /&gt;
|-&lt;br /&gt;
| Theme &lt;br /&gt;
| theme=”publication” &lt;br /&gt;
| We have created a theme that has larger text and is more easily readable for publication.&lt;br /&gt;
|-&lt;br /&gt;
| Show Annotation &lt;br /&gt;
| showAnnot=T showRefsnpAnnot=T annotPch=”21,24,24,25,22,22,8,7” &lt;br /&gt;
| SNP annotation is available for all 1000G SNPs (Aug 2009 release) and can be enabled with the showAnnot=T option. The annotPch command allows you to customize the R plotting symbol used for each kind of SNP; it is okay to use the same symbol for more than one category. The annotation categories, together with their default symbol setting are: Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). For more information about these annotation categories used, please see http://research.nhgri.nih.gov/tools/unisnp/?rm=ohelp&lt;br /&gt;
|-&lt;br /&gt;
| Recombination Rate Overlay &lt;br /&gt;
| showRecomb=T &lt;br /&gt;
| The estimated recombination rate from HapMap samples can be shown on the plot or left off. The data plotted are from Hapmap; http://hapmap.ncbi.nlm.nih.gov/downloads/recombination/2008-03_rel22_B36/rates/&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1647</id>
		<title>LocusZoom</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1647"/>
		<updated>2010-06-07T15:11:45Z</updated>

		<summary type="html">&lt;p&gt;Cristen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:LocusZoomSmall.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LocusZoom&#039;&#039;&#039; is designed to facilitate viewing of local association results together with useful information about a locus, such as the location and orientation of the genes it includes, linkage disequilibrium coefficients and local estimates of recombination rates. It was developed by popular demand, as a result of many questions we have had about &amp;quot;How did you make the figures in your talk?&amp;quot; or &amp;quot;How did you make the figures for your GWAS paper?&amp;quot; (And for better or for worse, we have quite a few GWAS papers!!).&lt;br /&gt;
&lt;br /&gt;
LocusZoom can be used in four ways:&lt;br /&gt;
&lt;br /&gt;
; 1. Plot Summaries of Your Genomewide Scan Interactively&lt;br /&gt;
: You can upload summary results of your own genomewide scan or genomewide meta-analysis and request plots of regions of interest using a web-based form.&lt;br /&gt;
&lt;br /&gt;
; 2. Generate Many Plots in Batch Mode&lt;br /&gt;
: You can upload summary results for your genomewide scan or genomewide meta-analysis and request several plots in one go by uploading a batch file. You will receive results via e-mail. A snail-mail option is not available.&lt;br /&gt;
&lt;br /&gt;
; 3. Plot Summaries of Publicly Available Datasets&lt;br /&gt;
: Currently, this includes the results of [http://www.sph.umich.edu/csg/abecasis/public/lipids2008/ our genome-wide scan] for variants associated with HDL-cholesterol, LDL-cholesterol and triglyceride levels in ~20,000 individuals.&lt;br /&gt;
&lt;br /&gt;
; 4. Download LocusZoom and run on your local unix machine&lt;br /&gt;
*[http://genome.sph.umich.edu/wiki/LocusZoom_Standalone Download LocusZoom] and [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Sources_of_SQLite_database_tables associated databases]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upload your own meta-analysis file and generate single plots using a web-based form  ==&lt;br /&gt;
&lt;br /&gt;
=== Uploading Your Association Study Results ===&lt;br /&gt;
&lt;br /&gt;
Association results can be uploaded to our web server using the [http://csg.sph.umich.edu/locuszoom/ plot your data webpage]. Result files are limited to 20Mb in size, which allows for a [[gzip|gzipped]] text table including key columns (marker name, p-value and sample size) for up to ~3 million SNPs. In our tests, a typical GWAS results file is ~17 Mb in size after imputation of HapMap SNPs. Once a file is uploaded, LocusZoom will remember the file for the duration of your web session allowing you to generate multiple plots. If you have a slow connection or would like to save time, you can upload results for a region or chromosome of interest only. Your results are entirely confidential and won&#039;t be viewed by us or anyone else (except those with whom you share them!)&lt;br /&gt;
&lt;br /&gt;
To specify the region to be plotted, you will have to specify the name of a key marker in the region (typically, as an rs-number), name a gene of interest or provide appropriate genome coordinates. When displaying linkage disequilibrium, plotting will be very fast for small windows when HapMap CEU linkage disequilibrium is requested (because pairwise coefficients have been precomputed) and will be a bit slower for larger windows (because linkage disequilibrium coefficients must be computed on the fly).&lt;br /&gt;
&lt;br /&gt;
If you include a sample size column in the result file, it will be used to control the size of each plotted marker.&lt;br /&gt;
&lt;br /&gt;
=== Custom Annotation ===&lt;br /&gt;
&lt;br /&gt;
You may choose to have SNPs displayed using different plotting symbols to distinguish them from each other.  To implement this, in the section &amp;quot;Custom Annotation&amp;quot; in the box &amp;quot;Column Name&amp;quot;, you need to provide the name of a column in your meta-analysis file.  This column will list a category for each SNP of your own choosing (i.e. &amp;quot;nonsynonymous&amp;quot;, &amp;quot;splice&amp;quot;,&amp;quot;intronic&amp;quot;,etc.) or (&amp;quot;Genotyped&amp;quot;,&amp;quot;Imputed&amp;quot;), however, the category names may not include any spaces.  To select the order of the categories to display in the legend and to match the order of pre-selected R plotting symbols (set as pch = 21, 22, 23, 24, 25, 4, 7, 8, 10, 11, 12, 13, 14, 3), you may provide the category names in the specified order in &amp;quot;Category Order&amp;quot; section of &amp;quot;Custom Annotation&amp;quot;.  Each entry (which may not contain spaces) does not need quotes but each entry should be separated by commas.&lt;br /&gt;
&lt;br /&gt;
Alternatively, we have provided functional annotation of all 1000 Genomes (Aug 2009) and HapMap r22 SNPs according to the following categories; Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). This can be implemented using the section &amp;quot;Show Annotation&amp;quot; and clicking the box beside each annotation category that you would like distinguished.  SNPs that are not in any selected category will still be displayed as having no annotation.&lt;br /&gt;
&lt;br /&gt;
=== Plotting of Pairwise Linkage Disequilibrium ===&lt;br /&gt;
&lt;br /&gt;
In the main plot window, data points are colored according to their level of linkage disequilibrium (LD) of the each SNP with the index SNP. If users specify the region to display using an index SNP and flanking region, LD of all data points will be relative to the user-specified index SNP. If users specify the region to display using genome coordinates or a gene name, LocusZoom will automatically select the most significant SNP in the region as the index SNP. For all other SNPs in the plot, the color of the data point will reflect the pairwise LD with this index SNP. The default LD measure is r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; calculated from the HapMap CEU population (release 22), but users have the option to replace this with D’ and of selecting the HapMap YRI, Hapmap CHB+JPT or 1000 Genomes CEU reference panels. Because we have pre-computed LD for all SNPs in HapMap CEU, plots will often generate more quickly if using the default LD information. SNPs with missing LD information are shown in grey.&lt;br /&gt;
&lt;br /&gt;
=== Customizing the Display of Your Results ===&lt;br /&gt;
&lt;br /&gt;
All options listed in the Main Table above are available, as well as the options listed below&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Setting &lt;br /&gt;
! Default Value &lt;br /&gt;
! Details&lt;br /&gt;
|-&lt;br /&gt;
| Column Delimiter &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the type of column delimiter in the results file&lt;br /&gt;
|-&lt;br /&gt;
| Pvalue Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the name of the column that contains the p-values&lt;br /&gt;
|-&lt;br /&gt;
| Marker Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the heading of the column that contains marker names&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| none &lt;br /&gt;
| Plots can be generated based on hg18 (default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| HapMap Population for LD &lt;br /&gt;
| none &lt;br /&gt;
| This option allows the user to specify which HapMap population was used to obtain LD estimates. The default is CEU but users may select YRI or JPT+CHB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Batch Mode  ==&lt;br /&gt;
&lt;br /&gt;
To start batch mode, first upload your results file just as you would in interactive mode. The same file size restrictions apply.&lt;br /&gt;
&lt;br /&gt;
=== Generating a Hit Spec File ===&lt;br /&gt;
&lt;br /&gt;
Batch mode allows you to conveniently specify a set of plots to be generated in &amp;quot;Hit Spec&amp;quot; file. This is handy if you need to generate large numbers of plots or if you want to plot the same set of regions after updating a genomewide analysis (for example).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Hit Spec&amp;quot; file is a whitespace delimited text file. The file has six mandatory columns which can be followed by a series of optional &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs to allow for detailed customization of each plot. The first line in the file is assumed to be a header and is ignored. Each subsequent line describes a single plot. There are three ways to select a region to plot:&lt;br /&gt;
&lt;br /&gt;
; Plotting a window flanking an interesting SNP&lt;br /&gt;
: This option allows you to plot results for all markers within a specific distance (e.g. 500kb) of an index SNP. To use this option, set column 1 to have the name of the index SNP (e.g. &#039;&#039;rs2&#039;&#039; below) and set column 5 to specify the width of the region of interest (e.g. 500kb below). Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs1	   na	   na	    na       500kb        yes      rfrows=3 weightCol=”N” snpset=”HapMap” metalRug=”Our SNPs” &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking an interesting SNP&lt;br /&gt;
: This option is similar to the previous option, but allows you to specify an assymetric region of interest. For example, perhaps you interested in a plot that extends a bit further to the right of the SNP of interest. In this case, specify the coordinates of the region to be plotted in columns 2, 3, and 4. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs2	   1	   540000   580000   na	          yes      rfrows=4 legend=”right” showAnnot=T &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking a gene of interest&lt;br /&gt;
: This option allows you to focus on a particular gene, rather than a specific SNP. It is similar to the first option. You should set column 1 to be the name of the gene of interest and column 5 to be the desired window width. When you use this option, LocusZoom will automatically select an index SNP for each region; the SNP will be the site with the smallest p-value. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
CETP	   na      na	    na       200kb        yes      rfrows=6 showAnnot=T annotPch=”1,24,24,25,22,21,8,7”&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sixth column in the &amp;quot;Hit Spec&amp;quot; file can be used to enable (with the value &#039;&#039;yes&#039;&#039;) or disable (with the value &#039;&#039;no&#039;&#039;) an individual plot. For example, if you run a &amp;quot;Hit Spec&amp;quot; file with 15 plots and 14 of them turn out very nicely, you may wish to re-run the &amp;quot;Hit Spec&amp;quot; file with some tweaks to the problem plot. In this case (if you dislike waiting for your results as much as we do!), you could disable generation of the plots that seem nice by changing the 6th column to “no” and leave the plot that you tweaked as a “yes”.&lt;br /&gt;
&lt;br /&gt;
The 7th and final column contains additional LocusZoom arguments as &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs. Any number of &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pair arguments can be included. For details of available options, see the section entitled LocusZoom options below.&lt;br /&gt;
&lt;br /&gt;
== Generate single plots using our publicly-available lipids GWAS data  ==&lt;br /&gt;
&lt;br /&gt;
In addition to plotting your own results, you can plot the results of some publicly available GWAS. Currently, the only publicly available set of results is our GWAS for loci determining blood lipid levels (Kathiresan et al, Nature Genetics 2009). Just like when you are plotting your own data, you can specify 1) an index SNP and a flanking region, 2) the chromosome together with start and stop positions (in basepairs), or 3) gene name and a flanking region.&lt;br /&gt;
&lt;br /&gt;
== Commonly Used LocusZoom Options ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Web Form &lt;br /&gt;
! &amp;quot;Hit Spec&amp;quot; File Key-Value Pair &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Title on Plot &lt;br /&gt;
| title=”My Favorite Locus” &lt;br /&gt;
| Specifies large text displayed above the plot&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| n/a &lt;br /&gt;
| Plots can be generated based on hg18 (the default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| Legend Location &lt;br /&gt;
| legend=”left” &lt;br /&gt;
| This specifies the location of the legend within the plot, the default is auto. Auto tries to select a location that overlaps a minimal number of datapoints. (auto, left, right, none) &lt;br /&gt;
|-&lt;br /&gt;
| SNP Position Rug &lt;br /&gt;
| snpset=”HapMap” metalRug=”Rug SNPs” &lt;br /&gt;
| These options control display of tickmarks indicating SNP positions at the top of the plot. Setting snpset=&amp;quot;HapMap&amp;quot;, snpset=&amp;quot;Illu318&amp;quot; or snpset=&amp;quot;Affy500&amp;quot; display a fixed set of SNPs. (You can also try snpset=&amp;quot;Affy500,Illu318,HapMap&amp;quot; to see all 3). The metalRug option displays a rug which only includes the SNPs that are actually plotted. To remove the rug in batch mode set snpset=NULL. &lt;br /&gt;
|-&lt;br /&gt;
| Number of Rows for Gene Names &lt;br /&gt;
| rfrows=4 &lt;br /&gt;
| LocusZoom will automatically tries to determine the number of display rows to use for genes and gene names so they are not overlapping. This can make each plot prettier, but is not ideal when you want to compare many plots side by side. To ensure a fixed amount of space is used for gene names, use this option to set the maximum number of display rows. If LocusZoom runs out of plotting space and some genes are left out, a warning will be added to the plot.&lt;br /&gt;
|-&lt;br /&gt;
| Point Size  &lt;br /&gt;
| weightCol=”SampleSize” &lt;br /&gt;
| This specifies that the “dot size” of each data points will reflect the square-root of the sample size. The default is to have all dot sizes equal.&lt;br /&gt;
|-&lt;br /&gt;
| LD Measure &lt;br /&gt;
| ldCol=”dprime” (“rsquare”) &lt;br /&gt;
| Colors data points according to the selected LD  measure. The default is &amp;quot;rsquare&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| Reference Population for LD &lt;br /&gt;
| n/a &lt;br /&gt;
| This option allows the user to specify which reference panel is used to obtain LD estimates. The default is CEU from HapMap Phase II but users may select YRI or JPT+CHB from HapMap Phase II, or CEU from 1000 Genomes (August 2009 release).&lt;br /&gt;
|-&lt;br /&gt;
| Highlight Region of Interest &lt;br /&gt;
| hiStart=425Mb hiEnd=425.1Mb &lt;br /&gt;
| A grey box can be used to highlight important regions of the genome – this can reflect where an association signal peaks or a region selected for sequencing, for example.&lt;br /&gt;
|-&lt;br /&gt;
| Theme &lt;br /&gt;
| theme=”publication” &lt;br /&gt;
| We have created a theme that has larger text and is more easily readable for publication.&lt;br /&gt;
|-&lt;br /&gt;
| Show Annotation &lt;br /&gt;
| showAnnot=T showRefsnpAnnot=T annotPch=”21,24,24,25,22,22,8,7” &lt;br /&gt;
| SNP annotation is available for all 1000G SNPs (Aug 2009 release) and can be enabled with the showAnnot=T option. The annotPch command allows you to customize the R plotting symbol used for each kind of SNP; it is okay to use the same symbol for more than one category. The annotation categories, together with their default symbol setting are: Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). For more information about these annotation categories used, please see http://research.nhgri.nih.gov/tools/unisnp/?rm=ohelp&lt;br /&gt;
|-&lt;br /&gt;
| Recombination Rate Overlay &lt;br /&gt;
| showRecomb=T &lt;br /&gt;
| The estimated recombination rate from HapMap samples can be shown on the plot or left off. The data plotted are from Hapmap; http://hapmap.ncbi.nlm.nih.gov/downloads/recombination/2008-03_rel22_B36/rates/&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1646</id>
		<title>LocusZoom</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1646"/>
		<updated>2010-06-07T15:11:20Z</updated>

		<summary type="html">&lt;p&gt;Cristen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:LocusZoomSmall.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LocusZoom&#039;&#039;&#039; is designed to facilitate viewing of local association results together with useful information about a locus, such as the location and orientation of the genes it includes, linkage disequilibrium coefficients and local estimates of recombination rates. It was developed by popular demand, as a result of many questions we have had about &amp;quot;How did you make the figures in your talk?&amp;quot; or &amp;quot;How did you make the figures for your GWAS paper?&amp;quot; (And for better or for worse, we have quite a few GWAS papers!!).&lt;br /&gt;
&lt;br /&gt;
LocusZoom can be used in four ways:&lt;br /&gt;
&lt;br /&gt;
; 1. Plot Summaries of Your Genomewide Scan Interactively&lt;br /&gt;
: You can upload summary results of your own genomewide scan or genomewide meta-analysis and request plots of regions of interest using a web-based form.&lt;br /&gt;
&lt;br /&gt;
; 2. Generate Many Plots in Batch Mode&lt;br /&gt;
: You can upload summary results for your genomewide scan or genomewide meta-analysis and request several plots in one go by uploading a batch file. You will receive results via e-mail. A snail-mail option is not available.&lt;br /&gt;
&lt;br /&gt;
; 3. Plot Summaries of Publicly Available Datasets&lt;br /&gt;
: Currently, this includes the results of [http://www.sph.umich.edu/csg/abecasis/public/lipids2008/ our genome-wide scan] for variants associated with HDL-cholesterol, LDL-cholesterol and triglyceride levels in ~20,000 individuals.&lt;br /&gt;
&lt;br /&gt;
; 4. Download LocusZoom and run on your local unix machine&lt;br /&gt;
*[http://genome.sph.umich.edu/wiki/LocusZoom_Standalone Download LocusZoom] and [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Sources_of_SQLite_database_tables associated databases]&lt;br /&gt;
&lt;br /&gt;
We are also developing a distributable code package that you can install on your own system to generate plots locally. This is not yet available, but is expected in April 2010.&lt;br /&gt;
&lt;br /&gt;
== Upload your own meta-analysis file and generate single plots using a web-based form  ==&lt;br /&gt;
&lt;br /&gt;
=== Uploading Your Association Study Results ===&lt;br /&gt;
&lt;br /&gt;
Association results can be uploaded to our web server using the [http://csg.sph.umich.edu/locuszoom/ plot your data webpage]. Result files are limited to 20Mb in size, which allows for a [[gzip|gzipped]] text table including key columns (marker name, p-value and sample size) for up to ~3 million SNPs. In our tests, a typical GWAS results file is ~17 Mb in size after imputation of HapMap SNPs. Once a file is uploaded, LocusZoom will remember the file for the duration of your web session allowing you to generate multiple plots. If you have a slow connection or would like to save time, you can upload results for a region or chromosome of interest only. Your results are entirely confidential and won&#039;t be viewed by us or anyone else (except those with whom you share them!)&lt;br /&gt;
&lt;br /&gt;
To specify the region to be plotted, you will have to specify the name of a key marker in the region (typically, as an rs-number), name a gene of interest or provide appropriate genome coordinates. When displaying linkage disequilibrium, plotting will be very fast for small windows when HapMap CEU linkage disequilibrium is requested (because pairwise coefficients have been precomputed) and will be a bit slower for larger windows (because linkage disequilibrium coefficients must be computed on the fly).&lt;br /&gt;
&lt;br /&gt;
If you include a sample size column in the result file, it will be used to control the size of each plotted marker.&lt;br /&gt;
&lt;br /&gt;
=== Custom Annotation ===&lt;br /&gt;
&lt;br /&gt;
You may choose to have SNPs displayed using different plotting symbols to distinguish them from each other.  To implement this, in the section &amp;quot;Custom Annotation&amp;quot; in the box &amp;quot;Column Name&amp;quot;, you need to provide the name of a column in your meta-analysis file.  This column will list a category for each SNP of your own choosing (i.e. &amp;quot;nonsynonymous&amp;quot;, &amp;quot;splice&amp;quot;,&amp;quot;intronic&amp;quot;,etc.) or (&amp;quot;Genotyped&amp;quot;,&amp;quot;Imputed&amp;quot;), however, the category names may not include any spaces.  To select the order of the categories to display in the legend and to match the order of pre-selected R plotting symbols (set as pch = 21, 22, 23, 24, 25, 4, 7, 8, 10, 11, 12, 13, 14, 3), you may provide the category names in the specified order in &amp;quot;Category Order&amp;quot; section of &amp;quot;Custom Annotation&amp;quot;.  Each entry (which may not contain spaces) does not need quotes but each entry should be separated by commas.&lt;br /&gt;
&lt;br /&gt;
Alternatively, we have provided functional annotation of all 1000 Genomes (Aug 2009) and HapMap r22 SNPs according to the following categories; Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). This can be implemented using the section &amp;quot;Show Annotation&amp;quot; and clicking the box beside each annotation category that you would like distinguished.  SNPs that are not in any selected category will still be displayed as having no annotation.&lt;br /&gt;
&lt;br /&gt;
=== Plotting of Pairwise Linkage Disequilibrium ===&lt;br /&gt;
&lt;br /&gt;
In the main plot window, data points are colored according to their level of linkage disequilibrium (LD) of the each SNP with the index SNP. If users specify the region to display using an index SNP and flanking region, LD of all data points will be relative to the user-specified index SNP. If users specify the region to display using genome coordinates or a gene name, LocusZoom will automatically select the most significant SNP in the region as the index SNP. For all other SNPs in the plot, the color of the data point will reflect the pairwise LD with this index SNP. The default LD measure is r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; calculated from the HapMap CEU population (release 22), but users have the option to replace this with D’ and of selecting the HapMap YRI, Hapmap CHB+JPT or 1000 Genomes CEU reference panels. Because we have pre-computed LD for all SNPs in HapMap CEU, plots will often generate more quickly if using the default LD information. SNPs with missing LD information are shown in grey.&lt;br /&gt;
&lt;br /&gt;
=== Customizing the Display of Your Results ===&lt;br /&gt;
&lt;br /&gt;
All options listed in the Main Table above are available, as well as the options listed below&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Setting &lt;br /&gt;
! Default Value &lt;br /&gt;
! Details&lt;br /&gt;
|-&lt;br /&gt;
| Column Delimiter &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the type of column delimiter in the results file&lt;br /&gt;
|-&lt;br /&gt;
| Pvalue Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the name of the column that contains the p-values&lt;br /&gt;
|-&lt;br /&gt;
| Marker Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the heading of the column that contains marker names&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| none &lt;br /&gt;
| Plots can be generated based on hg18 (default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| HapMap Population for LD &lt;br /&gt;
| none &lt;br /&gt;
| This option allows the user to specify which HapMap population was used to obtain LD estimates. The default is CEU but users may select YRI or JPT+CHB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Batch Mode  ==&lt;br /&gt;
&lt;br /&gt;
To start batch mode, first upload your results file just as you would in interactive mode. The same file size restrictions apply.&lt;br /&gt;
&lt;br /&gt;
=== Generating a Hit Spec File ===&lt;br /&gt;
&lt;br /&gt;
Batch mode allows you to conveniently specify a set of plots to be generated in &amp;quot;Hit Spec&amp;quot; file. This is handy if you need to generate large numbers of plots or if you want to plot the same set of regions after updating a genomewide analysis (for example).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Hit Spec&amp;quot; file is a whitespace delimited text file. The file has six mandatory columns which can be followed by a series of optional &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs to allow for detailed customization of each plot. The first line in the file is assumed to be a header and is ignored. Each subsequent line describes a single plot. There are three ways to select a region to plot:&lt;br /&gt;
&lt;br /&gt;
; Plotting a window flanking an interesting SNP&lt;br /&gt;
: This option allows you to plot results for all markers within a specific distance (e.g. 500kb) of an index SNP. To use this option, set column 1 to have the name of the index SNP (e.g. &#039;&#039;rs2&#039;&#039; below) and set column 5 to specify the width of the region of interest (e.g. 500kb below). Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs1	   na	   na	    na       500kb        yes      rfrows=3 weightCol=”N” snpset=”HapMap” metalRug=”Our SNPs” &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking an interesting SNP&lt;br /&gt;
: This option is similar to the previous option, but allows you to specify an assymetric region of interest. For example, perhaps you interested in a plot that extends a bit further to the right of the SNP of interest. In this case, specify the coordinates of the region to be plotted in columns 2, 3, and 4. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs2	   1	   540000   580000   na	          yes      rfrows=4 legend=”right” showAnnot=T &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking a gene of interest&lt;br /&gt;
: This option allows you to focus on a particular gene, rather than a specific SNP. It is similar to the first option. You should set column 1 to be the name of the gene of interest and column 5 to be the desired window width. When you use this option, LocusZoom will automatically select an index SNP for each region; the SNP will be the site with the smallest p-value. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
CETP	   na      na	    na       200kb        yes      rfrows=6 showAnnot=T annotPch=”1,24,24,25,22,21,8,7”&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sixth column in the &amp;quot;Hit Spec&amp;quot; file can be used to enable (with the value &#039;&#039;yes&#039;&#039;) or disable (with the value &#039;&#039;no&#039;&#039;) an individual plot. For example, if you run a &amp;quot;Hit Spec&amp;quot; file with 15 plots and 14 of them turn out very nicely, you may wish to re-run the &amp;quot;Hit Spec&amp;quot; file with some tweaks to the problem plot. In this case (if you dislike waiting for your results as much as we do!), you could disable generation of the plots that seem nice by changing the 6th column to “no” and leave the plot that you tweaked as a “yes”.&lt;br /&gt;
&lt;br /&gt;
The 7th and final column contains additional LocusZoom arguments as &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs. Any number of &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pair arguments can be included. For details of available options, see the section entitled LocusZoom options below.&lt;br /&gt;
&lt;br /&gt;
== Generate single plots using our publicly-available lipids GWAS data  ==&lt;br /&gt;
&lt;br /&gt;
In addition to plotting your own results, you can plot the results of some publicly available GWAS. Currently, the only publicly available set of results is our GWAS for loci determining blood lipid levels (Kathiresan et al, Nature Genetics 2009). Just like when you are plotting your own data, you can specify 1) an index SNP and a flanking region, 2) the chromosome together with start and stop positions (in basepairs), or 3) gene name and a flanking region.&lt;br /&gt;
&lt;br /&gt;
== Commonly Used LocusZoom Options ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Web Form &lt;br /&gt;
! &amp;quot;Hit Spec&amp;quot; File Key-Value Pair &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Title on Plot &lt;br /&gt;
| title=”My Favorite Locus” &lt;br /&gt;
| Specifies large text displayed above the plot&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| n/a &lt;br /&gt;
| Plots can be generated based on hg18 (the default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| Legend Location &lt;br /&gt;
| legend=”left” &lt;br /&gt;
| This specifies the location of the legend within the plot, the default is auto. Auto tries to select a location that overlaps a minimal number of datapoints. (auto, left, right, none) &lt;br /&gt;
|-&lt;br /&gt;
| SNP Position Rug &lt;br /&gt;
| snpset=”HapMap” metalRug=”Rug SNPs” &lt;br /&gt;
| These options control display of tickmarks indicating SNP positions at the top of the plot. Setting snpset=&amp;quot;HapMap&amp;quot;, snpset=&amp;quot;Illu318&amp;quot; or snpset=&amp;quot;Affy500&amp;quot; display a fixed set of SNPs. (You can also try snpset=&amp;quot;Affy500,Illu318,HapMap&amp;quot; to see all 3). The metalRug option displays a rug which only includes the SNPs that are actually plotted. To remove the rug in batch mode set snpset=NULL. &lt;br /&gt;
|-&lt;br /&gt;
| Number of Rows for Gene Names &lt;br /&gt;
| rfrows=4 &lt;br /&gt;
| LocusZoom will automatically tries to determine the number of display rows to use for genes and gene names so they are not overlapping. This can make each plot prettier, but is not ideal when you want to compare many plots side by side. To ensure a fixed amount of space is used for gene names, use this option to set the maximum number of display rows. If LocusZoom runs out of plotting space and some genes are left out, a warning will be added to the plot.&lt;br /&gt;
|-&lt;br /&gt;
| Point Size  &lt;br /&gt;
| weightCol=”SampleSize” &lt;br /&gt;
| This specifies that the “dot size” of each data points will reflect the square-root of the sample size. The default is to have all dot sizes equal.&lt;br /&gt;
|-&lt;br /&gt;
| LD Measure &lt;br /&gt;
| ldCol=”dprime” (“rsquare”) &lt;br /&gt;
| Colors data points according to the selected LD  measure. The default is &amp;quot;rsquare&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| Reference Population for LD &lt;br /&gt;
| n/a &lt;br /&gt;
| This option allows the user to specify which reference panel is used to obtain LD estimates. The default is CEU from HapMap Phase II but users may select YRI or JPT+CHB from HapMap Phase II, or CEU from 1000 Genomes (August 2009 release).&lt;br /&gt;
|-&lt;br /&gt;
| Highlight Region of Interest &lt;br /&gt;
| hiStart=425Mb hiEnd=425.1Mb &lt;br /&gt;
| A grey box can be used to highlight important regions of the genome – this can reflect where an association signal peaks or a region selected for sequencing, for example.&lt;br /&gt;
|-&lt;br /&gt;
| Theme &lt;br /&gt;
| theme=”publication” &lt;br /&gt;
| We have created a theme that has larger text and is more easily readable for publication.&lt;br /&gt;
|-&lt;br /&gt;
| Show Annotation &lt;br /&gt;
| showAnnot=T showRefsnpAnnot=T annotPch=”21,24,24,25,22,22,8,7” &lt;br /&gt;
| SNP annotation is available for all 1000G SNPs (Aug 2009 release) and can be enabled with the showAnnot=T option. The annotPch command allows you to customize the R plotting symbol used for each kind of SNP; it is okay to use the same symbol for more than one category. The annotation categories, together with their default symbol setting are: Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). For more information about these annotation categories used, please see http://research.nhgri.nih.gov/tools/unisnp/?rm=ohelp&lt;br /&gt;
|-&lt;br /&gt;
| Recombination Rate Overlay &lt;br /&gt;
| showRecomb=T &lt;br /&gt;
| The estimated recombination rate from HapMap samples can be shown on the plot or left off. The data plotted are from Hapmap; http://hapmap.ncbi.nlm.nih.gov/downloads/recombination/2008-03_rel22_B36/rates/&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1645</id>
		<title>LocusZoom</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1645"/>
		<updated>2010-06-07T15:11:01Z</updated>

		<summary type="html">&lt;p&gt;Cristen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:LocusZoomSmall.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LocusZoom&#039;&#039;&#039; is designed to facilitate viewing of local association results together with useful information about a locus, such as the location and orientation of the genes it includes, linkage disequilibrium coefficients and local estimates of recombination rates. It was developed by popular demand, as a result of many questions we have had about &amp;quot;How did you make the figures in your talk?&amp;quot; or &amp;quot;How did you make the figures for your GWAS paper?&amp;quot; (And for better or for worse, we have quite a few GWAS papers!!).&lt;br /&gt;
&lt;br /&gt;
LocusZoom can be used in four ways:&lt;br /&gt;
&lt;br /&gt;
; Plot Summaries of Your Genomewide Scan Interactively&lt;br /&gt;
: You can upload summary results of your own genomewide scan or genomewide meta-analysis and request plots of regions of interest using a web-based form.&lt;br /&gt;
&lt;br /&gt;
; Generate Many Plots in Batch Mode&lt;br /&gt;
: You can upload summary results for your genomewide scan or genomewide meta-analysis and request several plots in one go by uploading a batch file. You will receive results via e-mail. A snail-mail option is not available.&lt;br /&gt;
&lt;br /&gt;
; Plot Summaries of Publicly Available Datasets&lt;br /&gt;
: Currently, this includes the results of [http://www.sph.umich.edu/csg/abecasis/public/lipids2008/ our genome-wide scan] for variants associated with HDL-cholesterol, LDL-cholesterol and triglyceride levels in ~20,000 individuals.&lt;br /&gt;
&lt;br /&gt;
; Download LocusZoom and run on your local unix machine&lt;br /&gt;
*[http://genome.sph.umich.edu/wiki/LocusZoom_Standalone Download LocusZoom] and [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Sources_of_SQLite_database_tables associated databases]&lt;br /&gt;
&lt;br /&gt;
We are also developing a distributable code package that you can install on your own system to generate plots locally. This is not yet available, but is expected in April 2010.&lt;br /&gt;
&lt;br /&gt;
== Upload your own meta-analysis file and generate single plots using a web-based form  ==&lt;br /&gt;
&lt;br /&gt;
=== Uploading Your Association Study Results ===&lt;br /&gt;
&lt;br /&gt;
Association results can be uploaded to our web server using the [http://csg.sph.umich.edu/locuszoom/ plot your data webpage]. Result files are limited to 20Mb in size, which allows for a [[gzip|gzipped]] text table including key columns (marker name, p-value and sample size) for up to ~3 million SNPs. In our tests, a typical GWAS results file is ~17 Mb in size after imputation of HapMap SNPs. Once a file is uploaded, LocusZoom will remember the file for the duration of your web session allowing you to generate multiple plots. If you have a slow connection or would like to save time, you can upload results for a region or chromosome of interest only. Your results are entirely confidential and won&#039;t be viewed by us or anyone else (except those with whom you share them!)&lt;br /&gt;
&lt;br /&gt;
To specify the region to be plotted, you will have to specify the name of a key marker in the region (typically, as an rs-number), name a gene of interest or provide appropriate genome coordinates. When displaying linkage disequilibrium, plotting will be very fast for small windows when HapMap CEU linkage disequilibrium is requested (because pairwise coefficients have been precomputed) and will be a bit slower for larger windows (because linkage disequilibrium coefficients must be computed on the fly).&lt;br /&gt;
&lt;br /&gt;
If you include a sample size column in the result file, it will be used to control the size of each plotted marker.&lt;br /&gt;
&lt;br /&gt;
=== Custom Annotation ===&lt;br /&gt;
&lt;br /&gt;
You may choose to have SNPs displayed using different plotting symbols to distinguish them from each other.  To implement this, in the section &amp;quot;Custom Annotation&amp;quot; in the box &amp;quot;Column Name&amp;quot;, you need to provide the name of a column in your meta-analysis file.  This column will list a category for each SNP of your own choosing (i.e. &amp;quot;nonsynonymous&amp;quot;, &amp;quot;splice&amp;quot;,&amp;quot;intronic&amp;quot;,etc.) or (&amp;quot;Genotyped&amp;quot;,&amp;quot;Imputed&amp;quot;), however, the category names may not include any spaces.  To select the order of the categories to display in the legend and to match the order of pre-selected R plotting symbols (set as pch = 21, 22, 23, 24, 25, 4, 7, 8, 10, 11, 12, 13, 14, 3), you may provide the category names in the specified order in &amp;quot;Category Order&amp;quot; section of &amp;quot;Custom Annotation&amp;quot;.  Each entry (which may not contain spaces) does not need quotes but each entry should be separated by commas.&lt;br /&gt;
&lt;br /&gt;
Alternatively, we have provided functional annotation of all 1000 Genomes (Aug 2009) and HapMap r22 SNPs according to the following categories; Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). This can be implemented using the section &amp;quot;Show Annotation&amp;quot; and clicking the box beside each annotation category that you would like distinguished.  SNPs that are not in any selected category will still be displayed as having no annotation.&lt;br /&gt;
&lt;br /&gt;
=== Plotting of Pairwise Linkage Disequilibrium ===&lt;br /&gt;
&lt;br /&gt;
In the main plot window, data points are colored according to their level of linkage disequilibrium (LD) of the each SNP with the index SNP. If users specify the region to display using an index SNP and flanking region, LD of all data points will be relative to the user-specified index SNP. If users specify the region to display using genome coordinates or a gene name, LocusZoom will automatically select the most significant SNP in the region as the index SNP. For all other SNPs in the plot, the color of the data point will reflect the pairwise LD with this index SNP. The default LD measure is r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; calculated from the HapMap CEU population (release 22), but users have the option to replace this with D’ and of selecting the HapMap YRI, Hapmap CHB+JPT or 1000 Genomes CEU reference panels. Because we have pre-computed LD for all SNPs in HapMap CEU, plots will often generate more quickly if using the default LD information. SNPs with missing LD information are shown in grey.&lt;br /&gt;
&lt;br /&gt;
=== Customizing the Display of Your Results ===&lt;br /&gt;
&lt;br /&gt;
All options listed in the Main Table above are available, as well as the options listed below&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Setting &lt;br /&gt;
! Default Value &lt;br /&gt;
! Details&lt;br /&gt;
|-&lt;br /&gt;
| Column Delimiter &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the type of column delimiter in the results file&lt;br /&gt;
|-&lt;br /&gt;
| Pvalue Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the name of the column that contains the p-values&lt;br /&gt;
|-&lt;br /&gt;
| Marker Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the heading of the column that contains marker names&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| none &lt;br /&gt;
| Plots can be generated based on hg18 (default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| HapMap Population for LD &lt;br /&gt;
| none &lt;br /&gt;
| This option allows the user to specify which HapMap population was used to obtain LD estimates. The default is CEU but users may select YRI or JPT+CHB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Batch Mode  ==&lt;br /&gt;
&lt;br /&gt;
To start batch mode, first upload your results file just as you would in interactive mode. The same file size restrictions apply.&lt;br /&gt;
&lt;br /&gt;
=== Generating a Hit Spec File ===&lt;br /&gt;
&lt;br /&gt;
Batch mode allows you to conveniently specify a set of plots to be generated in &amp;quot;Hit Spec&amp;quot; file. This is handy if you need to generate large numbers of plots or if you want to plot the same set of regions after updating a genomewide analysis (for example).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Hit Spec&amp;quot; file is a whitespace delimited text file. The file has six mandatory columns which can be followed by a series of optional &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs to allow for detailed customization of each plot. The first line in the file is assumed to be a header and is ignored. Each subsequent line describes a single plot. There are three ways to select a region to plot:&lt;br /&gt;
&lt;br /&gt;
; Plotting a window flanking an interesting SNP&lt;br /&gt;
: This option allows you to plot results for all markers within a specific distance (e.g. 500kb) of an index SNP. To use this option, set column 1 to have the name of the index SNP (e.g. &#039;&#039;rs2&#039;&#039; below) and set column 5 to specify the width of the region of interest (e.g. 500kb below). Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs1	   na	   na	    na       500kb        yes      rfrows=3 weightCol=”N” snpset=”HapMap” metalRug=”Our SNPs” &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking an interesting SNP&lt;br /&gt;
: This option is similar to the previous option, but allows you to specify an assymetric region of interest. For example, perhaps you interested in a plot that extends a bit further to the right of the SNP of interest. In this case, specify the coordinates of the region to be plotted in columns 2, 3, and 4. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs2	   1	   540000   580000   na	          yes      rfrows=4 legend=”right” showAnnot=T &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking a gene of interest&lt;br /&gt;
: This option allows you to focus on a particular gene, rather than a specific SNP. It is similar to the first option. You should set column 1 to be the name of the gene of interest and column 5 to be the desired window width. When you use this option, LocusZoom will automatically select an index SNP for each region; the SNP will be the site with the smallest p-value. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
CETP	   na      na	    na       200kb        yes      rfrows=6 showAnnot=T annotPch=”1,24,24,25,22,21,8,7”&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sixth column in the &amp;quot;Hit Spec&amp;quot; file can be used to enable (with the value &#039;&#039;yes&#039;&#039;) or disable (with the value &#039;&#039;no&#039;&#039;) an individual plot. For example, if you run a &amp;quot;Hit Spec&amp;quot; file with 15 plots and 14 of them turn out very nicely, you may wish to re-run the &amp;quot;Hit Spec&amp;quot; file with some tweaks to the problem plot. In this case (if you dislike waiting for your results as much as we do!), you could disable generation of the plots that seem nice by changing the 6th column to “no” and leave the plot that you tweaked as a “yes”.&lt;br /&gt;
&lt;br /&gt;
The 7th and final column contains additional LocusZoom arguments as &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs. Any number of &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pair arguments can be included. For details of available options, see the section entitled LocusZoom options below.&lt;br /&gt;
&lt;br /&gt;
== Generate single plots using our publicly-available lipids GWAS data  ==&lt;br /&gt;
&lt;br /&gt;
In addition to plotting your own results, you can plot the results of some publicly available GWAS. Currently, the only publicly available set of results is our GWAS for loci determining blood lipid levels (Kathiresan et al, Nature Genetics 2009). Just like when you are plotting your own data, you can specify 1) an index SNP and a flanking region, 2) the chromosome together with start and stop positions (in basepairs), or 3) gene name and a flanking region.&lt;br /&gt;
&lt;br /&gt;
== Commonly Used LocusZoom Options ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Web Form &lt;br /&gt;
! &amp;quot;Hit Spec&amp;quot; File Key-Value Pair &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Title on Plot &lt;br /&gt;
| title=”My Favorite Locus” &lt;br /&gt;
| Specifies large text displayed above the plot&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| n/a &lt;br /&gt;
| Plots can be generated based on hg18 (the default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| Legend Location &lt;br /&gt;
| legend=”left” &lt;br /&gt;
| This specifies the location of the legend within the plot, the default is auto. Auto tries to select a location that overlaps a minimal number of datapoints. (auto, left, right, none) &lt;br /&gt;
|-&lt;br /&gt;
| SNP Position Rug &lt;br /&gt;
| snpset=”HapMap” metalRug=”Rug SNPs” &lt;br /&gt;
| These options control display of tickmarks indicating SNP positions at the top of the plot. Setting snpset=&amp;quot;HapMap&amp;quot;, snpset=&amp;quot;Illu318&amp;quot; or snpset=&amp;quot;Affy500&amp;quot; display a fixed set of SNPs. (You can also try snpset=&amp;quot;Affy500,Illu318,HapMap&amp;quot; to see all 3). The metalRug option displays a rug which only includes the SNPs that are actually plotted. To remove the rug in batch mode set snpset=NULL. &lt;br /&gt;
|-&lt;br /&gt;
| Number of Rows for Gene Names &lt;br /&gt;
| rfrows=4 &lt;br /&gt;
| LocusZoom will automatically tries to determine the number of display rows to use for genes and gene names so they are not overlapping. This can make each plot prettier, but is not ideal when you want to compare many plots side by side. To ensure a fixed amount of space is used for gene names, use this option to set the maximum number of display rows. If LocusZoom runs out of plotting space and some genes are left out, a warning will be added to the plot.&lt;br /&gt;
|-&lt;br /&gt;
| Point Size  &lt;br /&gt;
| weightCol=”SampleSize” &lt;br /&gt;
| This specifies that the “dot size” of each data points will reflect the square-root of the sample size. The default is to have all dot sizes equal.&lt;br /&gt;
|-&lt;br /&gt;
| LD Measure &lt;br /&gt;
| ldCol=”dprime” (“rsquare”) &lt;br /&gt;
| Colors data points according to the selected LD  measure. The default is &amp;quot;rsquare&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| Reference Population for LD &lt;br /&gt;
| n/a &lt;br /&gt;
| This option allows the user to specify which reference panel is used to obtain LD estimates. The default is CEU from HapMap Phase II but users may select YRI or JPT+CHB from HapMap Phase II, or CEU from 1000 Genomes (August 2009 release).&lt;br /&gt;
|-&lt;br /&gt;
| Highlight Region of Interest &lt;br /&gt;
| hiStart=425Mb hiEnd=425.1Mb &lt;br /&gt;
| A grey box can be used to highlight important regions of the genome – this can reflect where an association signal peaks or a region selected for sequencing, for example.&lt;br /&gt;
|-&lt;br /&gt;
| Theme &lt;br /&gt;
| theme=”publication” &lt;br /&gt;
| We have created a theme that has larger text and is more easily readable for publication.&lt;br /&gt;
|-&lt;br /&gt;
| Show Annotation &lt;br /&gt;
| showAnnot=T showRefsnpAnnot=T annotPch=”21,24,24,25,22,22,8,7” &lt;br /&gt;
| SNP annotation is available for all 1000G SNPs (Aug 2009 release) and can be enabled with the showAnnot=T option. The annotPch command allows you to customize the R plotting symbol used for each kind of SNP; it is okay to use the same symbol for more than one category. The annotation categories, together with their default symbol setting are: Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). For more information about these annotation categories used, please see http://research.nhgri.nih.gov/tools/unisnp/?rm=ohelp&lt;br /&gt;
|-&lt;br /&gt;
| Recombination Rate Overlay &lt;br /&gt;
| showRecomb=T &lt;br /&gt;
| The estimated recombination rate from HapMap samples can be shown on the plot or left off. The data plotted are from Hapmap; http://hapmap.ncbi.nlm.nih.gov/downloads/recombination/2008-03_rel22_B36/rates/&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1644</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1644"/>
		<updated>2010-06-07T15:07:40Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Quick Start (Requirements) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Quick Start (Requirements)  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
LocusZoom package (including [http://genome.sph.umich.edu/wiki/LocusZoom_Standalone#Sources_of_SQLite_database_tables database tables]);&lt;br /&gt;
*[https://statgen.sph.umich.edu/locuszoom/download/ LocusZoom code]&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date.&lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sources of SQLite database tables ==&lt;br /&gt;
&lt;br /&gt;
*[http://hapmap.ncbi.nlm.nih.gov/downloads/phasing/2007-08_rel22/phased HapMap phased haplotypes]&lt;br /&gt;
*[ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1 1000 Genomes phased haplotypes]&lt;br /&gt;
*[http://www.ncbi.nlm.nih.gov/projects/SNP/ dbSNP position] via the [http://genome.ucsc.edu UCSC Browser]&lt;br /&gt;
*[http://www.ncbi.nlm.nih.gov/RefSeq/ Gene and exon positions] via the [http://genome.ucsc.edu UCSC Browser].  We filtered SNPs that map to more than one location or where no allele matches the reference sequence&lt;br /&gt;
*[http://genome.usc.edu Annotation] We used various sources including RefSeq Genes (refFlat), TFBS Conserved (tfbsConsSites), and Conservation (phaseConsElements44wayPlacental)&lt;br /&gt;
*[ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1 Recombination rates from HapMap]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 columns: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them.&lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. LD with the SNP with the most significant p-value in this region will be used to color data points. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
The SNP with the most significant p-value in this region will be used for estimating LD.&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist.&lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| scaling factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| scaling factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for custom annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,8,7,21&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of custom annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset rug data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for recombination rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for recombination rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for recombination rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default (HapMap r22 CEU)  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Use HapMap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.)&lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1643</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1643"/>
		<updated>2010-06-07T15:07:09Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Input */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Quick Start (Requirements)  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
LocusZoom package (including database tables);&lt;br /&gt;
*[https://statgen.sph.umich.edu/locuszoom/download/ LocusZoom code]&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date.&lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sources of SQLite database tables ==&lt;br /&gt;
&lt;br /&gt;
*[http://hapmap.ncbi.nlm.nih.gov/downloads/phasing/2007-08_rel22/phased HapMap phased haplotypes]&lt;br /&gt;
*[ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1 1000 Genomes phased haplotypes]&lt;br /&gt;
*[http://www.ncbi.nlm.nih.gov/projects/SNP/ dbSNP position] via the [http://genome.ucsc.edu UCSC Browser]&lt;br /&gt;
*[http://www.ncbi.nlm.nih.gov/RefSeq/ Gene and exon positions] via the [http://genome.ucsc.edu UCSC Browser].  We filtered SNPs that map to more than one location or where no allele matches the reference sequence&lt;br /&gt;
*[http://genome.usc.edu Annotation] We used various sources including RefSeq Genes (refFlat), TFBS Conserved (tfbsConsSites), and Conservation (phaseConsElements44wayPlacental)&lt;br /&gt;
*[ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1 Recombination rates from HapMap]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 columns: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them.&lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. LD with the SNP with the most significant p-value in this region will be used to color data points. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
The SNP with the most significant p-value in this region will be used for estimating LD.&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist.&lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| scaling factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| scaling factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for custom annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,8,7,21&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of custom annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset rug data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for recombination rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for recombination rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for recombination rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default (HapMap r22 CEU)  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Use HapMap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.)&lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1642</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1642"/>
		<updated>2010-06-07T15:06:50Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Step 4: Install LocusZoom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Quick Start (Requirements)  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
LocusZoom package (including database tables);&lt;br /&gt;
*[https://statgen.sph.umich.edu/locuszoom/download/ LocusZoom code]&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date.&lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 columns: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them.&lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. LD with the SNP with the most significant p-value in this region will be used to color data points. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
The SNP with the most significant p-value in this region will be used for estimating LD.&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist. &lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| scaling factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| scaling factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for custom annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,8,7,21&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of custom annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset rug data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for recombination rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for recombination rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for recombination rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default (HapMap r22 CEU)  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Use HapMap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.)&lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1641</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1641"/>
		<updated>2010-06-07T15:05:45Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Step 4: Install LocusZoom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Quick Start (Requirements)  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
LocusZoom package (including database tables);&lt;br /&gt;
*[https://statgen.sph.umich.edu/locuszoom/download/ LocusZoom code]&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date.&lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sources of SQLite database tables;&lt;br /&gt;
&lt;br /&gt;
*[http://hapmap.ncbi.nlm.nih.gov/downloads/phasing/2007-08_rel22/phased HapMap phased haplotypes]&lt;br /&gt;
*[ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1 1000 Genomes phased haplotypes]&lt;br /&gt;
*[http://www.ncbi.nlm.nih.gov/projects/SNP/ dbSNP position] via the [http://genome.ucsc.edu UCSC Browser]&lt;br /&gt;
*[http://www.ncbi.nlm.nih.gov/RefSeq/ Gene and exon positions] via the [http://genome.ucsc.edu UCSC Browser].  We filtered SNPs that map to more than one location or where no allele matches the reference sequence&lt;br /&gt;
*[http://genome.usc.edu Annotation] We used various sources including RefSeq Genes (refFlat), TFBS Conserved (tfbsConsSites), and Conservation (phaseConsElements44wayPlacental)&lt;br /&gt;
*[ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1 Recombination rates from HapMap]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 columns: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them.&lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. LD with the SNP with the most significant p-value in this region will be used to color data points. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
The SNP with the most significant p-value in this region will be used for estimating LD.&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist. &lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| scaling factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| scaling factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for custom annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,8,7,21&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of custom annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset rug data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for recombination rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for recombination rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for recombination rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default (HapMap r22 CEU)  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Use HapMap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.)&lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1640</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1640"/>
		<updated>2010-06-07T15:05:19Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Step 4: Install LocusZoom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Quick Start (Requirements)  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
LocusZoom package (including database tables);&lt;br /&gt;
*[https://statgen.sph.umich.edu/locuszoom/download/ LocusZoom code]&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date.&lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sources of SQLite database tables;&lt;br /&gt;
&lt;br /&gt;
*[https://statgen.sph.umich.edu/locuszoom/download/ LocusZoom code]&lt;br /&gt;
&lt;br /&gt;
*[http://hapmap.ncbi.nlm.nih.gov/downloads/phasing/2007-08_rel22/phased HapMap phased haplotypes]&lt;br /&gt;
*[ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1 1000 Genomes phased haplotypes]&lt;br /&gt;
*[http://www.ncbi.nlm.nih.gov/projects/SNP/ dbSNP position] via the [http://genome.ucsc.edu UCSC Browser]&lt;br /&gt;
*[http://www.ncbi.nlm.nih.gov/RefSeq/ Gene and exon positions] via the [http://genome.ucsc.edu UCSC Browser].  We filtered SNPs that map to more than one location or where no allele matches the reference sequence&lt;br /&gt;
*[http://genome.usc.edu Annotation] We used various sources including RefSeq Genes (refFlat), TFBS Conserved (tfbsConsSites), and Conservation (phaseConsElements44wayPlacental)&lt;br /&gt;
*[ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1 Recombination rates from HapMap]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 columns: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them.&lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. LD with the SNP with the most significant p-value in this region will be used to color data points. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
The SNP with the most significant p-value in this region will be used for estimating LD.&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist. &lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| scaling factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| scaling factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for custom annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,8,7,21&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of custom annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset rug data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for recombination rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for recombination rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for recombination rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default (HapMap r22 CEU)  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Use HapMap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.)&lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1639</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1639"/>
		<updated>2010-06-07T15:00:06Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Quick Start (Requirements)  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
LocusZoom package (including database tables);&lt;br /&gt;
*[https://statgen.sph.umich.edu/locuszoom/download/ LocusZoom code]&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date.&lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sources of SQLite database tables;&lt;br /&gt;
&lt;br /&gt;
HapMap phased haplotypes: http://hapmap.ncbi.nlm.nih.gov/downloads/phasing/2007-08_rel22/phased&lt;br /&gt;
&lt;br /&gt;
1000G phased haplotypes: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
SNP position: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
SNP annotation for 1000G SNPs: Custom-designed by Peter Chines (pchines@mail.nih.gov)&lt;br /&gt;
&lt;br /&gt;
Gene and exon positions: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
Recombination rates from HapMap: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 columns: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them.&lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. LD with the SNP with the most significant p-value in this region will be used to color data points. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
The SNP with the most significant p-value in this region will be used for estimating LD.&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist. &lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| scaling factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| scaling factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for custom annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,8,7,21&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of custom annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset rug data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for recombination rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for recombination rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for recombination rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default (HapMap r22 CEU)  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Use HapMap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.)&lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1638</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1638"/>
		<updated>2010-06-06T13:40:39Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Creating a SQLite database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Requirements  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date. &lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sources of SQLite database tables;&lt;br /&gt;
&lt;br /&gt;
HapMap phased haplotypes: http://hapmap.ncbi.nlm.nih.gov/downloads/phasing/2007-08_rel22/phased&lt;br /&gt;
&lt;br /&gt;
1000G phased haplotypes: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
SNP position: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
SNP annotation for 1000G SNPs: Custom-designed by Peter Chines (pchines@mail.nih.gov)&lt;br /&gt;
&lt;br /&gt;
Gene and exon positions: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
Recombination rates from HapMap: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 columns: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them.&lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. LD with the SNP with the most significant p-value in this region will be used to color data points. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
The SNP with the most significant p-value in this region will be used for estimating LD.&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist. &lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| scaling factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| scaling factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for custom annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,8,7,21&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of custom annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset rug data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for recombination rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for recombination rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for recombination rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default (HapMap r22 CEU)  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Use HapMap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.)&lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1637</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1637"/>
		<updated>2010-06-06T13:39:30Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Use hapmap YRI for LD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Requirements  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date. &lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sources of SQLite database tables;&lt;br /&gt;
&lt;br /&gt;
HapMap phased haplotypes: http://hapmap.ncbi.nlm.nih.gov/downloads/phasing/2007-08_rel22/phased&lt;br /&gt;
&lt;br /&gt;
1000G phased haplotypes: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
SNP position: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
SNP annotation for 1000G SNPs: Custom-designed by Peter Chines (pchines@mail.nih.gov)&lt;br /&gt;
&lt;br /&gt;
Gene and exon positions: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
Recombination rates from HapMap: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 columns: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them.&lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. LD with the SNP with the most significant p-value in this region will be used to color data points. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
The SNP with the most significant p-value in this region will be used for estimating LD.&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist. &lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| scaling factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| scaling factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for custom annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,8,7,21&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of custom annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset rug data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for recombination rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for recombination rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for recombination rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default (HapMap r22 CEU)  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Use HapMap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.) &lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1636</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1636"/>
		<updated>2010-06-06T13:39:11Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Use 1000 genomes, CEU for LD instead of the default */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Requirements  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date. &lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sources of SQLite database tables;&lt;br /&gt;
&lt;br /&gt;
HapMap phased haplotypes: http://hapmap.ncbi.nlm.nih.gov/downloads/phasing/2007-08_rel22/phased&lt;br /&gt;
&lt;br /&gt;
1000G phased haplotypes: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
SNP position: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
SNP annotation for 1000G SNPs: Custom-designed by Peter Chines (pchines@mail.nih.gov)&lt;br /&gt;
&lt;br /&gt;
Gene and exon positions: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
Recombination rates from HapMap: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 columns: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them.&lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. LD with the SNP with the most significant p-value in this region will be used to color data points. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
The SNP with the most significant p-value in this region will be used for estimating LD.&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist. &lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| scaling factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| scaling factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for custom annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,8,7,21&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of custom annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset rug data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for recombination rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for recombination rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for recombination rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default (HapMap r22 CEU)  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Use hapmap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.) &lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1635</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1635"/>
		<updated>2010-06-06T13:38:28Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Plotting options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Requirements  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date. &lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sources of SQLite database tables;&lt;br /&gt;
&lt;br /&gt;
HapMap phased haplotypes: http://hapmap.ncbi.nlm.nih.gov/downloads/phasing/2007-08_rel22/phased&lt;br /&gt;
&lt;br /&gt;
1000G phased haplotypes: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
SNP position: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
SNP annotation for 1000G SNPs: Custom-designed by Peter Chines (pchines@mail.nih.gov)&lt;br /&gt;
&lt;br /&gt;
Gene and exon positions: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
Recombination rates from HapMap: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 columns: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them.&lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. LD with the SNP with the most significant p-value in this region will be used to color data points. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
The SNP with the most significant p-value in this region will be used for estimating LD.&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist. &lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| scaling factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| scaling factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for custom annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,8,7,21&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of custom annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset rug data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for recombination rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for recombination rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for recombination rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of highlighted region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use hapmap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.) &lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1634</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1634"/>
		<updated>2010-06-06T13:33:02Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Region */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Requirements  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date. &lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sources of SQLite database tables;&lt;br /&gt;
&lt;br /&gt;
HapMap phased haplotypes: http://hapmap.ncbi.nlm.nih.gov/downloads/phasing/2007-08_rel22/phased&lt;br /&gt;
&lt;br /&gt;
1000G phased haplotypes: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
SNP position: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
SNP annotation for 1000G SNPs: Custom-designed by Peter Chines (pchines@mail.nih.gov)&lt;br /&gt;
&lt;br /&gt;
Gene and exon positions: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
Recombination rates from HapMap: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 columns: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them.&lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. LD with the SNP with the most significant p-value in this region will be used to color data points. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
The SNP with the most significant p-value in this region will be used for estimating LD.&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist. &lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| sclaing factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| sclaing factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpLineColor=transparent&lt;br /&gt;
| color for ref snp line (invisible by default)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpLineAlpha=.5&lt;br /&gt;
| transparency level for reference snp line&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,  8,7,21,1&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| bigDiamond=FALSE&lt;br /&gt;
| put big diamond around refsnp?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for reccomb rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for reccomb rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for reccomb rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of hilite region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of hilite region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for hiliting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use hapmap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.) &lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1633</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1633"/>
		<updated>2010-06-06T13:31:46Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Region */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Requirements  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date. &lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sources of SQLite database tables;&lt;br /&gt;
&lt;br /&gt;
HapMap phased haplotypes: http://hapmap.ncbi.nlm.nih.gov/downloads/phasing/2007-08_rel22/phased&lt;br /&gt;
&lt;br /&gt;
1000G phased haplotypes: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
SNP position: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
SNP annotation for 1000G SNPs: Custom-designed by Peter Chines (pchines@mail.nih.gov)&lt;br /&gt;
&lt;br /&gt;
Gene and exon positions: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
Recombination rates from HapMap: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 columns: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them.&lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. The SNP with the most significant p-value in this region will be used. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
Once again, the SNP with the most significant p-value will be used in this region.&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist. &lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| sclaing factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| sclaing factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpLineColor=transparent&lt;br /&gt;
| color for ref snp line (invisible by default)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpLineAlpha=.5&lt;br /&gt;
| transparency level for reference snp line&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,  8,7,21,1&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| bigDiamond=FALSE&lt;br /&gt;
| put big diamond around refsnp?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for reccomb rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for reccomb rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for reccomb rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of hilite region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of hilite region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for hiliting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use hapmap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.) &lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1632</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1632"/>
		<updated>2010-06-06T13:31:04Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Association results file (&amp;quot;metal&amp;quot; file) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Requirements  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date. &lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sources of SQLite database tables;&lt;br /&gt;
&lt;br /&gt;
HapMap phased haplotypes: http://hapmap.ncbi.nlm.nih.gov/downloads/phasing/2007-08_rel22/phased&lt;br /&gt;
&lt;br /&gt;
1000G phased haplotypes: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
SNP position: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
SNP annotation for 1000G SNPs: Custom-designed by Peter Chines (pchines@mail.nih.gov)&lt;br /&gt;
&lt;br /&gt;
Gene and exon positions: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
Recombination rates from HapMap: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 columns: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them.&lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. The SNP with the most significant p-value in this region will be used. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
Once again, the SNP with the most significant p-value will be used in this region. &lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist. &lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| sclaing factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| sclaing factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpLineColor=transparent&lt;br /&gt;
| color for ref snp line (invisible by default)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpLineAlpha=.5&lt;br /&gt;
| transparency level for reference snp line&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,  8,7,21,1&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| bigDiamond=FALSE&lt;br /&gt;
| put big diamond around refsnp?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for reccomb rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for reccomb rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for reccomb rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of hilite region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of hilite region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for hiliting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use hapmap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.) &lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1631</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1631"/>
		<updated>2010-06-06T13:28:04Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Step 4: Install LocusZoom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Requirements  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date. &lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sources of SQLite database tables;&lt;br /&gt;
&lt;br /&gt;
HapMap phased haplotypes: http://hapmap.ncbi.nlm.nih.gov/downloads/phasing/2007-08_rel22/phased&lt;br /&gt;
&lt;br /&gt;
1000G phased haplotypes: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
SNP position: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
SNP annotation for 1000G SNPs: Custom-designed by Peter Chines (pchines@mail.nih.gov)&lt;br /&gt;
&lt;br /&gt;
Gene and exon positions: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
Recombination rates from HapMap: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 things: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them. &lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. The SNP with the most significant p-value in this region will be used. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
Once again, the SNP with the most significant p-value will be used in this region. &lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist. &lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| sclaing factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| sclaing factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpLineColor=transparent&lt;br /&gt;
| color for ref snp line (invisible by default)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpLineAlpha=.5&lt;br /&gt;
| transparency level for reference snp line&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,  8,7,21,1&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| bigDiamond=FALSE&lt;br /&gt;
| put big diamond around refsnp?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for reccomb rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for reccomb rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for reccomb rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of hilite region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of hilite region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for hiliting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use hapmap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.) &lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1630</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1630"/>
		<updated>2010-06-06T13:27:43Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Step 4: Install LocusZoom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Requirements  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date. &lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sources of SQLite database tables;&lt;br /&gt;
HapMap phased haplotypes: http://hapmap.ncbi.nlm.nih.gov/downloads/phasing/2007-08_rel22/phased&lt;br /&gt;
&lt;br /&gt;
1000G phased haplotypes: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
SNP position: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
SNP annotation for 1000G SNPs: Custom-designed by Peter Chines (pchines@mail.nih.gov)&lt;br /&gt;
&lt;br /&gt;
Gene and exon positions: http://genome.ucsc.edu&lt;br /&gt;
&lt;br /&gt;
Recombination rates from HapMap: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 things: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them. &lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. The SNP with the most significant p-value in this region will be used. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
Once again, the SNP with the most significant p-value will be used in this region. &lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist. &lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| sclaing factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| sclaing factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpLineColor=transparent&lt;br /&gt;
| color for ref snp line (invisible by default)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpLineAlpha=.5&lt;br /&gt;
| transparency level for reference snp line&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,  8,7,21,1&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| bigDiamond=FALSE&lt;br /&gt;
| put big diamond around refsnp?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for reccomb rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for reccomb rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for reccomb rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of hilite region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of hilite region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for hiliting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use hapmap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.) &lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1629</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1629"/>
		<updated>2010-06-06T13:26:53Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Step 4: Install LocusZoom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Requirements  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date. &lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sources of SQLite database tables;&lt;br /&gt;
HapMap phased haplotypes: http://hapmap.ncbi.nlm.nih.gov/downloads/phasing/2007-08_rel22/phased &amp;lt;/a&amp;gt;&lt;br /&gt;
1000G phased haplotypes: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1 &amp;lt;/a&amp;gt;&lt;br /&gt;
SNP position: http://genome.ucsc.edu &amp;lt;/a&amp;gt;&lt;br /&gt;
SNP annotation for 1000G SNPs: Custom-designed by Peter Chines (pchines@mail.nih.gov) &amp;lt;/a&amp;gt;&lt;br /&gt;
Gene and exon positions: http://genome.ucsc.edu &amp;lt;/a&amp;gt;&lt;br /&gt;
Recombination rates from HapMap: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1 &amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 things: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them. &lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. The SNP with the most significant p-value in this region will be used. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
Once again, the SNP with the most significant p-value will be used in this region. &lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist. &lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| sclaing factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| sclaing factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpLineColor=transparent&lt;br /&gt;
| color for ref snp line (invisible by default)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpLineAlpha=.5&lt;br /&gt;
| transparency level for reference snp line&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,  8,7,21,1&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| bigDiamond=FALSE&lt;br /&gt;
| put big diamond around refsnp?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for reccomb rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for reccomb rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for reccomb rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of hilite region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of hilite region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for hiliting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use hapmap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.) &lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1628</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1628"/>
		<updated>2010-06-06T13:25:53Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Step 4: Install LocusZoom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Requirements  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date. &lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sources of SQLite database tables;&lt;br /&gt;
HapMap phased haplotypes: http://hapmap.ncbi.nlm.nih.gov/downloads/phasing/2007-08_rel22/phased&lt;br /&gt;
1000G phased haplotypes: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
SNP position: http://genome.ucsc.edu&lt;br /&gt;
SNP annotation for 1000G SNPs: Custom-designed by Peter Chines (pchines@mail.nih.gov)&lt;br /&gt;
Gene and exon positions: http://genome.ucsc.edu&lt;br /&gt;
Recombination rates from HapMap: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 things: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them. &lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. The SNP with the most significant p-value in this region will be used. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
Once again, the SNP with the most significant p-value will be used in this region. &lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist. &lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| sclaing factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| sclaing factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpLineColor=transparent&lt;br /&gt;
| color for ref snp line (invisible by default)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpLineAlpha=.5&lt;br /&gt;
| transparency level for reference snp line&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,  8,7,21,1&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| bigDiamond=FALSE&lt;br /&gt;
| put big diamond around refsnp?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for reccomb rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for reccomb rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for reccomb rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of hilite region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of hilite region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for hiliting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use hapmap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.) &lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1627</id>
		<title>LocusZoom Standalone</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=1627"/>
		<updated>2010-06-06T13:25:07Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Step 4: Install LocusZoom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; [[Image:LocusZoomSmall.png]] &lt;br /&gt;
&lt;br /&gt;
This page contains information regarding a version of LocusZoom that may be downloaded for personal use. For more information on LocusZoom, see this [[LocusZoom|page]]. &lt;br /&gt;
&lt;br /&gt;
== Requirements  ==&lt;br /&gt;
&lt;br /&gt;
The following software is required: &lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/download/ Python 2.6] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 2.10+] &lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
&lt;br /&gt;
Currently only &#039;&#039;&#039;Unix/Linux&#039;&#039;&#039; is supported, though Mac OS X should be supported in a future release. &lt;br /&gt;
&lt;br /&gt;
Support for Windows may come at a much later date. &lt;br /&gt;
&lt;br /&gt;
== Synopsis  ==&lt;br /&gt;
&lt;br /&gt;
First, change directory into examples/. Then, run the following command: &lt;br /&gt;
&amp;lt;pre&amp;gt;./run_example.py&amp;lt;/pre&amp;gt; &lt;br /&gt;
This script runs the following command for you: &lt;br /&gt;
&amp;lt;pre&amp;gt;../bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1&amp;lt;/pre&amp;gt; &lt;br /&gt;
A PDF plot of the FADS1 locus will be created in the directory. It should look roughly like this: &lt;br /&gt;
&lt;br /&gt;
[[Image:FADS1 small.png]] &lt;br /&gt;
&lt;br /&gt;
Voila, your first region plot! &lt;br /&gt;
&lt;br /&gt;
== Download == &lt;br /&gt;
&lt;br /&gt;
Download mirrors will be available shortly. &lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Python  ===&lt;br /&gt;
&lt;br /&gt;
You will need to install Python on your system if it is not already. Head over to [http://www.python.org www.python.org] to download it. Note that you will want to make sure to download the latest from the 2.x branch, and &#039;&#039;&#039;not&#039;&#039;&#039; the 3.0 one. &lt;br /&gt;
&lt;br /&gt;
=== Step 2: Install R  ===&lt;br /&gt;
&lt;br /&gt;
R is also required for generating the plots. You can download R at [http://www.r-project.org/ www.r-project.org]. Version 2.10 or greater is required. &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Install new_fugue  ===&lt;br /&gt;
&lt;br /&gt;
New_fugue is a program that calculates linkage disequilibrium measures from genotype files. While installing new_fugue is optional, we highly recommend it as it makes the process of generating plots much easier. If you opt to skip installing new_fugue, you will need to provide your own computed LD files for each region that you want to plot. &lt;br /&gt;
&lt;br /&gt;
New_fugue can be downloaded from [[New Fugue|here]]. &lt;br /&gt;
&lt;br /&gt;
Once downloaded, extract the tar file using: &lt;br /&gt;
&amp;lt;pre&amp;gt; tar zxf /path/to/new_fugue.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Change into the generic-new_fugue directory that is created, and run: &lt;br /&gt;
&amp;lt;pre&amp;gt; make install &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may need administrator rights to install this program.&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Install LocusZoom  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom is provided as a tar archive which contains the following: &lt;br /&gt;
&lt;br /&gt;
*the LocusZoom python application &lt;br /&gt;
*the R script used for generating plots &lt;br /&gt;
*Human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039; data, including: &lt;br /&gt;
**genotype files (used for computing LD) from HapMap and 1000G &lt;br /&gt;
**a SQLite database file containing tables describing SNP positions, SNP annotations, gene and exon locations, and recombination rates&lt;br /&gt;
&lt;br /&gt;
Simply unpack the tar to your directory of choice by doing the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;cd &amp;amp;lt;directory where you want to place locuszoom&amp;amp;gt; &lt;br /&gt;
tar zxf /path/to/locuszoom.tgz &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The tar archive will extract into the following directory structure: &lt;br /&gt;
&lt;br /&gt;
*locuszoom/ &lt;br /&gt;
**bin/ &lt;br /&gt;
***locuszoom (this is the locuszoom &amp;quot;executable&amp;quot;) &lt;br /&gt;
***locuszoom.R (the R script which is used by locuszoom for creating the plots) &lt;br /&gt;
**conf/ (configuration file located here) &lt;br /&gt;
**data/ &lt;br /&gt;
***database/ (SQLite file located here) &lt;br /&gt;
***hapmap/ (hapmap genotype files) &lt;br /&gt;
***1000G/ (1000G genotype files) &lt;br /&gt;
**src/ (source code for locuszoom)&lt;br /&gt;
&lt;br /&gt;
It is important that this directory structure remain intact. To make launching locusoom easier, you could create a link to it from /usr/local/bin, for example: &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s bin/locuszoom /usr/local/bin/locuszoom&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sources of SQLite database tables;&lt;br /&gt;
HapMap phased haplotypes: http://hapmap.ncbi.nlm.nih.gov/downloads/phasing/2007-08_rel22/phased/&lt;br /&gt;
1000G phased haplotypes: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1/&lt;br /&gt;
SNP position: http://genome.ucsc.edu&lt;br /&gt;
SNP annotation for 1000G SNPs: Custom-designed by Peter Chines (pchines@mail.nih.gov)&lt;br /&gt;
Gene and exon positions: http://genome.ucsc.edu&lt;br /&gt;
Recombination rates from HapMap: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_03/pilot1/&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file (&amp;quot;metal&amp;quot; file)  ===&lt;br /&gt;
&lt;br /&gt;
The main input to LocusZoom is a file containing results from an association scan or meta-analysis. The file must have 2 things: markers (SNPs), and p-values. The file should look something like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;25%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MarkerName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | P-value&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs1 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0.423&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs2 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 1.23e-04&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | rs3 &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 9.4e-390&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be tab-delimited, though this can be changed using the &amp;lt;code&amp;gt;--delim &amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
This file should be passed to locuszoom using the &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
If your marker and p-value column names are not &amp;quot;MarkerName&amp;quot; and &amp;quot;P-value&amp;quot;, you may set them with &amp;lt;code&amp;gt;--markercol&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--pvalcol&amp;lt;/code&amp;gt; options. &lt;br /&gt;
&lt;br /&gt;
P-values of any magnitude are supported in scientific notation (we use an arbitrary precision library built-in to python, and transform p-values to the log scale.) If you&#039;ve already transformed your p-values to the log scale, simply use &amp;lt;code&amp;gt;--no-transform&amp;lt;/code&amp;gt; and LocusZoom will not transform them. &lt;br /&gt;
&lt;br /&gt;
=== Region  ===&lt;br /&gt;
&lt;br /&gt;
You can specify the region to plot in any one of the following ways: &lt;br /&gt;
&lt;br /&gt;
*A reference SNP and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --flank 500kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A reference SNP and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
*A gene and flanking region&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --flank 250kb &amp;lt;/pre&amp;gt; &lt;br /&gt;
The flank is computed as +/- from the transcription start/end of the gene. From this region, LocusZoom will find the SNP with the most significant p-value, and use this as the reference SNP. &lt;br /&gt;
&lt;br /&gt;
*A gene and chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
This method is similar to the above, except that an exact region is specified. The SNP with the most significant p-value in this region will be used. &lt;br /&gt;
&lt;br /&gt;
*A chromosome/start/stop specification&lt;br /&gt;
&amp;lt;pre&amp;gt; --chr # --start &amp;amp;lt;base position&amp;amp;gt; --end &amp;amp;lt;base position&amp;amp;gt; &amp;lt;/pre&amp;gt; &lt;br /&gt;
Once again, the SNP with the most significant p-value will be used in this region. &lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides two fast methods for generating plots for a large number of regions: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;--hits &amp;lt;/code&amp;gt;, which parses a file for SNP names (rs#) and creates a plot for each one. &lt;br /&gt;
*&amp;lt;code&amp;gt;--hitspec &amp;lt;/code&amp;gt;, which reads a batch mode specification file.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;code&amp;gt;--hits&amp;lt;/code&amp;gt;, you need only provide any text file that has SNP names (of the rs### variety) present in the file. LocusZoom will extract SNPs from this file, regardless of formatting. Note that this file shouldn&#039;t be very large, or the parsing procedure could take a long time. &lt;br /&gt;
&lt;br /&gt;
For a more thorough specification of each plot you would like to create, use &amp;lt;code&amp;gt;--hitspec&amp;lt;/code&amp;gt;. For this option, you must provide a text file of the following format: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp &lt;br /&gt;
| Can be either a SNP, or gene.&lt;br /&gt;
|-&lt;br /&gt;
| chr &lt;br /&gt;
| Chromosome&lt;br /&gt;
|-&lt;br /&gt;
| start &lt;br /&gt;
| Start position to plot.&lt;br /&gt;
|-&lt;br /&gt;
| stop &lt;br /&gt;
| Stop position.&lt;br /&gt;
|-&lt;br /&gt;
| flank &lt;br /&gt;
| Flank for region. Can be given instead of chr/start/stop.&lt;br /&gt;
|-&lt;br /&gt;
| run &lt;br /&gt;
| Should this row be read? Should be &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| m2zargs &lt;br /&gt;
| List of arguments for customizing plots. You can find a list of them here: [[LocusZoom#Commonly_Used_LocusZoom_Options|Commonly Used LocusZoom Options]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be delimited by whitespace (tab, space, multiple spaces), and the header must exist, with column names exactly as specified in the table above. As an example, consider the following file: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | start &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | stop &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | flank &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | run &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | m2zargs&lt;br /&gt;
|-&lt;br /&gt;
| rs7983146 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 500kb &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;My favorite SNP&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| TCF7L2 &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| NA &lt;br /&gt;
| 1.25MB &lt;br /&gt;
| yes &lt;br /&gt;
| title=&amp;quot;TCF7L2 Region&amp;quot; showRecomb=F&lt;br /&gt;
|-&lt;br /&gt;
| rs7957197 &lt;br /&gt;
| 12 &lt;br /&gt;
| 119503590 &lt;br /&gt;
| 120322280 &lt;br /&gt;
| NA &lt;br /&gt;
| yes &lt;br /&gt;
| showAnnot=F&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The first row would plot rs7983146 as the reference SNP, and a region of 500kb on either side of it. The plot title would read &amp;quot;My favorite SNP.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
The second row would plot 1.25 MB on either side of TCF7L2&#039;s transcription start and stop. The SNP with the most significant p-value in your &amp;lt;code&amp;gt;--metal&amp;lt;/code&amp;gt; file will be used as the reference SNP. The plot title would read &amp;quot;TCF7L2 Region&amp;quot;, and the recombination overlay would be disabled using showRecomb=F. &lt;br /&gt;
&lt;br /&gt;
The third row would plot rs7957197 as the reference SNP, but here we&#039;ve specifically designated the region to plot, which is chr12:119503590-120322280. We&#039;ve also disabled showing SNP annotations with showAnnot=F. &lt;br /&gt;
&lt;br /&gt;
=== User-supplied LD  ===&lt;br /&gt;
&lt;br /&gt;
If new_fugue is installed, LocusZoom will automatically compute LD between the reference SNP and all other SNPs within each region to be plotted. However, you may wish to provide your own file with LD information. This can be done with the &amp;lt;code&amp;gt;--ld&amp;lt;/code&amp;gt; option, which requires a file of the following format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Column &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| snp1 &lt;br /&gt;
| Any SNP in your plotting region.&lt;br /&gt;
|-&lt;br /&gt;
| snp2 &lt;br /&gt;
| Should always be the reference SNP in the region.&lt;br /&gt;
|-&lt;br /&gt;
| dprime &lt;br /&gt;
| D&#039; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|-&lt;br /&gt;
| rsquare &lt;br /&gt;
| r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; between snp2 (reference SNP) and snp1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The file should be whitespace delimited, and the header (column names shown above) must exist. &lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom will produce a directory for each plot that contains the plot itself, along with a number of temporary files containing information on your particular region. The plot will be a PDF, named with the chr#:start-stop that was plotted. &lt;br /&gt;
&lt;br /&gt;
If you only want the PDF itself, and don&#039;t want the other files, you can use the &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt; option. &lt;br /&gt;
&lt;br /&gt;
Each directory (or PDF, in the case of &amp;lt;code&amp;gt;--plotonly&amp;lt;/code&amp;gt;) will have the date included to avoid collisions with previous plots - this behavior can be disabled using &amp;lt;code&amp;gt;--no-date&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You can further customize the directory/PDF names that are created by using the &amp;lt;code&amp;gt;--prefix &amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; option. This will append a text string at the beginning of each directory/PDF that is created. &lt;br /&gt;
&lt;br /&gt;
== LocusZoom options  ==&lt;br /&gt;
&lt;br /&gt;
LocusZoom has a number of command line options, described in the table below. &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Important settings&lt;br /&gt;
|-&lt;br /&gt;
| --metal &lt;br /&gt;
| This is the data file to provide. Files generated by the meta-analysis program METAL are already formatted appropriately. If your data is not from METAL, it is very simple to format it (see [[#Input]].)&lt;br /&gt;
|-&lt;br /&gt;
| --delim &lt;br /&gt;
| Delimiter for the data file. This defaults to tab, but can be anything. For ease of specification, you can use the following shortcuts: --delim tab, --delim space, --delim comma.&lt;br /&gt;
|-&lt;br /&gt;
| --pvalcol &lt;br /&gt;
| Name of p-value column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --markercol &lt;br /&gt;
| Name of the SNP column in the --metal file.&lt;br /&gt;
|-&lt;br /&gt;
| --refsnp &lt;br /&gt;
| Reference SNP to be used in the plot.&lt;br /&gt;
|-&lt;br /&gt;
| --refgene &lt;br /&gt;
| Specify a gene instead of a reference SNP. This will plot a region near a gene, and automatically find the SNP with the most significant p-value to use as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| --flank &lt;br /&gt;
| Specify the region near a reference SNP or gene as a &amp;quot;flank&amp;quot;, instead of having to specify chr/start/stop explicitly. This can be specified in bases, kilobases, or megabases. Examples: 500kb, 1MB, 100141&lt;br /&gt;
|-&lt;br /&gt;
| --chr, --start, --stop &lt;br /&gt;
| Specify chromosome/start/stop as the exact interval to plot. If no --refsnp is specified, the SNP with the most significant p-value in the region will be used as the reference SNP.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Optional settings&lt;br /&gt;
|-&lt;br /&gt;
| --build &lt;br /&gt;
| Human genome build. This defaults to &amp;quot;hg18&amp;quot;, and is the only build we provide data for currently. You can supply your own build-specific data by modifying the conf file, and creating your own SQLite database (see *LINK HERE*).&lt;br /&gt;
|-&lt;br /&gt;
| --ld &lt;br /&gt;
| Provide a file specifying LD between your reference SNP and all SNPs within the region you wish to plot. You only need to supply this file if you have created LD specifically for your purposes (perhaps a different population or genome build.) Otherwise, LD is computed automatically for you.&lt;br /&gt;
|-&lt;br /&gt;
| --source &lt;br /&gt;
| Source to use for genotypes when using LD. Currently, we support &amp;quot;1000G&amp;quot; and &amp;quot;hapmap&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| --pop &lt;br /&gt;
| Population to use when computing LD. Currently, when we support &amp;quot;CEU&amp;quot; for 1000G, and &amp;quot;CEU&amp;quot;, &amp;quot;YRI&amp;quot;, and &amp;quot;JPT+CHB&amp;quot; for hapmap.&lt;br /&gt;
|-&lt;br /&gt;
| --snpset &lt;br /&gt;
| Rug of SNPs to create at the top of the plot. Defaults to the Illumina 1M chip currently.&lt;br /&gt;
|-&lt;br /&gt;
| --plotonly &lt;br /&gt;
| Create only a PDF of the plot, and remove all temporary files/directories created during plotting.&lt;br /&gt;
|-&lt;br /&gt;
| --no-transform &lt;br /&gt;
| LocusZoom supports arbitrary precision p-values. However, if your p-values have already been transformed to the log scale, you can use this option to stop LocusZoom from automatically transforming them.&lt;br /&gt;
|-&lt;br /&gt;
| --prefix &lt;br /&gt;
| Places a text string at the beginning of each plot or directory created. This is mainly used to denote different batches of plots - for example, you could use --prefix using_ceu to denote these plots are computed using CEU LD information.&lt;br /&gt;
|-&lt;br /&gt;
| --db &lt;br /&gt;
| SQLite database file to use. This is set in the conf file by default, but can be changed on the command line if desired.&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;
== Plotting options ==&lt;br /&gt;
&lt;br /&gt;
In addition to the options above, there are options that control the plotting engine inside Locuszoom.  These are used with a different syntax: arg=value (no spaces allowed).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;85%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Option (with default value)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| theme=NULL&lt;br /&gt;
| Select a theme.  A theme is a collection of other settings.  Options include theme=publication and theme=black.&lt;br /&gt;
|-&lt;br /&gt;
| ymax=10&lt;br /&gt;
| the display range for log10(p-value) will be at least ymax (extended as necessary to avoid clipping)&lt;br /&gt;
|-&lt;br /&gt;
| axisSize=1&lt;br /&gt;
| sclaing factor for axes&lt;br /&gt;
|-&lt;br /&gt;
| axisTextSize=1&lt;br /&gt;
| sclaing factor for axis labels&lt;br /&gt;
|-&lt;br /&gt;
| axisTextColor=gray30&lt;br /&gt;
| color of axis labels&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextColor=black&lt;br /&gt;
| color for reference SNP label (use &#039;transparent&#039; to hide this label)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextSize=1&lt;br /&gt;
| sclaing factor for reference SNP text size&lt;br /&gt;
|-&lt;br /&gt;
| refsnpTextAlpha=1&lt;br /&gt;
| transparency level for reference SNP label (1=opaque,0=transparent)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpLineColor=transparent&lt;br /&gt;
| color for ref snp line (invisible by default)&lt;br /&gt;
|-&lt;br /&gt;
| refsnpLineAlpha=.5&lt;br /&gt;
| transparency level for reference snp line&lt;br /&gt;
|-&lt;br /&gt;
| title = &amp;quot;&amp;quot;&lt;br /&gt;
| title for plot&lt;br /&gt;
|-&lt;br /&gt;
| titleColor=black&lt;br /&gt;
| color for title &lt;br /&gt;
|-&lt;br /&gt;
| width=10&lt;br /&gt;
| width of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| height=7&lt;br /&gt;
| height of pdf (inches)&lt;br /&gt;
|-&lt;br /&gt;
| leftMarginLines=5&lt;br /&gt;
| margin (in lines) on left&lt;br /&gt;
|-&lt;br /&gt;
| rightMarginLines=5&lt;br /&gt;
| margin (in lines) on right&lt;br /&gt;
|-&lt;br /&gt;
| unit=1000000&lt;br /&gt;
| bp per unit displayed in plot&lt;br /&gt;
|-&lt;br /&gt;
| showAnnot=TRUE&lt;br /&gt;
| show annotation for each snp?&lt;br /&gt;
|-&lt;br /&gt;
| showGenes=TRUE&lt;br /&gt;
| show genes?&lt;br /&gt;
|-&lt;br /&gt;
| annotCol=&#039;annotation&#039;&lt;br /&gt;
| column to use for annotation, if it exists&lt;br /&gt;
|-&lt;br /&gt;
| annotPch=&#039;24,24,25,22,22,  8,7,21,1&#039;  &lt;br /&gt;
| plot symbols for annotation&lt;br /&gt;
|-&lt;br /&gt;
| annotOrder=NULL&lt;br /&gt;
| ordering of annotation classes (comma-separated list annotation strings in order, alphabetical by default)&lt;br /&gt;
|-&lt;br /&gt;
| showRefsnpAnnot=TRUE&lt;br /&gt;
| show annotation for reference snp too?&lt;br /&gt;
|-&lt;br /&gt;
| bigDiamond=FALSE&lt;br /&gt;
| put big diamond around refsnp?&lt;br /&gt;
|-&lt;br /&gt;
| ld=NULL&lt;br /&gt;
| file for LD information&lt;br /&gt;
|-&lt;br /&gt;
| ldCuts=&amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| cut points for LD coloring&lt;br /&gt;
|-&lt;br /&gt;
| ldColors=&amp;quot;gray50,navy, lightskyblue,green, orange,red,purple3&amp;quot;&lt;br /&gt;
| colors for LD&lt;br /&gt;
|-&lt;br /&gt;
| ldCol=&#039;rsquare&#039;&lt;br /&gt;
| name for LD column&lt;br /&gt;
|-&lt;br /&gt;
| LDTitle=NULL&lt;br /&gt;
| title for LD legend&lt;br /&gt;
|-&lt;br /&gt;
| smallDot=.4&lt;br /&gt;
| smallest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| largeDot=.8&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| refDot=NULL&lt;br /&gt;
| largest p-value cex &lt;br /&gt;
|-&lt;br /&gt;
| rfrows=4&lt;br /&gt;
| max number of rows used for displaying genes &lt;br /&gt;
|-&lt;br /&gt;
| showPartialGenes=TRUE&lt;br /&gt;
| should genes that don&#039;t fit completely be displayed?&lt;br /&gt;
|-&lt;br /&gt;
| geneFontSize=.8&lt;br /&gt;
| size for gene names&lt;br /&gt;
|-&lt;br /&gt;
| geneColor=&amp;quot;navy&amp;quot;&lt;br /&gt;
| color for genes&lt;br /&gt;
|-&lt;br /&gt;
| snpsetFile=NULL&lt;br /&gt;
| use this file for SNPset data &lt;br /&gt;
|-&lt;br /&gt;
| rugColor=gray30&lt;br /&gt;
| color for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| rugAlpha=1&lt;br /&gt;
| alpha for snpset rugs&lt;br /&gt;
|-&lt;br /&gt;
| metalRug=NULL&lt;br /&gt;
| if not null, use as label for rug of metal positions&lt;br /&gt;
|-&lt;br /&gt;
| showRecomb=TRUE&lt;br /&gt;
| show recombination rate?&lt;br /&gt;
|-&lt;br /&gt;
| recombColor=blue&lt;br /&gt;
| color for reccomb rate on plot&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisColor=NULL&lt;br /&gt;
| color for reccomb rate axis labeing (default matches recombColor)&lt;br /&gt;
|-&lt;br /&gt;
| recombAxisAlpha=NULL&lt;br /&gt;
| color for reccomb rate axis labeing&lt;br /&gt;
|-&lt;br /&gt;
| recombOver=FALSE&lt;br /&gt;
| overlay recombination rate? (else underlay it)&lt;br /&gt;
|-&lt;br /&gt;
| recombFill=FALSE&lt;br /&gt;
| fill recombination rate? (else line only)&lt;br /&gt;
|-&lt;br /&gt;
| recombFillAlpha=0.2&lt;br /&gt;
| recomb fill alpha&lt;br /&gt;
|-&lt;br /&gt;
| recombLineAlpha=0.8&lt;br /&gt;
| recomb line/text alpha&lt;br /&gt;
|-&lt;br /&gt;
| frameColor=gray30&lt;br /&gt;
| frame color for plots&lt;br /&gt;
|-&lt;br /&gt;
| frameAlpha=1&lt;br /&gt;
| frame alpha for plots&lt;br /&gt;
|-&lt;br /&gt;
| legendSize=.8&lt;br /&gt;
| scaling factor of legend&lt;br /&gt;
|-&lt;br /&gt;
| legendAlpha=1&lt;br /&gt;
| transparency of legend background&lt;br /&gt;
|-&lt;br /&gt;
| legend=&#039;auto&#039;&lt;br /&gt;
| legend? (auto, left, right, or none)&lt;br /&gt;
|-&lt;br /&gt;
| hiStart=0&lt;br /&gt;
| start of hilite region&lt;br /&gt;
|-&lt;br /&gt;
| hiEnd=0&lt;br /&gt;
| end of hilite region&lt;br /&gt;
|-&lt;br /&gt;
| hiColor=blue&lt;br /&gt;
| color used for hiliting&lt;br /&gt;
|-&lt;br /&gt;
| hiAlpha=0.1&lt;br /&gt;
| transparency level for highlighting&lt;br /&gt;
|-&lt;br /&gt;
| prelude=NULL&lt;br /&gt;
| R code to execute after data is read but before plot is made (allows data modification)&lt;br /&gt;
|-&lt;br /&gt;
| postlude=NULL,                        &lt;br /&gt;
| R code to execute after plot is made &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;
== Examples  ==&lt;br /&gt;
&lt;br /&gt;
=== A quick peek at a particular SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1002227&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== A quick peek at a particular gene  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refgene CETP&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Plot 500kb on either side of a SNP  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs7983146 --flank 500kb&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Create a plot for each SNP in a file  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --hits file_with_snps&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use 1000 genomes, CEU for LD instead of the default  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --source 1000G&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Use hapmap YRI for LD  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs11899863 --pop YRI&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Specify a specific region and reference SNP to plot  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;--metal your_data --refsnp rs1552224 --chr 11 --start 71810746 --stop 72710746&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Advanced configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide a SQLite database based on UCSC human genome &#039;&#039;&#039;build hg18&#039;&#039;&#039;, which includes the following tables: &lt;br /&gt;
&lt;br /&gt;
*snp_pos: SNP positions &lt;br /&gt;
*refFlat: gene information (exons, transcription start/stops, etc.) &lt;br /&gt;
*recomb_rate: recombination rates from hapmap phase 2 &lt;br /&gt;
*snp_set: maps each SNP to a &amp;quot;set&amp;quot; - for example, all SNPs on the Illumina 1M chip &lt;br /&gt;
*refsnp_trans: a table that maps SNPs from previous builds to the current build&lt;br /&gt;
&lt;br /&gt;
To create your own database, we provide a script &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; that can insert these tables for you. We recommend creating your own database file, rather than inserting tables into the default LocusZoom database. This script is capable of using python&#039;s built-in sqlite support, but for faster insertion of tables (about 2x faster), we recommend installing sqlite3 from [http://www.sqlite.org/ www.sqlite.org]. &lt;br /&gt;
&lt;br /&gt;
==== Inserting snp_pos  ====&lt;br /&gt;
&lt;br /&gt;
First, create a file that looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos&lt;br /&gt;
|-&lt;br /&gt;
| rs38343 &lt;br /&gt;
| 1 &lt;br /&gt;
| 93919141&lt;br /&gt;
|-&lt;br /&gt;
| rs918141 &lt;br /&gt;
| 7 &lt;br /&gt;
| 763263&lt;br /&gt;
|-&lt;br /&gt;
| chr4:9181 &lt;br /&gt;
| 4 &lt;br /&gt;
| 9181&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file should be: tab-delimited, must have a header, and the columns should be exactly in that order. &lt;br /&gt;
&lt;br /&gt;
Now, you can create your own database, and insert this file by using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_pos my_snp_pos_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
This command creates a database called &amp;quot;my_database.db&amp;quot; and inserts the SNP position table into it. If &amp;quot;my_database.db&amp;quot; had existed already, it would drop the snp_pos table in it, and insert yours in its place. &lt;br /&gt;
&lt;br /&gt;
One special note about adding SNP position tables: a refsnp_trans table will automatically be created for you, where each SNP maps to itself. If you have a list of SNPs from previous builds that you would like to map to a SNP in the current build, you can then insert your own refsnp_trans table (see below for more information on this table.) &lt;br /&gt;
&lt;br /&gt;
==== Inserting refsnp_trans  ====&lt;br /&gt;
&lt;br /&gt;
The refsnp_trans table looks like the following: &lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;75%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_orig &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | rs_current&lt;br /&gt;
|-&lt;br /&gt;
| rs840 &lt;br /&gt;
| rs715&lt;br /&gt;
|-&lt;br /&gt;
| rs1086 &lt;br /&gt;
| rs940&lt;br /&gt;
|-&lt;br /&gt;
| rs1234 &lt;br /&gt;
| rs1067&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column contains SNP names from older genome builds, and the rs_current column contains SNP names from the current genome build (i.e., the build your database file is anchored to.) &lt;br /&gt;
&lt;br /&gt;
Inserting this table into your database is simply then: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --trans my_snp_translations_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
You will want to execute this command AFTER inserting the snp_pos table, since that command drops the existing translation table. &lt;br /&gt;
&lt;br /&gt;
==== Inserting refFlat  ====&lt;br /&gt;
&lt;br /&gt;
The refFlat table mirrors what is currently supplied by the refFlat table in the UCSC database. The file should look like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | geneName &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | name &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chrom &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | strand &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | txEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsStart &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cdsEnd &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonCount &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonStarts &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | exonEnds&lt;br /&gt;
|-&lt;br /&gt;
| EFCAB1 &lt;br /&gt;
| NM_024593 &lt;br /&gt;
| chr8 &lt;br /&gt;
| - &lt;br /&gt;
| 49798505 &lt;br /&gt;
| 49810423 &lt;br /&gt;
| 49799853 &lt;br /&gt;
| 49810263 &lt;br /&gt;
| 6 &lt;br /&gt;
| 49798505, &lt;br /&gt;
| 49799913,&lt;br /&gt;
|-&lt;br /&gt;
| HECTD3 &lt;br /&gt;
| NM_024602 &lt;br /&gt;
| chr1 &lt;br /&gt;
| - &lt;br /&gt;
| 45240806 &lt;br /&gt;
| 45249614 &lt;br /&gt;
| 45241750 &lt;br /&gt;
| 45249516 &lt;br /&gt;
| 21 &lt;br /&gt;
| 45240806,45241927, &lt;br /&gt;
| 45241835,45241999,&lt;br /&gt;
|-&lt;br /&gt;
| PTPN20B &lt;br /&gt;
| NM_001042361 &lt;br /&gt;
| chr10 &lt;br /&gt;
| - &lt;br /&gt;
| 48357047 &lt;br /&gt;
| 48447587 &lt;br /&gt;
| 48358657 &lt;br /&gt;
| 48447532 &lt;br /&gt;
| 8 &lt;br /&gt;
| 48357047,48359393,48391320, &lt;br /&gt;
| 48358692,48359456,48391411,&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can insert this table into the database using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --refflat my_refflat_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting recomb_rate  ====&lt;br /&gt;
&lt;br /&gt;
The recomb_rate table mirrors what is available from [ftp://ftp.hapmap.org/hapmap/recombination/2008-03_rel22_B36/rates/ HapMap]. The format is: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | chr &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | pos &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | recomb &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | cm_pos&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 72434 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 78032 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 8.397e-06&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554461 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.00072304&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 554484 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000723075&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 555296 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000724293&lt;br /&gt;
|-&lt;br /&gt;
| 1 &lt;br /&gt;
| 558185 &lt;br /&gt;
| 0.0015 &lt;br /&gt;
| 0.000728627&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table can be inserted using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --recomb_rate my_recomb_rate_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Inserting snp_set  ====&lt;br /&gt;
&lt;br /&gt;
The snp_set table simply carries a mapping of SNPs to a particular set they may belong to. The table looks like: &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | snp_set&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs1000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000000 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|-&lt;br /&gt;
| rs10000009 &lt;br /&gt;
| Illu1M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first column is a SNP, and the second is the name of the set it belongs to. If a SNP belongs to multiple sets, you can duplicate that SNP multiple times, one for each set. &lt;br /&gt;
&lt;br /&gt;
Inserting the table into your database can be done using: &lt;br /&gt;
&amp;lt;pre&amp;gt; dbmeister.py --db my_database.db --snp_set my_snpset_file &amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Making LocusZoom aware of your new database  ====&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve created your own database file, you need to make LocusZoom aware that it exists. There are two ways to do this: &lt;br /&gt;
&lt;br /&gt;
#Edit conf/m2zfast.conf, and change the &amp;lt;code&amp;gt;SQLITE_DB&amp;lt;/code&amp;gt; variable &lt;br /&gt;
#Supply the &amp;lt;code&amp;gt;--db&amp;lt;/code&amp;gt; command line option when invoking &amp;lt;code&amp;gt;bin/locuszoom&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing the m2zfast.conf file entails changing the following block of code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Here, we&#039;ve mapped build &amp;quot;hg18&amp;quot; to the default database file that comes with LocusZoom. You can mimic this format and insert your own, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;SQLITE_DB = {&lt;br /&gt;
  &#039;hg18&#039;&amp;amp;nbsp;: &amp;quot;data/database/locuszoom_hg18.db&amp;quot;,&lt;br /&gt;
  &#039;hg19&#039;&amp;amp;nbsp;: &amp;quot;data/database/my_database.db&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The location of your database should be either an absolute path to your file, or a path relative to the locuszoom/ root (like those seen above.) &lt;br /&gt;
&lt;br /&gt;
If you wish for your database to become the default, change the &amp;lt;code&amp;gt;LATEST_BUILD&amp;lt;/code&amp;gt; variable in the m2zfast.conf file to whatever you have chosen above (in our example, our new database became mapped to &#039;hg19&#039;.) &lt;br /&gt;
&lt;br /&gt;
=== Changing m2zfast.conf settings  ===&lt;br /&gt;
&lt;br /&gt;
The m2zfast.conf configuration file contains a number of settings that are typically static, but could require user configuration. The table below lists each variable, and its purpose. &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Variable &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| LATEST_BUILD &lt;br /&gt;
| Latest build (i.e. the default build.) This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| NEWFUGUE_PATH &lt;br /&gt;
| Path to the new_fugue binary. Defaults to &amp;quot;new_fugue&amp;quot;, which simply means it is searched for on your path. If new_fugue is not on your path, you will need to specify the full path here.&lt;br /&gt;
|-&lt;br /&gt;
| OFFLINE &lt;br /&gt;
| For the standalone version of LocusZoom, this should always be True.&lt;br /&gt;
|-&lt;br /&gt;
| SQLITE_DB &lt;br /&gt;
| See [[LocusZoom Standalone#Making_LocusZoom_aware_of_your_new_database|Making LocusZoom aware of your database]].&lt;br /&gt;
|-&lt;br /&gt;
| LD_DB &lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps a tuple of (genotype source, genotype population, genome build) to genotype files.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SNP_FLANK &lt;br /&gt;
| If only a --refsnp is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_GENE_FLANK &lt;br /&gt;
| If only a --refgene is given with no --flank, this variable sets the default flank that is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LD caching  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom attempts to remember LD calculations that were made on previous runs of the program to avoid having to re-calculate the same regional LD for subsequent runs. The process works as follows: &lt;br /&gt;
&lt;br /&gt;
*For a given reference SNP and chr/start/stop: &lt;br /&gt;
**If LD has not been previously computed, use new_fugue to compute LD with the reference SNP and all other SNPs in the region, and store this result to the LD cache &lt;br /&gt;
**Else, retrieve the previously stored LD results&lt;br /&gt;
&lt;br /&gt;
The cache intelligently stores LD from separate sources (hapmap, 1000G), populations, builds, and even different versions of genotype files separately. &lt;br /&gt;
&lt;br /&gt;
Upon running LocusZoom, a file called &amp;quot;ld_cache.db&amp;quot; will automatically be created in the current directory, and LD computations will be stored there. If you wish to change the location of the LD cache, use &amp;lt;code&amp;gt;--cache &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;. If you wish to disable LD caching, you can use &amp;lt;code&amp;gt;--cache None&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Python note:&#039;&#039; The ld_cache.db is actually a shelve, and you can explore its contents using: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;import shelve&lt;br /&gt;
d = shelve.open(&amp;quot;ld_cache.db&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== License  ==&lt;br /&gt;
&lt;br /&gt;
Copyright 2010 Ryan Welch, Randall Pruim&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1341</id>
		<title>LocusZoom</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1341"/>
		<updated>2010-05-14T19:21:33Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Upload your own meta-analysis file and generate single plots using a web-based form */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:LocusZoomSmall.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LocusZoom&#039;&#039;&#039; is designed to facilitate viewing of local association results together with useful information about a locus, such as the location and orientation of the genes it includes, linkage disequilibrium coefficients and local estimates of recombination rates. It was developed by popular demand, as a result of many questions we have had about &amp;quot;How did you make the figures in your talk?&amp;quot; or &amp;quot;How did you make the figures for your GWAS paper?&amp;quot; (And for better or for worse, we have quite a few GWAS papers!!).&lt;br /&gt;
&lt;br /&gt;
LocusZoom can be used in three ways:&lt;br /&gt;
&lt;br /&gt;
; Plot Summaries of Your Genomewide Scan Interactively&lt;br /&gt;
: You can upload summary results of your own genomewide scan or genomewide meta-analysis and request plots of regions of interest using a web-based form.&lt;br /&gt;
&lt;br /&gt;
; Generate Many Plots in Batch Mode&lt;br /&gt;
: You can upload summary results for your genomewide scan or genomewide meta-analysis and request several plots in one go by uploading a batch file. You will receive results via e-mail. A snail-mail option is not available.&lt;br /&gt;
&lt;br /&gt;
; Plot Summaries of Publicly Available Datasets&lt;br /&gt;
: Currently, this includes the results of [http://www.sph.umich.edu/csg/abecasis/public/lipids2008/ our genome-wide scan] for variants associated with HDL-cholesterol, LDL-cholesterol and triglyceride levels in ~20,000 individuals.&lt;br /&gt;
&lt;br /&gt;
We are also developing a distributable code package that you can install on your own system to generate plots locally. This is not yet available, but is expected in April 2010.&lt;br /&gt;
&lt;br /&gt;
== Upload your own meta-analysis file and generate single plots using a web-based form  ==&lt;br /&gt;
&lt;br /&gt;
=== Uploading Your Association Study Results ===&lt;br /&gt;
&lt;br /&gt;
Association results can be uploaded to our web server using the [http://csg.sph.umich.edu/locuszoom/ plot your data webpage]. Result files are limited to 20Mb in size, which allows for a [[gzip|gzipped]] text table including key columns (marker name, p-value and sample size) for up to ~3 million SNPs. In our tests, a typical GWAS results file is ~17 Mb in size after imputation of HapMap SNPs. Once a file is uploaded, LocusZoom will remember the file for the duration of your web session allowing you to generate multiple plots. If you have a slow connection or would like to save time, you can upload results for a region or chromosome of interest only. Your results are entirely confidential and won&#039;t be viewed by us or anyone else (except those with whom you share them!)&lt;br /&gt;
&lt;br /&gt;
To specify the region to be plotted, you will have to specify the name of a key marker in the region (typically, as an rs-number), name a gene of interest or provide appropriate genome coordinates. When displaying linkage disequilibrium, plotting will be very fast for small windows when HapMap CEU linkage disequilibrium is requested (because pairwise coefficients have been precomputed) and will be a bit slower for larger windows (because linkage disequilibrium coefficients must be computed on the fly).&lt;br /&gt;
&lt;br /&gt;
If you include a sample size column in the result file, it will be used to control the size of each plotted marker.&lt;br /&gt;
&lt;br /&gt;
=== Custom Annotation ===&lt;br /&gt;
&lt;br /&gt;
You may choose to have SNPs displayed using different plotting symbols to distinguish them from each other.  To implement this, in the section &amp;quot;Custom Annotation&amp;quot; in the box &amp;quot;Column Name&amp;quot;, you need to provide the name of a column in your meta-analysis file.  This column will list a category for each SNP of your own choosing (i.e. &amp;quot;nonsynonymous&amp;quot;, &amp;quot;splice&amp;quot;,&amp;quot;intronic&amp;quot;,etc.) or (&amp;quot;Genotyped&amp;quot;,&amp;quot;Imputed&amp;quot;), however, the category names may not include any spaces.  To select the order of the categories to display in the legend and to match the order of pre-selected R plotting symbols (set as pch = 21, 22, 23, 24, 25, 4, 7, 8, 10, 11, 12, 13, 14, 3), you may provide the category names in the specified order in &amp;quot;Category Order&amp;quot; section of &amp;quot;Custom Annotation&amp;quot;.  Each entry (which may not contain spaces) does not need quotes but each entry should be separated by commas.&lt;br /&gt;
&lt;br /&gt;
Alternatively, we have provided functional annotation of all 1000 Genomes (Aug 2009) and HapMap r22 SNPs according to the following categories; Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). This can be implemented using the section &amp;quot;Show Annotation&amp;quot; and clicking the box beside each annotation category that you would like distinguished.  SNPs that are not in any selected category will still be displayed as having no annotation.&lt;br /&gt;
&lt;br /&gt;
=== Plotting of Pairwise Linkage Disequilibrium ===&lt;br /&gt;
&lt;br /&gt;
In the main plot window, data points are colored according to their level of linkage disequilibrium (LD) of the each SNP with the index SNP. If users specify the region to display using an index SNP and flanking region, LD of all data points will be relative to the user-specified index SNP. If users specify the region to display using genome coordinates or a gene name, LocusZoom will automatically select the most significant SNP in the region as the index SNP. For all other SNPs in the plot, the color of the data point will reflect the pairwise LD with this index SNP. The default LD measure is r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; calculated from the HapMap CEU population (release 22), but users have the option to replace this with D’ and of selecting the HapMap YRI, Hapmap CHB+JPT or 1000 Genomes CEU reference panels. Because we have pre-computed LD for all SNPs in HapMap CEU, plots will often generate more quickly if using the default LD information. SNPs with missing LD information are shown in grey.&lt;br /&gt;
&lt;br /&gt;
=== Customizing the Display of Your Results ===&lt;br /&gt;
&lt;br /&gt;
All options listed in the Main Table above are available, as well as the options listed below&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Setting &lt;br /&gt;
! Default Value &lt;br /&gt;
! Details&lt;br /&gt;
|-&lt;br /&gt;
| Column Delimiter &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the type of column delimiter in the results file&lt;br /&gt;
|-&lt;br /&gt;
| Pvalue Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the name of the column that contains the p-values&lt;br /&gt;
|-&lt;br /&gt;
| Marker Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the heading of the column that contains marker names&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| none &lt;br /&gt;
| Plots can be generated based on hg18 (default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| HapMap Population for LD &lt;br /&gt;
| none &lt;br /&gt;
| This option allows the user to specify which HapMap population was used to obtain LD estimates. The default is CEU but users may select YRI or JPT+CHB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Batch Mode  ==&lt;br /&gt;
&lt;br /&gt;
To start batch mode, first upload your results file just as you would in interactive mode. The same file size restrictions apply.&lt;br /&gt;
&lt;br /&gt;
=== Generating a Hit Spec File ===&lt;br /&gt;
&lt;br /&gt;
Batch mode allows you to conveniently specify a set of plots to be generated in &amp;quot;Hit Spec&amp;quot; file. This is handy if you need to generate large numbers of plots or if you want to plot the same set of regions after updating a genomewide analysis (for example).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Hit Spec&amp;quot; file is a whitespace delimited text file. The file has six mandatory columns which can be followed by a series of optional &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs to allow for detailed customization of each plot. The first line in the file is assumed to be a header and is ignored. Each subsequent line describes a single plot. There are three ways to select a region to plot:&lt;br /&gt;
&lt;br /&gt;
; Plotting a window flanking an interesting SNP&lt;br /&gt;
: This option allows you to plot results for all markers within a specific distance (e.g. 500kb) of an index SNP. To use this option, set column 1 to have the name of the index SNP (e.g. &#039;&#039;rs2&#039;&#039; below) and set column 5 to specify the width of the region of interest (e.g. 500kb below). Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs1	   na	   na	    na       500kb        yes      rfrows=3 weightCol=”N” snpset=”HapMap” metalRug=”Our SNPs” &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking an interesting SNP&lt;br /&gt;
: This option is similar to the previous option, but allows you to specify an assymetric region of interest. For example, perhaps you interested in a plot that extends a bit further to the right of the SNP of interest. In this case, specify the coordinates of the region to be plotted in columns 2, 3, and 4. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs2	   1	   540000   580000   na	          yes      rfrows=4 legend=”right” showAnnot=T &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking a gene of interest&lt;br /&gt;
: This option allows you to focus on a particular gene, rather than a specific SNP. It is similar to the first option. You should set column 1 to be the name of the gene of interest and column 5 to be the desired window width. When you use this option, LocusZoom will automatically select an index SNP for each region; the SNP will be the site with the smallest p-value. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
CETP	   na      na	    na       200kb        yes      rfrows=6 showAnnot=T annotPch=”1,24,24,25,22,21,8,7”&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sixth column in the &amp;quot;Hit Spec&amp;quot; file can be used to enable (with the value &#039;&#039;yes&#039;&#039;) or disable (with the value &#039;&#039;no&#039;&#039;) an individual plot. For example, if you run a &amp;quot;Hit Spec&amp;quot; file with 15 plots and 14 of them turn out very nicely, you may wish to re-run the &amp;quot;Hit Spec&amp;quot; file with some tweaks to the problem plot. In this case (if you dislike waiting for your results as much as we do!), you could disable generation of the plots that seem nice by changing the 6th column to “no” and leave the plot that you tweaked as a “yes”.&lt;br /&gt;
&lt;br /&gt;
The 7th and final column contains additional LocusZoom arguments as &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs. Any number of &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pair arguments can be included. For details of available options, see the section entitled LocusZoom options below.&lt;br /&gt;
&lt;br /&gt;
== Generate single plots using our publicly-available lipids GWAS data  ==&lt;br /&gt;
&lt;br /&gt;
In addition to plotting your own results, you can plot the results of some publicly available GWAS. Currently, the only publicly available set of results is our GWAS for loci determining blood lipid levels (Kathiresan et al, Nature Genetics 2009). Just like when you are plotting your own data, you can specify 1) an index SNP and a flanking region, 2) the chromosome together with start and stop positions (in basepairs), or 3) gene name and a flanking region.&lt;br /&gt;
&lt;br /&gt;
== Commonly Used LocusZoom Options ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Web Form &lt;br /&gt;
! &amp;quot;Hit Spec&amp;quot; File Key-Value Pair &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Title on Plot &lt;br /&gt;
| title=”My Favorite Locus” &lt;br /&gt;
| Specifies large text displayed above the plot&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| n/a &lt;br /&gt;
| Plots can be generated based on hg18 (the default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| Legend Location &lt;br /&gt;
| legend=”left” &lt;br /&gt;
| This specifies the location of the legend within the plot, the default is auto. Auto tries to select a location that overlaps a minimal number of datapoints. (auto, left, right, none) &lt;br /&gt;
|-&lt;br /&gt;
| SNP Position Rug &lt;br /&gt;
| snpset=”HapMap” metalRug=”Rug SNPs” &lt;br /&gt;
| These options control display of tickmarks indicating SNP positions at the top of the plot. Setting snpset=&amp;quot;HapMap&amp;quot;, snpset=&amp;quot;Illu318&amp;quot; or snpset=&amp;quot;Affy500&amp;quot; display a fixed set of SNPs. (You can also try snpset=&amp;quot;Affy500,Illu318,HapMap&amp;quot; to see all 3). The metalRug option displays a rug which only includes the SNPs that are actually plotted. To remove the rug in batch mode set snpset=NULL. &lt;br /&gt;
|-&lt;br /&gt;
| Number of Rows for Gene Names &lt;br /&gt;
| rfrows=4 &lt;br /&gt;
| LocusZoom will automatically tries to determine the number of display rows to use for genes and gene names so they are not overlapping. This can make each plot prettier, but is not ideal when you want to compare many plots side by side. To ensure a fixed amount of space is used for gene names, use this option to set the maximum number of display rows. If LocusZoom runs out of plotting space and some genes are left out, a warning will be added to the plot.&lt;br /&gt;
|-&lt;br /&gt;
| Point Size  &lt;br /&gt;
| weightCol=”SampleSize” &lt;br /&gt;
| This specifies that the “dot size” of each data points will reflect the square-root of the sample size. The default is to have all dot sizes equal.&lt;br /&gt;
|-&lt;br /&gt;
| LD Measure &lt;br /&gt;
| ldCol=”dprime” (“rsquare”) &lt;br /&gt;
| Colors data points according to the selected LD  measure. The default is &amp;quot;rsquare&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| Reference Population for LD &lt;br /&gt;
| n/a &lt;br /&gt;
| This option allows the user to specify which reference panel is used to obtain LD estimates. The default is CEU from HapMap Phase II but users may select YRI or JPT+CHB from HapMap Phase II, or CEU from 1000 Genomes (August 2009 release).&lt;br /&gt;
|-&lt;br /&gt;
| Highlight Region of Interest &lt;br /&gt;
| hiStart=425Mb hiEnd=425.1Mb &lt;br /&gt;
| A grey box can be used to highlight important regions of the genome – this can reflect where an association signal peaks or a region selected for sequencing, for example.&lt;br /&gt;
|-&lt;br /&gt;
| Theme &lt;br /&gt;
| theme=”publication” &lt;br /&gt;
| We have created a theme that has larger text and is more easily readable for publication.&lt;br /&gt;
|-&lt;br /&gt;
| Show Annotation &lt;br /&gt;
| showAnnot=T showRefsnpAnnot=T annotPch=”21,24,24,25,22,22,8,7” &lt;br /&gt;
| SNP annotation is available for all 1000G SNPs (Aug 2009 release) and can be enabled with the showAnnot=T option. The annotPch command allows you to customize the R plotting symbol used for each kind of SNP; it is okay to use the same symbol for more than one category. The annotation categories, together with their default symbol setting are: Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). For more information about these annotation categories used, please see http://research.nhgri.nih.gov/tools/unisnp/?rm=ohelp&lt;br /&gt;
|-&lt;br /&gt;
| Recombination Rate Overlay &lt;br /&gt;
| showRecomb=T &lt;br /&gt;
| The estimated recombination rate from HapMap samples can be shown on the plot or left off. The data plotted are from Hapmap; http://hapmap.ncbi.nlm.nih.gov/downloads/recombination/2008-03_rel22_B36/rates/&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1340</id>
		<title>LocusZoom</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom&amp;diff=1340"/>
		<updated>2010-05-14T19:05:20Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Generate single plots using our publicly-available lipids GWAS data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:LocusZoomSmall.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LocusZoom&#039;&#039;&#039; is designed to facilitate viewing of local association results together with useful information about a locus, such as the location and orientation of the genes it includes, linkage disequilibrium coefficients and local estimates of recombination rates. It was developed by popular demand, as a result of many questions we have had about &amp;quot;How did you make the figures in your talk?&amp;quot; or &amp;quot;How did you make the figures for your GWAS paper?&amp;quot; (And for better or for worse, we have quite a few GWAS papers!!).&lt;br /&gt;
&lt;br /&gt;
LocusZoom can be used in three ways:&lt;br /&gt;
&lt;br /&gt;
; Plot Summaries of Your Genomewide Scan Interactively&lt;br /&gt;
: You can upload summary results of your own genomewide scan or genomewide meta-analysis and request plots of regions of interest using a web-based form.&lt;br /&gt;
&lt;br /&gt;
; Generate Many Plots in Batch Mode&lt;br /&gt;
: You can upload summary results for your genomewide scan or genomewide meta-analysis and request several plots in one go by uploading a batch file. You will receive results via e-mail. A snail-mail option is not available.&lt;br /&gt;
&lt;br /&gt;
; Plot Summaries of Publicly Available Datasets&lt;br /&gt;
: Currently, this includes the results of [http://www.sph.umich.edu/csg/abecasis/public/lipids2008/ our genome-wide scan] for variants associated with HDL-cholesterol, LDL-cholesterol and triglyceride levels in ~20,000 individuals.&lt;br /&gt;
&lt;br /&gt;
We are also developing a distributable code package that you can install on your own system to generate plots locally. This is not yet available, but is expected in April 2010.&lt;br /&gt;
&lt;br /&gt;
== Upload your own meta-analysis file and generate single plots using a web-based form  ==&lt;br /&gt;
&lt;br /&gt;
=== Uploading Your Association Study Results ===&lt;br /&gt;
&lt;br /&gt;
Association results can be uploaded to our web server using the [http://csg.sph.umich.edu/locuszoom/ plot your data webpage]. Result files are limited to 20Mb in size, which allows for a [[gzip|gzipped]] text table including key columns (marker name, p-value and sample size) for up to ~3 million SNPs. In our tests, a typical GWAS results file is ~17 Mb in size after imputation of HapMap SNPs. Once a file is uploaded, LocusZoom will remember the file for the duration of your web session allowing you to generate multiple plots. If you have a slow connection or would like to save time, you can upload results for a region or chromosome of interest only. Your results are entirely confidential and won&#039;t be viewed by us or anyone else (except those with whom you share them!)&lt;br /&gt;
&lt;br /&gt;
To specify the region to be plotted, you will have to specify the name of a key marker in the region (typically, as an rs-number), name a gene of interest or provide appropriate genome coordinates. When displaying linkage disequilibrium, plotting will be very fast for small windows when HapMap CEU linkage disequilibrium is requested (because pairwise coefficients have been precomputed) and will be a bit slower for larger windows (because linkage disequilibrium coefficients must be computed on the fly).&lt;br /&gt;
&lt;br /&gt;
If you include a sample size column in the result file, it will be used to control the size of each plotted marker.&lt;br /&gt;
&lt;br /&gt;
=== Plotting of Pairwise Linkage Disequilibrium ===&lt;br /&gt;
&lt;br /&gt;
In the main plot window, data points are colored according to their level of linkage disequilibrium (LD) of the each SNP with the index SNP. If users specify the region to display using an index SNP and flanking region, LD of all data points will be relative to the user-specified index SNP. If users specify the region to display using genome coordinates or a gene name, LocusZoom will automatically select the most significant SNP in the region as the index SNP. For all other SNPs in the plot, the color of the data point will reflect the pairwise LD with this index SNP. The default LD measure is r&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; calculated from the HapMap CEU population (release 22), but users have the option to replace this with D’ and of selecting the HapMap YRI, Hapmap CHB+JPT or 1000 Genomes CEU reference panels. Because we have pre-computed LD for all SNPs in HapMap CEU, plots will often generate more quickly if using the default LD information. SNPs with missing LD information are shown in grey.&lt;br /&gt;
&lt;br /&gt;
=== Customizing the Display of Your Results ===&lt;br /&gt;
&lt;br /&gt;
All options listed in the Main Table above are available, as well as the options listed below&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Setting &lt;br /&gt;
! Default Value &lt;br /&gt;
! Details&lt;br /&gt;
|-&lt;br /&gt;
| Column Delimiter &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the type of column delimiter in the results file&lt;br /&gt;
|-&lt;br /&gt;
| Pvalue Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the name of the column that contains the p-values&lt;br /&gt;
|-&lt;br /&gt;
| Marker Column Name &lt;br /&gt;
| none &lt;br /&gt;
| Users must specify the heading of the column that contains marker names&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| none &lt;br /&gt;
| Plots can be generated based on hg18 (default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| HapMap Population for LD &lt;br /&gt;
| none &lt;br /&gt;
| This option allows the user to specify which HapMap population was used to obtain LD estimates. The default is CEU but users may select YRI or JPT+CHB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Batch Mode  ==&lt;br /&gt;
&lt;br /&gt;
To start batch mode, first upload your results file just as you would in interactive mode. The same file size restrictions apply.&lt;br /&gt;
&lt;br /&gt;
=== Generating a Hit Spec File ===&lt;br /&gt;
&lt;br /&gt;
Batch mode allows you to conveniently specify a set of plots to be generated in &amp;quot;Hit Spec&amp;quot; file. This is handy if you need to generate large numbers of plots or if you want to plot the same set of regions after updating a genomewide analysis (for example).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Hit Spec&amp;quot; file is a whitespace delimited text file. The file has six mandatory columns which can be followed by a series of optional &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs to allow for detailed customization of each plot. The first line in the file is assumed to be a header and is ignored. Each subsequent line describes a single plot. There are three ways to select a region to plot:&lt;br /&gt;
&lt;br /&gt;
; Plotting a window flanking an interesting SNP&lt;br /&gt;
: This option allows you to plot results for all markers within a specific distance (e.g. 500kb) of an index SNP. To use this option, set column 1 to have the name of the index SNP (e.g. &#039;&#039;rs2&#039;&#039; below) and set column 5 to specify the width of the region of interest (e.g. 500kb below). Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs1	   na	   na	    na       500kb        yes      rfrows=3 weightCol=”N” snpset=”HapMap” metalRug=”Our SNPs” &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking an interesting SNP&lt;br /&gt;
: This option is similar to the previous option, but allows you to specify an assymetric region of interest. For example, perhaps you interested in a plot that extends a bit further to the right of the SNP of interest. In this case, specify the coordinates of the region to be plotted in columns 2, 3, and 4. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
rs2	   1	   540000   580000   na	          yes      rfrows=4 legend=”right” showAnnot=T &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Plotting a region flanking a gene of interest&lt;br /&gt;
: This option allows you to focus on a particular gene, rather than a specific SNP. It is similar to the first option. You should set column 1 to be the name of the gene of interest and column 5 to be the desired window width. When you use this option, LocusZoom will automatically select an index SNP for each region; the SNP will be the site with the smallest p-value. Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Feature    chr     start    end      flank        plot     arguments&lt;br /&gt;
CETP	   na      na	    na       200kb        yes      rfrows=6 showAnnot=T annotPch=”1,24,24,25,22,21,8,7”&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sixth column in the &amp;quot;Hit Spec&amp;quot; file can be used to enable (with the value &#039;&#039;yes&#039;&#039;) or disable (with the value &#039;&#039;no&#039;&#039;) an individual plot. For example, if you run a &amp;quot;Hit Spec&amp;quot; file with 15 plots and 14 of them turn out very nicely, you may wish to re-run the &amp;quot;Hit Spec&amp;quot; file with some tweaks to the problem plot. In this case (if you dislike waiting for your results as much as we do!), you could disable generation of the plots that seem nice by changing the 6th column to “no” and leave the plot that you tweaked as a “yes”.&lt;br /&gt;
&lt;br /&gt;
The 7th and final column contains additional LocusZoom arguments as &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pairs. Any number of &#039;&#039;&#039;key&#039;&#039;&#039;=&#039;&#039;value&#039;&#039; pair arguments can be included. For details of available options, see the section entitled LocusZoom options below.&lt;br /&gt;
&lt;br /&gt;
== Generate single plots using our publicly-available lipids GWAS data  ==&lt;br /&gt;
&lt;br /&gt;
In addition to plotting your own results, you can plot the results of some publicly available GWAS. Currently, the only publicly available set of results is our GWAS for loci determining blood lipid levels (Kathiresan et al, Nature Genetics 2009). Just like when you are plotting your own data, you can specify 1) an index SNP and a flanking region, 2) the chromosome together with start and stop positions (in basepairs), or 3) gene name and a flanking region.&lt;br /&gt;
&lt;br /&gt;
== Commonly Used LocusZoom Options ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;lightgray&amp;quot;&lt;br /&gt;
! Web Form &lt;br /&gt;
! &amp;quot;Hit Spec&amp;quot; File Key-Value Pair &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Title on Plot &lt;br /&gt;
| title=”My Favorite Locus” &lt;br /&gt;
| Specifies large text displayed above the plot&lt;br /&gt;
|-&lt;br /&gt;
| Human Genome Build &lt;br /&gt;
| n/a &lt;br /&gt;
| Plots can be generated based on hg18 (the default) or hg17 positions&lt;br /&gt;
|-&lt;br /&gt;
| Legend Location &lt;br /&gt;
| legend=”left” &lt;br /&gt;
| This specifies the location of the legend within the plot, the default is auto. Auto tries to select a location that overlaps a minimal number of datapoints. (auto, left, right, none) &lt;br /&gt;
|-&lt;br /&gt;
| SNP Position Rug &lt;br /&gt;
| snpset=”HapMap” metalRug=”Rug SNPs” &lt;br /&gt;
| These options control display of tickmarks indicating SNP positions at the top of the plot. Setting snpset=&amp;quot;HapMap&amp;quot;, snpset=&amp;quot;Illu318&amp;quot; or snpset=&amp;quot;Affy500&amp;quot; display a fixed set of SNPs. (You can also try snpset=&amp;quot;Affy500,Illu318,HapMap&amp;quot; to see all 3). The metalRug option displays a rug which only includes the SNPs that are actually plotted. To remove the rug in batch mode set snpset=NULL. &lt;br /&gt;
|-&lt;br /&gt;
| Number of Rows for Gene Names &lt;br /&gt;
| rfrows=4 &lt;br /&gt;
| LocusZoom will automatically tries to determine the number of display rows to use for genes and gene names so they are not overlapping. This can make each plot prettier, but is not ideal when you want to compare many plots side by side. To ensure a fixed amount of space is used for gene names, use this option to set the maximum number of display rows. If LocusZoom runs out of plotting space and some genes are left out, a warning will be added to the plot.&lt;br /&gt;
|-&lt;br /&gt;
| Point Size  &lt;br /&gt;
| weightCol=”SampleSize” &lt;br /&gt;
| This specifies that the “dot size” of each data points will reflect the square-root of the sample size. The default is to have all dot sizes equal.&lt;br /&gt;
|-&lt;br /&gt;
| LD Measure &lt;br /&gt;
| ldCol=”dprime” (“rsquare”) &lt;br /&gt;
| Colors data points according to the selected LD  measure. The default is &amp;quot;rsquare&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| Reference Population for LD &lt;br /&gt;
| n/a &lt;br /&gt;
| This option allows the user to specify which reference panel is used to obtain LD estimates. The default is CEU from HapMap Phase II but users may select YRI or JPT+CHB from HapMap Phase II, or CEU from 1000 Genomes (August 2009 release).&lt;br /&gt;
|-&lt;br /&gt;
| Highlight Region of Interest &lt;br /&gt;
| hiStart=425Mb hiEnd=425.1Mb &lt;br /&gt;
| A grey box can be used to highlight important regions of the genome – this can reflect where an association signal peaks or a region selected for sequencing, for example.&lt;br /&gt;
|-&lt;br /&gt;
| Theme &lt;br /&gt;
| theme=”publication” &lt;br /&gt;
| We have created a theme that has larger text and is more easily readable for publication.&lt;br /&gt;
|-&lt;br /&gt;
| Show Annotation &lt;br /&gt;
| showAnnot=T showRefsnpAnnot=T annotPch=”21,24,24,25,22,22,8,7” &lt;br /&gt;
| SNP annotation is available for all 1000G SNPs (Aug 2009 release) and can be enabled with the showAnnot=T option. The annotPch command allows you to customize the R plotting symbol used for each kind of SNP; it is okay to use the same symbol for more than one category. The annotation categories, together with their default symbol setting are: Framestop (24, triangle), Splice (24, triangle), NonSynonymous (25, inverted triangle), Synonymous (22, square), UTR (22, square), TFBScons (8, star), MCS44 Placental (7, square with diagonal lines) and None-of-the-above (21, filled circle). For more information about these annotation categories used, please see http://research.nhgri.nih.gov/tools/unisnp/?rm=ohelp&lt;br /&gt;
|-&lt;br /&gt;
| Recombination Rate Overlay &lt;br /&gt;
| showRecomb=T &lt;br /&gt;
| The estimated recombination rate from HapMap samples can be shown on the plot or left off. The data plotted are from Hapmap; http://hapmap.ncbi.nlm.nih.gov/downloads/recombination/2008-03_rel22_B36/rates/&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=789</id>
		<title>METAL Documentation</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=789"/>
		<updated>2010-03-29T02:19:11Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Example: A METAL Meta-Analysis Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== History ==&lt;br /&gt;
&lt;br /&gt;
METAL was developed by Goncalo Abecasis, Yun Li and Cristen Willer. The first version was developed in 2007 and was used for the analyses presented in [http://www.sph.umich.edu/csg/abecasis/publications/18193045.html Sanna et al (2008)] and [http://www.sph.umich.edu/csg/abecasis/publications/18193043.html Willer et al (2008)]. Since then, it has become quite a popular tool for the analysis of genomewide association scans.&lt;br /&gt;
&lt;br /&gt;
== Brief Description ==&lt;br /&gt;
&lt;br /&gt;
METAL is a tool for meta-analysis genomewide association scans. METAL can combine either (a) test statistics and standard errors or (b) p-values across studies (taking sample size and direction of effect into account).  METAL analysis is a convenient alternative to a direct analysis of merged data from multiple studies. It is especially appropriate when data from the individual studies cannot be analyzed together because of differences in ethnicity, phenotype distribution, gender or constraints in sharing of individual level data imposed. Meta-analysis results in little or no loss of efficiency compared to analysis of a combined dataset including data from all individual studies. &lt;br /&gt;
&lt;br /&gt;
== Approach ==&lt;br /&gt;
&lt;br /&gt;
One of the most common questions we receive is about the approach used by METAL to carry out a meta-analysis using p-values as input. The process is actually quite simple! First, for each marker, a reference allele is selected and a z-statistic characterizing the evidence for association is calculated. The z-statistic summarizes the magnitude and the direction of effect relative to the reference allele and all studies are aligned to the same reference allele.  Next, an overall z-statistic and p-value are then calculated from a weighted sum of the individual statistics. Weights are proportional to the square-root of the number of individuals examined in each sample and selected such that the squared weights sum to 1.0. For samples that contain related individuals, a smaller ‘effective’ sample size may be used, but simulations suggest that modest changes in the effective sample size have very little impact on the final p-value.&lt;br /&gt;
&lt;br /&gt;
== Basic Usage Instructions ==&lt;br /&gt;
&lt;br /&gt;
METAL is a command line tool. It is typically run from a Linux, Unix or DOS prompt by invoking the command &amp;lt;code&amp;gt;metal&amp;lt;/code&amp;gt;. Analyses can be run interactively or a simple script can be provided as input. Interactive analyses are usually convenient when learning how to use METAL, whereas the scripting approach is preferred for production use (as it allows analyses to be conveniently repeated).  An example METAL script is included at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
METAL has lots of options and here we have listed some common ones that, hopefully, will help you get started. &lt;br /&gt;
&lt;br /&gt;
=== Help! ===&lt;br /&gt;
&lt;br /&gt;
Issuing the &amp;lt;code&amp;gt;HELP&amp;lt;/code&amp;gt; command lists all available commands and the current settings for each option. The list of all available commands is also available in the [[METAL Command Reference]].&lt;br /&gt;
&lt;br /&gt;
=== Input File Separators ===&lt;br /&gt;
&lt;br /&gt;
METAL expects that each set of results will be summarized in a table. This table must be stored in a text file but otherwise METAL is quite flexible about details such as column separators, column headers and the like. This does mean that an essential bit of information needed before any meta-analysis is a description of each input file.&lt;br /&gt;
&lt;br /&gt;
The first thing you should specify is the column separator. By default, METAL assumes columns are separated by whitespace (which consists of any combination of space and tab characters). You can also specify:&lt;br /&gt;
&lt;br /&gt;
   SEPARATOR  WHITESPACE    - the default&lt;br /&gt;
   SEPARATOR  COMMA         - for comma delimited files that are popular in some platforms&lt;br /&gt;
   SEPARATOR  TAB           - columns separated by a single tab, so that consecutive tabs indicate an empty column&lt;br /&gt;
&lt;br /&gt;
=== Input File Columns ===&lt;br /&gt;
&lt;br /&gt;
Each input file should include the following information:&lt;br /&gt;
&lt;br /&gt;
* A column with marker name, which should be consistent across studies&lt;br /&gt;
* A column indicating the tested allele&lt;br /&gt;
* A column indicating the other allele&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a sample size weighted analysis (based on p-values), you will also need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the direction of effect for the tested allele&lt;br /&gt;
* A column indicating the corresponding p-value&lt;br /&gt;
* An optional column indicating the sample size (if the sample size varies by marker)&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a meta-analysis based on standard errors, you will need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the estimated effect size for each marker&lt;br /&gt;
* A column indicating the standard error of this effect size estimate&lt;br /&gt;
&lt;br /&gt;
The header for each of these columns must be specified so that METAL knows how to interpret the data. As noted below, additional columns including allele frequency information, strand information, and others can also be present.&lt;br /&gt;
&lt;br /&gt;
Here is a typical set of commands that would describe a table where the headers SNP, RefAllele, NonRefAllele, Pvalue and Beta correspond to the MARKER, ALLELE 1 and 2, PVALUE and EFFECT columns:&lt;br /&gt;
&lt;br /&gt;
  MARKERLABEL   SNP&lt;br /&gt;
  ALLELELABELS  RefAllele NonRefAllele&lt;br /&gt;
  PVALUELABEL   P-value&lt;br /&gt;
  EFFECTLABEL   Effect&lt;br /&gt;
&lt;br /&gt;
These can be abbreviated as:&lt;br /&gt;
&lt;br /&gt;
  MARKER        SNP&lt;br /&gt;
  ALLELE        RefAllele NonRefAllele&lt;br /&gt;
  PVALUE        P-value&lt;br /&gt;
  EFFECT        Effect&lt;br /&gt;
&lt;br /&gt;
=== Specifying Weights in P-value Based Analysis ===&lt;br /&gt;
&lt;br /&gt;
The weight for each MARKER can be stored in a column in the table (specified with the &amp;lt;code&amp;gt;WEIGHTLABEL&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;WEIGHT&amp;lt;/code&amp;gt; commands) or the same weight can be used for all markers for that inputfile (in which case the fixed weight can be set with the &amp;lt;code&amp;gt;DEFAULTWEIGHT&amp;lt;/code&amp;gt; command).&lt;br /&gt;
&lt;br /&gt;
=== Reading Each Input File ===&lt;br /&gt;
&lt;br /&gt;
Once all appropriate headers have been specified, issuing the &amp;lt;code&amp;gt;PROCESS&amp;lt;/code&amp;gt; command will read an input file and update summary statistics to take the results it contains into account. Thus:&lt;br /&gt;
&lt;br /&gt;
  PROCESS      study1-results.tbl&lt;br /&gt;
&lt;br /&gt;
=== Performing the Final Analysis ===&lt;br /&gt;
&lt;br /&gt;
Once all input files have been processed, simply issue the &amp;lt;code&amp;gt;ANALYZE&amp;lt;/code&amp;gt; command to execute a meta-analysis. If you&#039;d like to execute interim analysis that include only a subset of the studies, issue the ANALYZE command after the corresponding input files have been processed.&lt;br /&gt;
&lt;br /&gt;
  ANALYZE&lt;br /&gt;
&lt;br /&gt;
To allow for heterogeneity, use the &amp;lt;code&amp;gt;ANALYZE HETEROGENEITY&amp;lt;/code&amp;gt; command. This command will take a little longer to run, because it requires each input file to be examined twice. The METAL heterogeneity analysis requires a second pass of analysis to decide whether observed effect sizes (or test statistics) are homogeneous across samples.  The resulting heterogeneity statistic has n-1 degrees of freedom for n samples.&lt;br /&gt;
&lt;br /&gt;
  ANALYZE HETEROGENEITY&lt;br /&gt;
&lt;br /&gt;
METAL does not require that all input files report a result for every marker.  Any available data is used.  To restrict the output to only markers that have at least a specific number of individuals analysed (or weight), use a command like the following:&lt;br /&gt;
&lt;br /&gt;
  MINWEIGHT 10000&lt;br /&gt;
&lt;br /&gt;
For example to restrict the output to show only Markers with a total sample size of at least 10,000 individuals.&lt;br /&gt;
&lt;br /&gt;
== Additional Analysis Options ==&lt;br /&gt;
&lt;br /&gt;
=== Selecting an Analysis Scheme ===&lt;br /&gt;
&lt;br /&gt;
  SCHEME SAMPLESIZE        - default approach, uses p-value and direction of effect, weighted according to sample size&lt;br /&gt;
  SCHEME STDERR            - classical approach, uses effect size estimates and standard errors&lt;br /&gt;
&lt;br /&gt;
By default, METAL combines p-values across studies taking into account a study specific weight (typically, the sample size) and direction of effect. This behavior can be requested explicitly with the &amp;lt;code&amp;gt;SCHEME SAMPLESIZE&amp;lt;/code&amp;gt; command. An alternative can be requested with the &amp;lt;code&amp;gt;SCHEME STDERR&amp;lt;/code&amp;gt; command and weights effect size estimates using the inverse of the corresponding standard errors. While standard error based weights are more common in the biostatistical literature, if you decide to use this approach, it is very important to ensure that effect size estimates (&#039;&#039;beta&#039;&#039; coefficients) and standard errors use the same units in all studies (i.e. make sure that the exact same trait was examined in each study and that the same transformations were applied). Inconsistent use of measurement units across studies is the most common cause of discrepancies between these two analysis strategies. &lt;br /&gt;
&lt;br /&gt;
=== Genomic Control Correction ===&lt;br /&gt;
&lt;br /&gt;
   GENOMICCONTROL OFF      - the default, no adjustment to test statistics&lt;br /&gt;
   GENOMICCONTROL ON       - automatically correct test statistics to account for small amounts of population stratification or unaccounted for relatedness&lt;br /&gt;
   GENOMICCONTROL [value]  - correct test statistics using the specified inflation factor&lt;br /&gt;
&lt;br /&gt;
METAL has the ability to apply a genomic control correction to all input files.  METAL will estimate the inflation of the test statistic by comparing the median test statistic to that expected by chance, and then apply the genomic control correction to the p-values (for SAMPLESIZE weighted meta-analysis) or the standard error (for STDERR weighted meta-analysis).  This should only be applied to files with whole genome data (i.e. should not be used for settings where results are only available for a candidate locus or a small number of SNPs selected for follow-up of GWAS results). Genomic control settings can be customized for each input file.  We recommend applying genomic control correction to all input files that include genomewide data and, in addition, to the meta-analysis results. To apply genomic control to the meta-analysis results, just perform an initial meta-analysis and then load the initial set of results into METAL to get final, genomic control adjusted results.&lt;br /&gt;
&lt;br /&gt;
=== Strand Information ===&lt;br /&gt;
&lt;br /&gt;
   USESTRAND   ON&lt;br /&gt;
   STRANDLABEL StrandColumnHeading&lt;br /&gt;
&lt;br /&gt;
Input files can contain a column that indicates which strand the alleles are coded on (given as +/-).  If this column is present, you should issue the &amp;lt;code&amp;gt;USESTRAND ON&amp;lt;/code&amp;gt; command and specify an appropriate header with the &amp;lt;code&amp;gt;STRANDLABEL&amp;lt;/code&amp;gt; command.  If USESTRAND is off, the strand is assumed to be “+” for all SNPs, although obvious strand problems are identified by METAL and appropriately handled (for example, when one study provides A/G alleles and a different study provides C/T alleles).&lt;br /&gt;
&lt;br /&gt;
=== Filtering ===&lt;br /&gt;
&lt;br /&gt;
Custom filters can be used to select SNPs for inclusion in the meta-analysis.  This can be used, for example, to select SNPs within a specified minor-allele frequency range for analysis. &lt;br /&gt;
&lt;br /&gt;
Here are some possible filters:&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER N &amp;gt; 1000&lt;br /&gt;
   ADDFILTER MAF &amp;gt; 0.01&lt;br /&gt;
&lt;br /&gt;
Together, these two filters would only consider entries where the value in the N column is greater than 1000 and the value in the MAF column is also greater than 0.01.&lt;br /&gt;
&lt;br /&gt;
Filters can be defined using the &amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;=, =, != and IN operators. The IS operator tests membership in a set. For example to restrict analysis to three interesting SNPs, use:&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER MARKER_ID IN (rs1234,rs123456,rs123)&lt;br /&gt;
&lt;br /&gt;
To remove all previously defined filters, use the command:&lt;br /&gt;
&lt;br /&gt;
   REMOVEFILTERS&lt;br /&gt;
&lt;br /&gt;
=== Verbose Mode ===&lt;br /&gt;
&lt;br /&gt;
   VERBOSE ON&lt;br /&gt;
&lt;br /&gt;
METAL allows for complete output of individual summary statistics for all SNPs in all input files.  This can create a very large file and should be used with caution.  Typically, one should create custom filters  to restrict analyses to interesting SNPs of interest before using this option.  This option can be useful for comparing direction of effect across many studies since METAL takes care of all the strand flipping and provides the direction of effect relative to the same allele.  This is also a way to double-check that the expected data are being used appropriately by METAL.&lt;br /&gt;
&lt;br /&gt;
=== Lenient Mode ===&lt;br /&gt;
 &lt;br /&gt;
    COLUMNCOUNTING STRICT         - requires expected number of columns in every row&lt;br /&gt;
    COLUMNCOUNTING LENIENT        - tries to interpret rows with fewer columns than expected&lt;br /&gt;
&lt;br /&gt;
By default, METAL will skip lines in each input file that don&#039;t have the expected number of columns. This is usually a good idea because it avoids producing incorrect results when a column is missing. Sometimes (for example, when there are optional extra columns at the end of each line), the &amp;lt;code&amp;gt;COLUMNCOUNTING LENIENT&amp;lt;/code&amp;gt; option can be useful.&lt;br /&gt;
&lt;br /&gt;
=== Tracking Allele Frequencies ===&lt;br /&gt;
&lt;br /&gt;
   AVERAGEFREQ ON&lt;br /&gt;
   MINMAXFREQ ON&lt;br /&gt;
&lt;br /&gt;
METAL can optionally track the effect allele frequency across all files and report the mean, minimum and maximum effect allele frequency.  These can be quite useful to check that allele frequencies are similar across different cohorts after METAL performs all strand alignment. Large differences in allele frequencies across studies can suggest inconsistent naming of reference alleles across studies. METAL requires all input files to have an allele frequency column when this feature is turned on. To specify the column header for allele frequency information, use the &amp;lt;code&amp;gt;FREQLABEL&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Custom Variables ===&lt;br /&gt;
&lt;br /&gt;
We allow users to keep cumulative counts of custom variables across input files.  An example of this might be to keep track of the sample size when performing standard-error weighted meta-analysis.  The name of the custom variable should be defined once, before input files are loaded.  The corresponding column label in each input file can be specified using the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command. For example, to create a custom variable labeled TotalSampleSize that tallies the total of the N column across files, one could issue the commands:&lt;br /&gt;
&lt;br /&gt;
  CUSTOMVARIABLE TotalSampleSize&lt;br /&gt;
  LABEL TotalSampleSize as N&lt;br /&gt;
&lt;br /&gt;
If needed, the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command can be used multiple times to customize column headers for each input file.&lt;br /&gt;
&lt;br /&gt;
=== Input File Recommendations ===&lt;br /&gt;
&lt;br /&gt;
We strongly recommend that both allele labels, corresponding to the the effect allele and non-effect allele, should be provided for all SNPs.  As long as both allele columns are given for each input file, METAL appropriately accounts for situations when different input files use different reference alleles. Alleles can be coded numerically (A=1,C=2,G=3,T=4) or alphabetically (A,C,G,T,a,c,g,t) and can be on either strand if not an A/T or C/G SNP.  For A/T or C/G SNPs, METAL requires SNPs to be on a consistent strand in different input files for the results to be interpretable.  For other SNPs, METAL can automatically identify and resolve strand inconsistencies. &lt;br /&gt;
&lt;br /&gt;
P-values that are &amp;amp;lt; 0.0, &amp;amp;gt; 1.0 or non-numeric will be treated as missing and generate a warning.  &lt;br /&gt;
&lt;br /&gt;
The EFFECT column can have positive and negative values (beta values from regression, for example), or simply directions of effect relative to the reference allele, listed as “+” and “-“.  An EFFECT of “+” (or any positive number) with respect to the reference allele A (or effect allele A), for example, represents a case where increasing number of copies of allele A are correlated with increasing trait values. For discrete traits, it is common to report odds ratios, which are always positive. In this case, to calculate the direction of effect, one should look at the log of the odds ratio. METAL can compute the odds ratio for you if you specify &amp;lt;code&amp;gt;EFFECT log(ODDS_RATIO_COLUMN)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To perform odds-ratio based meta-analysis, select SCHEME STDERR at the beginning of the script.  Then, for each file, provide the natural log of the odds ratio as the EFFECT column or another appropriate statistic (such as the corresponding regression coefficient from a logistic regression analysis).&lt;br /&gt;
&lt;br /&gt;
== Example: A METAL Meta-Analysis Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#THIS SCRIPT EXECUTES AN ANALYSIS OF EIGHT STUDIES&lt;br /&gt;
#THE RESULTS FOR EACH STUDY ARE STORED IN FILES Inputfile1.txt THROUGH Inputfile8.txt&lt;br /&gt;
&lt;br /&gt;
#LOAD THE FIRST EIGHT INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# UNCOMMENT THE NEXT LINE TO ENABLE GenomicControl CORRECTION&lt;br /&gt;
# GENOMICCONTROL ON&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIRST INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE REF_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile1.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SECOND INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile2.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE THIRD INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE A_REF OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE pvalue &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile3.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FOURTH INPUT FILE ===&lt;br /&gt;
MARKER MARKERNAME&lt;br /&gt;
ALLELE EFFECTALLELE NON_EFFECT_ALLELE&lt;br /&gt;
EFFECT EFFECT1&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT NONMISS&lt;br /&gt;
PROCESS inputfile4.txt &lt;br /&gt;
&lt;br /&gt;
# === CARRY OUT AN INTERIM ANALYSIS OF THE FIRST FOUR FILES ===&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1to4_ .tbl&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
# LOAD THE NEXT FOUR INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIFTH INPUT FILE ===&lt;br /&gt;
MARKER rsid&lt;br /&gt;
ALLELE EFFECT_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE Add_p&lt;br /&gt;
WEIGHT total_N&lt;br /&gt;
SEPARATOR COMMAS&lt;br /&gt;
PROCESS inputfile5.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SIXTH INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile6.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE SEVENTH INPUT FILE ===&lt;br /&gt;
ALLELE ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT N&lt;br /&gt;
SEPARATOR WHITESPACE&lt;br /&gt;
PROCESS inputfile7.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE EIGHTH INPUT FILE ===&lt;br /&gt;
ALLELE BETA_ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE P_VAL&lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile8.txt &lt;br /&gt;
&lt;br /&gt;
#for the final meta-analysis of all 8 samples only output results if the&lt;br /&gt;
#combined weight is greater than 10000 people&lt;br /&gt;
&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1-8_ .tbl&lt;br /&gt;
MINWEIGHT 10000&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
QUIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=788</id>
		<title>METAL Documentation</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=788"/>
		<updated>2010-03-29T02:17:31Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Tracking Allele Frequencies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== History ==&lt;br /&gt;
&lt;br /&gt;
METAL was developed by Goncalo Abecasis, Yun Li and Cristen Willer. The first version was developed in 2007 and was used for the analyses presented in [http://www.sph.umich.edu/csg/abecasis/publications/18193045.html Sanna et al (2008)] and [http://www.sph.umich.edu/csg/abecasis/publications/18193043.html Willer et al (2008)]. Since then, it has become quite a popular tool for the analysis of genomewide association scans.&lt;br /&gt;
&lt;br /&gt;
== Brief Description ==&lt;br /&gt;
&lt;br /&gt;
METAL is a tool for meta-analysis genomewide association scans. METAL can combine either (a) test statistics and standard errors or (b) p-values across studies (taking sample size and direction of effect into account).  METAL analysis is a convenient alternative to a direct analysis of merged data from multiple studies. It is especially appropriate when data from the individual studies cannot be analyzed together because of differences in ethnicity, phenotype distribution, gender or constraints in sharing of individual level data imposed. Meta-analysis results in little or no loss of efficiency compared to analysis of a combined dataset including data from all individual studies. &lt;br /&gt;
&lt;br /&gt;
== Approach ==&lt;br /&gt;
&lt;br /&gt;
One of the most common questions we receive is about the approach used by METAL to carry out a meta-analysis using p-values as input. The process is actually quite simple! First, for each marker, a reference allele is selected and a z-statistic characterizing the evidence for association is calculated. The z-statistic summarizes the magnitude and the direction of effect relative to the reference allele and all studies are aligned to the same reference allele.  Next, an overall z-statistic and p-value are then calculated from a weighted sum of the individual statistics. Weights are proportional to the square-root of the number of individuals examined in each sample and selected such that the squared weights sum to 1.0. For samples that contain related individuals, a smaller ‘effective’ sample size may be used, but simulations suggest that modest changes in the effective sample size have very little impact on the final p-value.&lt;br /&gt;
&lt;br /&gt;
== Basic Usage Instructions ==&lt;br /&gt;
&lt;br /&gt;
METAL is a command line tool. It is typically run from a Linux, Unix or DOS prompt by invoking the command &amp;lt;code&amp;gt;metal&amp;lt;/code&amp;gt;. Analyses can be run interactively or a simple script can be provided as input. Interactive analyses are usually convenient when learning how to use METAL, whereas the scripting approach is preferred for production use (as it allows analyses to be conveniently repeated).  An example METAL script is included at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
METAL has lots of options and here we have listed some common ones that, hopefully, will help you get started. &lt;br /&gt;
&lt;br /&gt;
=== Help! ===&lt;br /&gt;
&lt;br /&gt;
Issuing the &amp;lt;code&amp;gt;HELP&amp;lt;/code&amp;gt; command lists all available commands and the current settings for each option. The list of all available commands is also available in the [[METAL Command Reference]].&lt;br /&gt;
&lt;br /&gt;
=== Input File Separators ===&lt;br /&gt;
&lt;br /&gt;
METAL expects that each set of results will be summarized in a table. This table must be stored in a text file but otherwise METAL is quite flexible about details such as column separators, column headers and the like. This does mean that an essential bit of information needed before any meta-analysis is a description of each input file.&lt;br /&gt;
&lt;br /&gt;
The first thing you should specify is the column separator. By default, METAL assumes columns are separated by whitespace (which consists of any combination of space and tab characters). You can also specify:&lt;br /&gt;
&lt;br /&gt;
   SEPARATOR  WHITESPACE    - the default&lt;br /&gt;
   SEPARATOR  COMMA         - for comma delimited files that are popular in some platforms&lt;br /&gt;
   SEPARATOR  TAB           - columns separated by a single tab, so that consecutive tabs indicate an empty column&lt;br /&gt;
&lt;br /&gt;
=== Input File Columns ===&lt;br /&gt;
&lt;br /&gt;
Each input file should include the following information:&lt;br /&gt;
&lt;br /&gt;
* A column with marker name, which should be consistent across studies&lt;br /&gt;
* A column indicating the tested allele&lt;br /&gt;
* A column indicating the other allele&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a sample size weighted analysis (based on p-values), you will also need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the direction of effect for the tested allele&lt;br /&gt;
* A column indicating the corresponding p-value&lt;br /&gt;
* An optional column indicating the sample size (if the sample size varies by marker)&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a meta-analysis based on standard errors, you will need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the estimated effect size for each marker&lt;br /&gt;
* A column indicating the standard error of this effect size estimate&lt;br /&gt;
&lt;br /&gt;
The header for each of these columns must be specified so that METAL knows how to interpret the data. As noted below, additional columns including allele frequency information, strand information, and others can also be present.&lt;br /&gt;
&lt;br /&gt;
Here is a typical set of commands that would describe a table where the headers SNP, RefAllele, NonRefAllele, Pvalue and Beta correspond to the MARKER, ALLELE 1 and 2, PVALUE and EFFECT columns:&lt;br /&gt;
&lt;br /&gt;
  MARKERLABEL   SNP&lt;br /&gt;
  ALLELELABELS  RefAllele NonRefAllele&lt;br /&gt;
  PVALUELABEL   P-value&lt;br /&gt;
  EFFECTLABEL   Effect&lt;br /&gt;
&lt;br /&gt;
These can be abbreviated as:&lt;br /&gt;
&lt;br /&gt;
  MARKER        SNP&lt;br /&gt;
  ALLELE        RefAllele NonRefAllele&lt;br /&gt;
  PVALUE        P-value&lt;br /&gt;
  EFFECT        Effect&lt;br /&gt;
&lt;br /&gt;
=== Specifying Weights in P-value Based Analysis ===&lt;br /&gt;
&lt;br /&gt;
The weight for each MARKER can be stored in a column in the table (specified with the &amp;lt;code&amp;gt;WEIGHTLABEL&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;WEIGHT&amp;lt;/code&amp;gt; commands) or the same weight can be used for all markers for that inputfile (in which case the fixed weight can be set with the &amp;lt;code&amp;gt;DEFAULTWEIGHT&amp;lt;/code&amp;gt; command).&lt;br /&gt;
&lt;br /&gt;
=== Reading Each Input File ===&lt;br /&gt;
&lt;br /&gt;
Once all appropriate headers have been specified, issuing the &amp;lt;code&amp;gt;PROCESS&amp;lt;/code&amp;gt; command will read an input file and update summary statistics to take the results it contains into account. Thus:&lt;br /&gt;
&lt;br /&gt;
  PROCESS      study1-results.tbl&lt;br /&gt;
&lt;br /&gt;
=== Performing the Final Analysis ===&lt;br /&gt;
&lt;br /&gt;
Once all input files have been processed, simply issue the &amp;lt;code&amp;gt;ANALYZE&amp;lt;/code&amp;gt; command to execute a meta-analysis. If you&#039;d like to execute interim analysis that include only a subset of the studies, issue the ANALYZE command after the corresponding input files have been processed.&lt;br /&gt;
&lt;br /&gt;
  ANALYZE&lt;br /&gt;
&lt;br /&gt;
To allow for heterogeneity, use the &amp;lt;code&amp;gt;ANALYZE HETEROGENEITY&amp;lt;/code&amp;gt; command. This command will take a little longer to run, because it requires each input file to be examined twice. The METAL heterogeneity analysis requires a second pass of analysis to decide whether observed effect sizes (or test statistics) are homogeneous across samples.  The resulting heterogeneity statistic has n-1 degrees of freedom for n samples.&lt;br /&gt;
&lt;br /&gt;
  ANALYZE HETEROGENEITY&lt;br /&gt;
&lt;br /&gt;
METAL does not require that all input files report a result for every marker.  Any available data is used.  To restrict the output to only markers that have at least a specific number of individuals analysed (or weight), use a command like the following:&lt;br /&gt;
&lt;br /&gt;
  MINWEIGHT 10000&lt;br /&gt;
&lt;br /&gt;
For example to restrict the output to show only Markers with a total sample size of at least 10,000 individuals.&lt;br /&gt;
&lt;br /&gt;
== Additional Analysis Options ==&lt;br /&gt;
&lt;br /&gt;
=== Selecting an Analysis Scheme ===&lt;br /&gt;
&lt;br /&gt;
  SCHEME SAMPLESIZE        - default approach, uses p-value and direction of effect, weighted according to sample size&lt;br /&gt;
  SCHEME STDERR            - classical approach, uses effect size estimates and standard errors&lt;br /&gt;
&lt;br /&gt;
By default, METAL combines p-values across studies taking into account a study specific weight (typically, the sample size) and direction of effect. This behavior can be requested explicitly with the &amp;lt;code&amp;gt;SCHEME SAMPLESIZE&amp;lt;/code&amp;gt; command. An alternative can be requested with the &amp;lt;code&amp;gt;SCHEME STDERR&amp;lt;/code&amp;gt; command and weights effect size estimates using the inverse of the corresponding standard errors. While standard error based weights are more common in the biostatistical literature, if you decide to use this approach, it is very important to ensure that effect size estimates (&#039;&#039;beta&#039;&#039; coefficients) and standard errors use the same units in all studies (i.e. make sure that the exact same trait was examined in each study and that the same transformations were applied). Inconsistent use of measurement units across studies is the most common cause of discrepancies between these two analysis strategies. &lt;br /&gt;
&lt;br /&gt;
=== Genomic Control Correction ===&lt;br /&gt;
&lt;br /&gt;
   GENOMICCONTROL OFF      - the default, no adjustment to test statistics&lt;br /&gt;
   GENOMICCONTROL ON       - automatically correct test statistics to account for small amounts of population stratification or unaccounted for relatedness&lt;br /&gt;
   GENOMICCONTROL [value]  - correct test statistics using the specified inflation factor&lt;br /&gt;
&lt;br /&gt;
METAL has the ability to apply a genomic control correction to all input files.  METAL will estimate the inflation of the test statistic by comparing the median test statistic to that expected by chance, and then apply the genomic control correction to the p-values (for SAMPLESIZE weighted meta-analysis) or the standard error (for STDERR weighted meta-analysis).  This should only be applied to files with whole genome data (i.e. should not be used for settings where results are only available for a candidate locus or a small number of SNPs selected for follow-up of GWAS results). Genomic control settings can be customized for each input file.  We recommend applying genomic control correction to all input files that include genomewide data and, in addition, to the meta-analysis results. To apply genomic control to the meta-analysis results, just perform an initial meta-analysis and then load the initial set of results into METAL to get final, genomic control adjusted results.&lt;br /&gt;
&lt;br /&gt;
=== Strand Information ===&lt;br /&gt;
&lt;br /&gt;
   USESTRAND   ON&lt;br /&gt;
   STRANDLABEL StrandColumnHeading&lt;br /&gt;
&lt;br /&gt;
Input files can contain a column that indicates which strand the alleles are coded on (given as +/-).  If this column is present, you should issue the &amp;lt;code&amp;gt;USESTRAND ON&amp;lt;/code&amp;gt; command and specify an appropriate header with the &amp;lt;code&amp;gt;STRANDLABEL&amp;lt;/code&amp;gt; command.  If USESTRAND is off, the strand is assumed to be “+” for all SNPs, although obvious strand problems are identified by METAL and appropriately handled (for example, when one study provides A/G alleles and a different study provides C/T alleles).&lt;br /&gt;
&lt;br /&gt;
=== Filtering ===&lt;br /&gt;
&lt;br /&gt;
Custom filters can be used to select SNPs for inclusion in the meta-analysis.  This can be used, for example, to select SNPs within a specified minor-allele frequency range for analysis. &lt;br /&gt;
&lt;br /&gt;
Here are some possible filters:&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER N &amp;gt; 1000&lt;br /&gt;
   ADDFILTER MAF &amp;gt; 0.01&lt;br /&gt;
&lt;br /&gt;
Together, these two filters would only consider entries where the value in the N column is greater than 1000 and the value in the MAF column is also greater than 0.01.&lt;br /&gt;
&lt;br /&gt;
Filters can be defined using the &amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;=, =, != and IN operators. The IS operator tests membership in a set. For example to restrict analysis to three interesting SNPs, use:&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER MARKER_ID IN (rs1234,rs123456,rs123)&lt;br /&gt;
&lt;br /&gt;
To remove all previously defined filters, use the command:&lt;br /&gt;
&lt;br /&gt;
   REMOVEFILTERS&lt;br /&gt;
&lt;br /&gt;
=== Verbose Mode ===&lt;br /&gt;
&lt;br /&gt;
   VERBOSE ON&lt;br /&gt;
&lt;br /&gt;
METAL allows for complete output of individual summary statistics for all SNPs in all input files.  This can create a very large file and should be used with caution.  Typically, one should create custom filters  to restrict analyses to interesting SNPs of interest before using this option.  This option can be useful for comparing direction of effect across many studies since METAL takes care of all the strand flipping and provides the direction of effect relative to the same allele.  This is also a way to double-check that the expected data are being used appropriately by METAL.&lt;br /&gt;
&lt;br /&gt;
=== Lenient Mode ===&lt;br /&gt;
 &lt;br /&gt;
    COLUMNCOUNTING STRICT         - requires expected number of columns in every row&lt;br /&gt;
    COLUMNCOUNTING LENIENT        - tries to interpret rows with fewer columns than expected&lt;br /&gt;
&lt;br /&gt;
By default, METAL will skip lines in each input file that don&#039;t have the expected number of columns. This is usually a good idea because it avoids producing incorrect results when a column is missing. Sometimes (for example, when there are optional extra columns at the end of each line), the &amp;lt;code&amp;gt;COLUMNCOUNTING LENIENT&amp;lt;/code&amp;gt; option can be useful.&lt;br /&gt;
&lt;br /&gt;
=== Tracking Allele Frequencies ===&lt;br /&gt;
&lt;br /&gt;
   AVERAGEFREQ ON&lt;br /&gt;
   MINMAXFREQ ON&lt;br /&gt;
&lt;br /&gt;
METAL can optionally track the effect allele frequency across all files and report the mean, minimum and maximum effect allele frequency.  These can be quite useful to check that allele frequencies are similar across different cohorts after METAL performs all strand alignment. Large differences in allele frequencies across studies can suggest inconsistent naming of reference alleles across studies. METAL requires all input files to have an allele frequency column when this feature is turned on. To specify the column header for allele frequency information, use the &amp;lt;code&amp;gt;FREQLABEL&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Custom Variables ===&lt;br /&gt;
&lt;br /&gt;
We allow users to keep cumulative counts of custom variables across input files.  An example of this might be to keep track of the sample size when performing standard-error weighted meta-analysis.  The name of the custom variable should be defined once, before input files are loaded.  The corresponding column label in each input file can be specified using the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command. For example, to create a custom variable labeled TotalSampleSize that tallies the total of the N column across files, one could issue the commands:&lt;br /&gt;
&lt;br /&gt;
  CUSTOMVARIABLE TotalSampleSize&lt;br /&gt;
  LABEL TotalSampleSize as N&lt;br /&gt;
&lt;br /&gt;
If needed, the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command can be used multiple times to customize column headers for each input file.&lt;br /&gt;
&lt;br /&gt;
=== Input File Recommendations ===&lt;br /&gt;
&lt;br /&gt;
We strongly recommend that both allele labels, corresponding to the the effect allele and non-effect allele, should be provided for all SNPs.  As long as both allele columns are given for each input file, METAL appropriately accounts for situations when different input files use different reference alleles. Alleles can be coded numerically (A=1,C=2,G=3,T=4) or alphabetically (A,C,G,T,a,c,g,t) and can be on either strand if not an A/T or C/G SNP.  For A/T or C/G SNPs, METAL requires SNPs to be on a consistent strand in different input files for the results to be interpretable.  For other SNPs, METAL can automatically identify and resolve strand inconsistencies. &lt;br /&gt;
&lt;br /&gt;
P-values that are &amp;amp;lt; 0.0, &amp;amp;gt; 1.0 or non-numeric will be treated as missing and generate a warning.  &lt;br /&gt;
&lt;br /&gt;
The EFFECT column can have positive and negative values (beta values from regression, for example), or simply directions of effect relative to the reference allele, listed as “+” and “-“.  An EFFECT of “+” (or any positive number) with respect to the reference allele A (or effect allele A), for example, represents a case where increasing number of copies of allele A are correlated with increasing trait values. For discrete traits, it is common to report odds ratios, which are always positive. In this case, to calculate the direction of effect, one should look at the log of the odds ratio. METAL can compute the odds ratio for you if you specify &amp;lt;code&amp;gt;EFFECT log(ODDS_RATIO_COLUMN)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To perform odds-ratio based meta-analysis, select SCHEME STDERR at the beginning of the script.  Then, for each file, provide the natural log of the odds ratio as the EFFECT column or another appropriate statistic (such as the corresponding regression coefficient from a logistic regression analysis).&lt;br /&gt;
&lt;br /&gt;
== Example: A METAL Meta-Analysis Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#THIS SCRIPT EXECUTES AN ANALYSIS OF EIGHT STUDIES&lt;br /&gt;
#THE RESULTS FOR EACH STUDY ARE STORED IN FILES Inputfile1.txt THROUGH Inputfile8.txt&lt;br /&gt;
&lt;br /&gt;
#LOAD THE FIRST EIGHT INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# UNCOMMENT THE NEXT LINE TO ENABLE GenomicControl CORRECTION&lt;br /&gt;
# GENOMICCONTROL ON&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIRST INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE REF_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile1.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SECOND INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile2.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE THIRD INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE A_REF OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE pvalue &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile3.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FOURTH INPUT FILE ===&lt;br /&gt;
MARKER MARKERNAME&lt;br /&gt;
ALLELE EFFECTALLELE NON_EFFECT_ALLELE&lt;br /&gt;
EFFECT EFFECT1&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT NONMISS&lt;br /&gt;
PROCESS inputfile4.txt &lt;br /&gt;
&lt;br /&gt;
# === CARRY OUT AN INTERIM ANALYSIS OF THE FIRST FOUR FILES ===&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1to4_ .tbl&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
# LOAD THE NEXT FOUR INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIFTH INPUT FILE ===&lt;br /&gt;
MARKER rsid&lt;br /&gt;
ALLELE EFFECT_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE Add_p&lt;br /&gt;
WEIGHT total_N&lt;br /&gt;
SEPARATOR COMMAS&lt;br /&gt;
PROCESS inputfile5.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SIXTH INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile6.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE SEVENTH INPUT FILE ===&lt;br /&gt;
ALLELE ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT N&lt;br /&gt;
SEPARATOR WHITESPACE&lt;br /&gt;
PROCESS inputfile7.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE NINTH INPUT FILE ===&lt;br /&gt;
ALLELE BETA_ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE P_VAL&lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile8.txt &lt;br /&gt;
&lt;br /&gt;
#for the final meta-analysis of all 8 samples only output results if the&lt;br /&gt;
#combined weight is greater than 10000 people&lt;br /&gt;
&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1-8_ .tbl&lt;br /&gt;
MINWEIGHT 10000&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
QUIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=787</id>
		<title>METAL Documentation</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=787"/>
		<updated>2010-03-29T02:06:50Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Performing the Final Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== History ==&lt;br /&gt;
&lt;br /&gt;
METAL was developed by Goncalo Abecasis, Yun Li and Cristen Willer. The first version was developed in 2007 and was used for the analyses presented in [http://www.sph.umich.edu/csg/abecasis/publications/18193045.html Sanna et al (2008)] and [http://www.sph.umich.edu/csg/abecasis/publications/18193043.html Willer et al (2008)]. Since then, it has become quite a popular tool for the analysis of genomewide association scans.&lt;br /&gt;
&lt;br /&gt;
== Brief Description ==&lt;br /&gt;
&lt;br /&gt;
METAL is a tool for meta-analysis genomewide association scans. METAL can combine either (a) test statistics and standard errors or (b) p-values across studies (taking sample size and direction of effect into account).  METAL analysis is a convenient alternative to a direct analysis of merged data from multiple studies. It is especially appropriate when data from the individual studies cannot be analyzed together because of differences in ethnicity, phenotype distribution, gender or constraints in sharing of individual level data imposed. Meta-analysis results in little or no loss of efficiency compared to analysis of a combined dataset including data from all individual studies. &lt;br /&gt;
&lt;br /&gt;
== Approach ==&lt;br /&gt;
&lt;br /&gt;
One of the most common questions we receive is about the approach used by METAL to carry out a meta-analysis using p-values as input. The process is actually quite simple! First, for each marker, a reference allele is selected and a z-statistic characterizing the evidence for association is calculated. The z-statistic summarizes the magnitude and the direction of effect relative to the reference allele and all studies are aligned to the same reference allele.  Next, an overall z-statistic and p-value are then calculated from a weighted sum of the individual statistics. Weights are proportional to the square-root of the number of individuals examined in each sample and selected such that the squared weights sum to 1.0. For samples that contain related individuals, a smaller ‘effective’ sample size may be used, but simulations suggest that modest changes in the effective sample size have very little impact on the final p-value.&lt;br /&gt;
&lt;br /&gt;
== Basic Usage Instructions ==&lt;br /&gt;
&lt;br /&gt;
METAL is a command line tool. It is typically run from a Linux, Unix or DOS prompt by invoking the command &amp;lt;code&amp;gt;metal&amp;lt;/code&amp;gt;. Analyses can be run interactively or a simple script can be provided as input. Interactive analyses are usually convenient when learning how to use METAL, whereas the scripting approach is preferred for production use (as it allows analyses to be conveniently repeated).  An example METAL script is included at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
METAL has lots of options and here we have listed some common ones that, hopefully, will help you get started. &lt;br /&gt;
&lt;br /&gt;
=== Help! ===&lt;br /&gt;
&lt;br /&gt;
Issuing the &amp;lt;code&amp;gt;HELP&amp;lt;/code&amp;gt; command lists all available commands and the current settings for each option. The list of all available commands is also available in the [[METAL Command Reference]].&lt;br /&gt;
&lt;br /&gt;
=== Input File Separators ===&lt;br /&gt;
&lt;br /&gt;
METAL expects that each set of results will be summarized in a table. This table must be stored in a text file but otherwise METAL is quite flexible about details such as column separators, column headers and the like. This does mean that an essential bit of information needed before any meta-analysis is a description of each input file.&lt;br /&gt;
&lt;br /&gt;
The first thing you should specify is the column separator. By default, METAL assumes columns are separated by whitespace (which consists of any combination of space and tab characters). You can also specify:&lt;br /&gt;
&lt;br /&gt;
   SEPARATOR  WHITESPACE    - the default&lt;br /&gt;
   SEPARATOR  COMMA         - for comma delimited files that are popular in some platforms&lt;br /&gt;
   SEPARATOR  TAB           - columns separated by a single tab, so that consecutive tabs indicate an empty column&lt;br /&gt;
&lt;br /&gt;
=== Input File Columns ===&lt;br /&gt;
&lt;br /&gt;
Each input file should include the following information:&lt;br /&gt;
&lt;br /&gt;
* A column with marker name, which should be consistent across studies&lt;br /&gt;
* A column indicating the tested allele&lt;br /&gt;
* A column indicating the other allele&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a sample size weighted analysis (based on p-values), you will also need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the direction of effect for the tested allele&lt;br /&gt;
* A column indicating the corresponding p-value&lt;br /&gt;
* An optional column indicating the sample size (if the sample size varies by marker)&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a meta-analysis based on standard errors, you will need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the estimated effect size for each marker&lt;br /&gt;
* A column indicating the standard error of this effect size estimate&lt;br /&gt;
&lt;br /&gt;
The header for each of these columns must be specified so that METAL knows how to interpret the data. As noted below, additional columns including allele frequency information, strand information, and others can also be present.&lt;br /&gt;
&lt;br /&gt;
Here is a typical set of commands that would describe a table where the headers SNP, RefAllele, NonRefAllele, Pvalue and Beta correspond to the MARKER, ALLELE 1 and 2, PVALUE and EFFECT columns:&lt;br /&gt;
&lt;br /&gt;
  MARKERLABEL   SNP&lt;br /&gt;
  ALLELELABELS  RefAllele NonRefAllele&lt;br /&gt;
  PVALUELABEL   P-value&lt;br /&gt;
  EFFECTLABEL   Effect&lt;br /&gt;
&lt;br /&gt;
These can be abbreviated as:&lt;br /&gt;
&lt;br /&gt;
  MARKER        SNP&lt;br /&gt;
  ALLELE        RefAllele NonRefAllele&lt;br /&gt;
  PVALUE        P-value&lt;br /&gt;
  EFFECT        Effect&lt;br /&gt;
&lt;br /&gt;
=== Specifying Weights in P-value Based Analysis ===&lt;br /&gt;
&lt;br /&gt;
The weight for each MARKER can be stored in a column in the table (specified with the &amp;lt;code&amp;gt;WEIGHTLABEL&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;WEIGHT&amp;lt;/code&amp;gt; commands) or the same weight can be used for all markers for that inputfile (in which case the fixed weight can be set with the &amp;lt;code&amp;gt;DEFAULTWEIGHT&amp;lt;/code&amp;gt; command).&lt;br /&gt;
&lt;br /&gt;
=== Reading Each Input File ===&lt;br /&gt;
&lt;br /&gt;
Once all appropriate headers have been specified, issuing the &amp;lt;code&amp;gt;PROCESS&amp;lt;/code&amp;gt; command will read an input file and update summary statistics to take the results it contains into account. Thus:&lt;br /&gt;
&lt;br /&gt;
  PROCESS      study1-results.tbl&lt;br /&gt;
&lt;br /&gt;
=== Performing the Final Analysis ===&lt;br /&gt;
&lt;br /&gt;
Once all input files have been processed, simply issue the &amp;lt;code&amp;gt;ANALYZE&amp;lt;/code&amp;gt; command to execute a meta-analysis. If you&#039;d like to execute interim analysis that include only a subset of the studies, issue the ANALYZE command after the corresponding input files have been processed.&lt;br /&gt;
&lt;br /&gt;
  ANALYZE&lt;br /&gt;
&lt;br /&gt;
To allow for heterogeneity, use the &amp;lt;code&amp;gt;ANALYZE HETEROGENEITY&amp;lt;/code&amp;gt; command. This command will take a little longer to run, because it requires each input file to be examined twice. The METAL heterogeneity analysis requires a second pass of analysis to decide whether observed effect sizes (or test statistics) are homogeneous across samples.  The resulting heterogeneity statistic has n-1 degrees of freedom for n samples.&lt;br /&gt;
&lt;br /&gt;
  ANALYZE HETEROGENEITY&lt;br /&gt;
&lt;br /&gt;
METAL does not require that all input files report a result for every marker.  Any available data is used.  To restrict the output to only markers that have at least a specific number of individuals analysed (or weight), use a command like the following:&lt;br /&gt;
&lt;br /&gt;
  MINWEIGHT 10000&lt;br /&gt;
&lt;br /&gt;
For example to restrict the output to show only Markers with a total sample size of at least 10,000 individuals.&lt;br /&gt;
&lt;br /&gt;
== Additional Analysis Options ==&lt;br /&gt;
&lt;br /&gt;
=== Selecting an Analysis Scheme ===&lt;br /&gt;
&lt;br /&gt;
  SCHEME SAMPLESIZE        - default approach, uses p-value and direction of effect, weighted according to sample size&lt;br /&gt;
  SCHEME STDERR            - classical approach, uses effect size estimates and standard errors&lt;br /&gt;
&lt;br /&gt;
By default, METAL combines p-values across studies taking into account a study specific weight (typically, the sample size) and direction of effect. This behavior can be requested explicitly with the &amp;lt;code&amp;gt;SCHEME SAMPLESIZE&amp;lt;/code&amp;gt; command. An alternative can be requested with the &amp;lt;code&amp;gt;SCHEME STDERR&amp;lt;/code&amp;gt; command and weights effect size estimates using the inverse of the corresponding standard errors. While standard error based weights are more common in the biostatistical literature, if you decide to use this approach, it is very important to ensure that effect size estimates (&#039;&#039;beta&#039;&#039; coefficients) and standard errors use the same units in all studies (i.e. make sure that the exact same trait was examined in each study and that the same transformations were applied). Inconsistent use of measurement units across studies is the most common cause of discrepancies between these two analysis strategies. &lt;br /&gt;
&lt;br /&gt;
=== Genomic Control Correction ===&lt;br /&gt;
&lt;br /&gt;
   GENOMICCONTROL OFF      - the default, no adjustment to test statistics&lt;br /&gt;
   GENOMICCONTROL ON       - automatically correct test statistics to account for small amounts of population stratification or unaccounted for relatedness&lt;br /&gt;
   GENOMICCONTROL [value]  - correct test statistics using the specified inflation factor&lt;br /&gt;
&lt;br /&gt;
METAL has the ability to apply a genomic control correction to all input files.  METAL will estimate the inflation of the test statistic by comparing the median test statistic to that expected by chance, and then apply the genomic control correction to the p-values (for SAMPLESIZE weighted meta-analysis) or the standard error (for STDERR weighted meta-analysis).  This should only be applied to files with whole genome data (i.e. should not be used for settings where results are only available for a candidate locus or a small number of SNPs selected for follow-up of GWAS results). Genomic control settings can be customized for each input file.  We recommend applying genomic control correction to all input files that include genomewide data and, in addition, to the meta-analysis results. To apply genomic control to the meta-analysis results, just perform an initial meta-analysis and then load the initial set of results into METAL to get final, genomic control adjusted results.&lt;br /&gt;
&lt;br /&gt;
=== Strand Information ===&lt;br /&gt;
&lt;br /&gt;
   USESTRAND   ON&lt;br /&gt;
   STRANDLABEL StrandColumnHeading&lt;br /&gt;
&lt;br /&gt;
Input files can contain a column that indicates which strand the alleles are coded on (given as +/-).  If this column is present, you should issue the &amp;lt;code&amp;gt;USESTRAND ON&amp;lt;/code&amp;gt; command and specify an appropriate header with the &amp;lt;code&amp;gt;STRANDLABEL&amp;lt;/code&amp;gt; command.  If USESTRAND is off, the strand is assumed to be “+” for all SNPs, although obvious strand problems are identified by METAL and appropriately handled (for example, when one study provides A/G alleles and a different study provides C/T alleles).&lt;br /&gt;
&lt;br /&gt;
=== Filtering ===&lt;br /&gt;
&lt;br /&gt;
Custom filters can be used to select SNPs for inclusion in the meta-analysis.  This can be used, for example, to select SNPs within a specified minor-allele frequency range for analysis. &lt;br /&gt;
&lt;br /&gt;
Here are some possible filters:&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER N &amp;gt; 1000&lt;br /&gt;
   ADDFILTER MAF &amp;gt; 0.01&lt;br /&gt;
&lt;br /&gt;
Together, these two filters would only consider entries where the value in the N column is greater than 1000 and the value in the MAF column is also greater than 0.01.&lt;br /&gt;
&lt;br /&gt;
Filters can be defined using the &amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;=, =, != and IN operators. The IS operator tests membership in a set. For example to restrict analysis to three interesting SNPs, use:&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER MARKER_ID IN (rs1234,rs123456,rs123)&lt;br /&gt;
&lt;br /&gt;
To remove all previously defined filters, use the command:&lt;br /&gt;
&lt;br /&gt;
   REMOVEFILTERS&lt;br /&gt;
&lt;br /&gt;
=== Verbose Mode ===&lt;br /&gt;
&lt;br /&gt;
   VERBOSE ON&lt;br /&gt;
&lt;br /&gt;
METAL allows for complete output of individual summary statistics for all SNPs in all input files.  This can create a very large file and should be used with caution.  Typically, one should create custom filters  to restrict analyses to interesting SNPs of interest before using this option.  This option can be useful for comparing direction of effect across many studies since METAL takes care of all the strand flipping and provides the direction of effect relative to the same allele.  This is also a way to double-check that the expected data are being used appropriately by METAL.&lt;br /&gt;
&lt;br /&gt;
=== Lenient Mode ===&lt;br /&gt;
 &lt;br /&gt;
    COLUMNCOUNTING STRICT         - requires expected number of columns in every row&lt;br /&gt;
    COLUMNCOUNTING LENIENT        - tries to interpret rows with fewer columns than expected&lt;br /&gt;
&lt;br /&gt;
By default, METAL will skip lines in each input file that don&#039;t have the expected number of columns. This is usually a good idea because it avoids producing incorrect results when a column is missing. Sometimes (for example, when there are optional extra columns at the end of each line), the &amp;lt;code&amp;gt;COLUMNCOUNTING LENIENT&amp;lt;/code&amp;gt; option can be useful.&lt;br /&gt;
&lt;br /&gt;
=== Tracking Allele Frequencies ===&lt;br /&gt;
&lt;br /&gt;
   AVERAGEFREQ ON&lt;br /&gt;
   MINMAXFREQ ON&lt;br /&gt;
&lt;br /&gt;
METAL can optionally track the effect allele frequency across all files and report its mean, minimum and maximum.  These can be quite useful to check that allele frequencies are similar across different cohorts after METAL performs all strand alignment. Large differences in allele frequencies across studies can suggest inconsistent naming of alleles across studies. METAL requires all input files to have an allele frequency column when this feature is turned on. To specify the column header for allele frequency information, use the &amp;lt;code&amp;gt;FREQLABEL&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Custom Variables ===&lt;br /&gt;
&lt;br /&gt;
We allow users to keep cumulative counts of custom variables across input files.  An example of this might be to keep track of the sample size when performing standard-error weighted meta-analysis.  The name of the custom variable should be defined once, before input files are loaded.  The corresponding column label in each input file can be specified using the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command. For example, to create a custom variable labeled TotalSampleSize that tallies the total of the N column across files, one could issue the commands:&lt;br /&gt;
&lt;br /&gt;
  CUSTOMVARIABLE TotalSampleSize&lt;br /&gt;
  LABEL TotalSampleSize as N&lt;br /&gt;
&lt;br /&gt;
If needed, the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command can be used multiple times to customize column headers for each input file.&lt;br /&gt;
&lt;br /&gt;
=== Input File Recommendations ===&lt;br /&gt;
&lt;br /&gt;
We strongly recommend that both allele labels, corresponding to the the effect allele and non-effect allele, should be provided for all SNPs.  As long as both allele columns are given for each input file, METAL appropriately accounts for situations when different input files use different reference alleles. Alleles can be coded numerically (A=1,C=2,G=3,T=4) or alphabetically (A,C,G,T,a,c,g,t) and can be on either strand if not an A/T or C/G SNP.  For A/T or C/G SNPs, METAL requires SNPs to be on a consistent strand in different input files for the results to be interpretable.  For other SNPs, METAL can automatically identify and resolve strand inconsistencies. &lt;br /&gt;
&lt;br /&gt;
P-values that are &amp;amp;lt; 0.0, &amp;amp;gt; 1.0 or non-numeric will be treated as missing and generate a warning.  &lt;br /&gt;
&lt;br /&gt;
The EFFECT column can have positive and negative values (beta values from regression, for example), or simply directions of effect relative to the reference allele, listed as “+” and “-“.  An EFFECT of “+” (or any positive number) with respect to the reference allele A (or effect allele A), for example, represents a case where increasing number of copies of allele A are correlated with increasing trait values. For discrete traits, it is common to report odds ratios, which are always positive. In this case, to calculate the direction of effect, one should look at the log of the odds ratio. METAL can compute the odds ratio for you if you specify &amp;lt;code&amp;gt;EFFECT log(ODDS_RATIO_COLUMN)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To perform odds-ratio based meta-analysis, select SCHEME STDERR at the beginning of the script.  Then, for each file, provide the natural log of the odds ratio as the EFFECT column or another appropriate statistic (such as the corresponding regression coefficient from a logistic regression analysis).&lt;br /&gt;
&lt;br /&gt;
== Example: A METAL Meta-Analysis Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#THIS SCRIPT EXECUTES AN ANALYSIS OF EIGHT STUDIES&lt;br /&gt;
#THE RESULTS FOR EACH STUDY ARE STORED IN FILES Inputfile1.txt THROUGH Inputfile8.txt&lt;br /&gt;
&lt;br /&gt;
#LOAD THE FIRST EIGHT INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# UNCOMMENT THE NEXT LINE TO ENABLE GenomicControl CORRECTION&lt;br /&gt;
# GENOMICCONTROL ON&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIRST INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE REF_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile1.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SECOND INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile2.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE THIRD INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE A_REF OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE pvalue &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile3.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FOURTH INPUT FILE ===&lt;br /&gt;
MARKER MARKERNAME&lt;br /&gt;
ALLELE EFFECTALLELE NON_EFFECT_ALLELE&lt;br /&gt;
EFFECT EFFECT1&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT NONMISS&lt;br /&gt;
PROCESS inputfile4.txt &lt;br /&gt;
&lt;br /&gt;
# === CARRY OUT AN INTERIM ANALYSIS OF THE FIRST FOUR FILES ===&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1to4_ .tbl&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
# LOAD THE NEXT FOUR INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIFTH INPUT FILE ===&lt;br /&gt;
MARKER rsid&lt;br /&gt;
ALLELE EFFECT_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE Add_p&lt;br /&gt;
WEIGHT total_N&lt;br /&gt;
SEPARATOR COMMAS&lt;br /&gt;
PROCESS inputfile5.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SIXTH INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile6.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE SEVENTH INPUT FILE ===&lt;br /&gt;
ALLELE ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT N&lt;br /&gt;
SEPARATOR WHITESPACE&lt;br /&gt;
PROCESS inputfile7.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE NINTH INPUT FILE ===&lt;br /&gt;
ALLELE BETA_ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE P_VAL&lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile8.txt &lt;br /&gt;
&lt;br /&gt;
#for the final meta-analysis of all 8 samples only output results if the&lt;br /&gt;
#combined weight is greater than 10000 people&lt;br /&gt;
&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1-8_ .tbl&lt;br /&gt;
MINWEIGHT 10000&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
QUIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=786</id>
		<title>METAL Documentation</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=786"/>
		<updated>2010-03-29T02:05:26Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Specifying Weights in P-value Based Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== History ==&lt;br /&gt;
&lt;br /&gt;
METAL was developed by Goncalo Abecasis, Yun Li and Cristen Willer. The first version was developed in 2007 and was used for the analyses presented in [http://www.sph.umich.edu/csg/abecasis/publications/18193045.html Sanna et al (2008)] and [http://www.sph.umich.edu/csg/abecasis/publications/18193043.html Willer et al (2008)]. Since then, it has become quite a popular tool for the analysis of genomewide association scans.&lt;br /&gt;
&lt;br /&gt;
== Brief Description ==&lt;br /&gt;
&lt;br /&gt;
METAL is a tool for meta-analysis genomewide association scans. METAL can combine either (a) test statistics and standard errors or (b) p-values across studies (taking sample size and direction of effect into account).  METAL analysis is a convenient alternative to a direct analysis of merged data from multiple studies. It is especially appropriate when data from the individual studies cannot be analyzed together because of differences in ethnicity, phenotype distribution, gender or constraints in sharing of individual level data imposed. Meta-analysis results in little or no loss of efficiency compared to analysis of a combined dataset including data from all individual studies. &lt;br /&gt;
&lt;br /&gt;
== Approach ==&lt;br /&gt;
&lt;br /&gt;
One of the most common questions we receive is about the approach used by METAL to carry out a meta-analysis using p-values as input. The process is actually quite simple! First, for each marker, a reference allele is selected and a z-statistic characterizing the evidence for association is calculated. The z-statistic summarizes the magnitude and the direction of effect relative to the reference allele and all studies are aligned to the same reference allele.  Next, an overall z-statistic and p-value are then calculated from a weighted sum of the individual statistics. Weights are proportional to the square-root of the number of individuals examined in each sample and selected such that the squared weights sum to 1.0. For samples that contain related individuals, a smaller ‘effective’ sample size may be used, but simulations suggest that modest changes in the effective sample size have very little impact on the final p-value.&lt;br /&gt;
&lt;br /&gt;
== Basic Usage Instructions ==&lt;br /&gt;
&lt;br /&gt;
METAL is a command line tool. It is typically run from a Linux, Unix or DOS prompt by invoking the command &amp;lt;code&amp;gt;metal&amp;lt;/code&amp;gt;. Analyses can be run interactively or a simple script can be provided as input. Interactive analyses are usually convenient when learning how to use METAL, whereas the scripting approach is preferred for production use (as it allows analyses to be conveniently repeated).  An example METAL script is included at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
METAL has lots of options and here we have listed some common ones that, hopefully, will help you get started. &lt;br /&gt;
&lt;br /&gt;
=== Help! ===&lt;br /&gt;
&lt;br /&gt;
Issuing the &amp;lt;code&amp;gt;HELP&amp;lt;/code&amp;gt; command lists all available commands and the current settings for each option. The list of all available commands is also available in the [[METAL Command Reference]].&lt;br /&gt;
&lt;br /&gt;
=== Input File Separators ===&lt;br /&gt;
&lt;br /&gt;
METAL expects that each set of results will be summarized in a table. This table must be stored in a text file but otherwise METAL is quite flexible about details such as column separators, column headers and the like. This does mean that an essential bit of information needed before any meta-analysis is a description of each input file.&lt;br /&gt;
&lt;br /&gt;
The first thing you should specify is the column separator. By default, METAL assumes columns are separated by whitespace (which consists of any combination of space and tab characters). You can also specify:&lt;br /&gt;
&lt;br /&gt;
   SEPARATOR  WHITESPACE    - the default&lt;br /&gt;
   SEPARATOR  COMMA         - for comma delimited files that are popular in some platforms&lt;br /&gt;
   SEPARATOR  TAB           - columns separated by a single tab, so that consecutive tabs indicate an empty column&lt;br /&gt;
&lt;br /&gt;
=== Input File Columns ===&lt;br /&gt;
&lt;br /&gt;
Each input file should include the following information:&lt;br /&gt;
&lt;br /&gt;
* A column with marker name, which should be consistent across studies&lt;br /&gt;
* A column indicating the tested allele&lt;br /&gt;
* A column indicating the other allele&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a sample size weighted analysis (based on p-values), you will also need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the direction of effect for the tested allele&lt;br /&gt;
* A column indicating the corresponding p-value&lt;br /&gt;
* An optional column indicating the sample size (if the sample size varies by marker)&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a meta-analysis based on standard errors, you will need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the estimated effect size for each marker&lt;br /&gt;
* A column indicating the standard error of this effect size estimate&lt;br /&gt;
&lt;br /&gt;
The header for each of these columns must be specified so that METAL knows how to interpret the data. As noted below, additional columns including allele frequency information, strand information, and others can also be present.&lt;br /&gt;
&lt;br /&gt;
Here is a typical set of commands that would describe a table where the headers SNP, RefAllele, NonRefAllele, Pvalue and Beta correspond to the MARKER, ALLELE 1 and 2, PVALUE and EFFECT columns:&lt;br /&gt;
&lt;br /&gt;
  MARKERLABEL   SNP&lt;br /&gt;
  ALLELELABELS  RefAllele NonRefAllele&lt;br /&gt;
  PVALUELABEL   P-value&lt;br /&gt;
  EFFECTLABEL   Effect&lt;br /&gt;
&lt;br /&gt;
These can be abbreviated as:&lt;br /&gt;
&lt;br /&gt;
  MARKER        SNP&lt;br /&gt;
  ALLELE        RefAllele NonRefAllele&lt;br /&gt;
  PVALUE        P-value&lt;br /&gt;
  EFFECT        Effect&lt;br /&gt;
&lt;br /&gt;
=== Specifying Weights in P-value Based Analysis ===&lt;br /&gt;
&lt;br /&gt;
The weight for each MARKER can be stored in a column in the table (specified with the &amp;lt;code&amp;gt;WEIGHTLABEL&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;WEIGHT&amp;lt;/code&amp;gt; commands) or the same weight can be used for all markers for that inputfile (in which case the fixed weight can be set with the &amp;lt;code&amp;gt;DEFAULTWEIGHT&amp;lt;/code&amp;gt; command).&lt;br /&gt;
&lt;br /&gt;
=== Reading Each Input File ===&lt;br /&gt;
&lt;br /&gt;
Once all appropriate headers have been specified, issuing the &amp;lt;code&amp;gt;PROCESS&amp;lt;/code&amp;gt; command will read an input file and update summary statistics to take the results it contains into account. Thus:&lt;br /&gt;
&lt;br /&gt;
  PROCESS      study1-results.tbl&lt;br /&gt;
&lt;br /&gt;
=== Performing the Final Analysis ===&lt;br /&gt;
&lt;br /&gt;
Once all input files have been processed, simply issue the &amp;lt;code&amp;gt;ANALYZE&amp;lt;/code&amp;gt; command to execute a meta-analysis. If you&#039;d like to execute interim analysis that include only a subset of the studies, issue the ANALYZE command after the corresponding input files have been processed.&lt;br /&gt;
&lt;br /&gt;
To allow for heterogeneity, use the &amp;lt;code&amp;gt;ANALYZE HETEROGENEITY&amp;lt;/code&amp;gt; command. This command will take a little longer to run, because it requires each input file to be examined twice. The METAL heterogeneity analysis requires a second pass of analysis to decide whether observed effect sizes (or test statistics) are homogeneous across samples.  The resulting heterogeneity statistic has n-1 degrees of freedom for n samples.&lt;br /&gt;
&lt;br /&gt;
METAL does not require that all input files report a result for every marker.  Any available data is used.  To restrict the output to only markers that have at least a specific number of individuals analysed (or weight), use a command like the following:&lt;br /&gt;
&lt;br /&gt;
  MINWEIGHT 10000&lt;br /&gt;
&lt;br /&gt;
For example to restrict the output to show only Markers with at least 10,000 individuals.&lt;br /&gt;
&lt;br /&gt;
== Additional Analysis Options ==&lt;br /&gt;
&lt;br /&gt;
=== Selecting an Analysis Scheme ===&lt;br /&gt;
&lt;br /&gt;
  SCHEME SAMPLESIZE        - default approach, uses p-value and direction of effect, weighted according to sample size&lt;br /&gt;
  SCHEME STDERR            - classical approach, uses effect size estimates and standard errors&lt;br /&gt;
&lt;br /&gt;
By default, METAL combines p-values across studies taking into account a study specific weight (typically, the sample size) and direction of effect. This behavior can be requested explicitly with the &amp;lt;code&amp;gt;SCHEME SAMPLESIZE&amp;lt;/code&amp;gt; command. An alternative can be requested with the &amp;lt;code&amp;gt;SCHEME STDERR&amp;lt;/code&amp;gt; command and weights effect size estimates using the inverse of the corresponding standard errors. While standard error based weights are more common in the biostatistical literature, if you decide to use this approach, it is very important to ensure that effect size estimates (&#039;&#039;beta&#039;&#039; coefficients) and standard errors use the same units in all studies (i.e. make sure that the exact same trait was examined in each study and that the same transformations were applied). Inconsistent use of measurement units across studies is the most common cause of discrepancies between these two analysis strategies. &lt;br /&gt;
&lt;br /&gt;
=== Genomic Control Correction ===&lt;br /&gt;
&lt;br /&gt;
   GENOMICCONTROL OFF      - the default, no adjustment to test statistics&lt;br /&gt;
   GENOMICCONTROL ON       - automatically correct test statistics to account for small amounts of population stratification or unaccounted for relatedness&lt;br /&gt;
   GENOMICCONTROL [value]  - correct test statistics using the specified inflation factor&lt;br /&gt;
&lt;br /&gt;
METAL has the ability to apply a genomic control correction to all input files.  METAL will estimate the inflation of the test statistic by comparing the median test statistic to that expected by chance, and then apply the genomic control correction to the p-values (for SAMPLESIZE weighted meta-analysis) or the standard error (for STDERR weighted meta-analysis).  This should only be applied to files with whole genome data (i.e. should not be used for settings where results are only available for a candidate locus or a small number of SNPs selected for follow-up of GWAS results). Genomic control settings can be customized for each input file.  We recommend applying genomic control correction to all input files that include genomewide data and, in addition, to the meta-analysis results. To apply genomic control to the meta-analysis results, just perform an initial meta-analysis and then load the initial set of results into METAL to get final, genomic control adjusted results.&lt;br /&gt;
&lt;br /&gt;
=== Strand Information ===&lt;br /&gt;
&lt;br /&gt;
   USESTRAND   ON&lt;br /&gt;
   STRANDLABEL StrandColumnHeading&lt;br /&gt;
&lt;br /&gt;
Input files can contain a column that indicates which strand the alleles are coded on (given as +/-).  If this column is present, you should issue the &amp;lt;code&amp;gt;USESTRAND ON&amp;lt;/code&amp;gt; command and specify an appropriate header with the &amp;lt;code&amp;gt;STRANDLABEL&amp;lt;/code&amp;gt; command.  If USESTRAND is off, the strand is assumed to be “+” for all SNPs, although obvious strand problems are identified by METAL and appropriately handled (for example, when one study provides A/G alleles and a different study provides C/T alleles).&lt;br /&gt;
&lt;br /&gt;
=== Filtering ===&lt;br /&gt;
&lt;br /&gt;
Custom filters can be used to select SNPs for inclusion in the meta-analysis.  This can be used, for example, to select SNPs within a specified minor-allele frequency range for analysis. &lt;br /&gt;
&lt;br /&gt;
Here are some possible filters:&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER N &amp;gt; 1000&lt;br /&gt;
   ADDFILTER MAF &amp;gt; 0.01&lt;br /&gt;
&lt;br /&gt;
Together, these two filters would only consider entries where the value in the N column is greater than 1000 and the value in the MAF column is also greater than 0.01.&lt;br /&gt;
&lt;br /&gt;
Filters can be defined using the &amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;=, =, != and IN operators. The IS operator tests membership in a set. For example to restrict analysis to three interesting SNPs, use:&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER MARKER_ID IN (rs1234,rs123456,rs123)&lt;br /&gt;
&lt;br /&gt;
To remove all previously defined filters, use the command:&lt;br /&gt;
&lt;br /&gt;
   REMOVEFILTERS&lt;br /&gt;
&lt;br /&gt;
=== Verbose Mode ===&lt;br /&gt;
&lt;br /&gt;
   VERBOSE ON&lt;br /&gt;
&lt;br /&gt;
METAL allows for complete output of individual summary statistics for all SNPs in all input files.  This can create a very large file and should be used with caution.  Typically, one should create custom filters  to restrict analyses to interesting SNPs of interest before using this option.  This option can be useful for comparing direction of effect across many studies since METAL takes care of all the strand flipping and provides the direction of effect relative to the same allele.  This is also a way to double-check that the expected data are being used appropriately by METAL.&lt;br /&gt;
&lt;br /&gt;
=== Lenient Mode ===&lt;br /&gt;
 &lt;br /&gt;
    COLUMNCOUNTING STRICT         - requires expected number of columns in every row&lt;br /&gt;
    COLUMNCOUNTING LENIENT        - tries to interpret rows with fewer columns than expected&lt;br /&gt;
&lt;br /&gt;
By default, METAL will skip lines in each input file that don&#039;t have the expected number of columns. This is usually a good idea because it avoids producing incorrect results when a column is missing. Sometimes (for example, when there are optional extra columns at the end of each line), the &amp;lt;code&amp;gt;COLUMNCOUNTING LENIENT&amp;lt;/code&amp;gt; option can be useful.&lt;br /&gt;
&lt;br /&gt;
=== Tracking Allele Frequencies ===&lt;br /&gt;
&lt;br /&gt;
   AVERAGEFREQ ON&lt;br /&gt;
   MINMAXFREQ ON&lt;br /&gt;
&lt;br /&gt;
METAL can optionally track the effect allele frequency across all files and report its mean, minimum and maximum.  These can be quite useful to check that allele frequencies are similar across different cohorts after METAL performs all strand alignment. Large differences in allele frequencies across studies can suggest inconsistent naming of alleles across studies. METAL requires all input files to have an allele frequency column when this feature is turned on. To specify the column header for allele frequency information, use the &amp;lt;code&amp;gt;FREQLABEL&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Custom Variables ===&lt;br /&gt;
&lt;br /&gt;
We allow users to keep cumulative counts of custom variables across input files.  An example of this might be to keep track of the sample size when performing standard-error weighted meta-analysis.  The name of the custom variable should be defined once, before input files are loaded.  The corresponding column label in each input file can be specified using the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command. For example, to create a custom variable labeled TotalSampleSize that tallies the total of the N column across files, one could issue the commands:&lt;br /&gt;
&lt;br /&gt;
  CUSTOMVARIABLE TotalSampleSize&lt;br /&gt;
  LABEL TotalSampleSize as N&lt;br /&gt;
&lt;br /&gt;
If needed, the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command can be used multiple times to customize column headers for each input file.&lt;br /&gt;
&lt;br /&gt;
=== Input File Recommendations ===&lt;br /&gt;
&lt;br /&gt;
We strongly recommend that both allele labels, corresponding to the the effect allele and non-effect allele, should be provided for all SNPs.  As long as both allele columns are given for each input file, METAL appropriately accounts for situations when different input files use different reference alleles. Alleles can be coded numerically (A=1,C=2,G=3,T=4) or alphabetically (A,C,G,T,a,c,g,t) and can be on either strand if not an A/T or C/G SNP.  For A/T or C/G SNPs, METAL requires SNPs to be on a consistent strand in different input files for the results to be interpretable.  For other SNPs, METAL can automatically identify and resolve strand inconsistencies. &lt;br /&gt;
&lt;br /&gt;
P-values that are &amp;amp;lt; 0.0, &amp;amp;gt; 1.0 or non-numeric will be treated as missing and generate a warning.  &lt;br /&gt;
&lt;br /&gt;
The EFFECT column can have positive and negative values (beta values from regression, for example), or simply directions of effect relative to the reference allele, listed as “+” and “-“.  An EFFECT of “+” (or any positive number) with respect to the reference allele A (or effect allele A), for example, represents a case where increasing number of copies of allele A are correlated with increasing trait values. For discrete traits, it is common to report odds ratios, which are always positive. In this case, to calculate the direction of effect, one should look at the log of the odds ratio. METAL can compute the odds ratio for you if you specify &amp;lt;code&amp;gt;EFFECT log(ODDS_RATIO_COLUMN)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To perform odds-ratio based meta-analysis, select SCHEME STDERR at the beginning of the script.  Then, for each file, provide the natural log of the odds ratio as the EFFECT column or another appropriate statistic (such as the corresponding regression coefficient from a logistic regression analysis).&lt;br /&gt;
&lt;br /&gt;
== Example: A METAL Meta-Analysis Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#THIS SCRIPT EXECUTES AN ANALYSIS OF EIGHT STUDIES&lt;br /&gt;
#THE RESULTS FOR EACH STUDY ARE STORED IN FILES Inputfile1.txt THROUGH Inputfile8.txt&lt;br /&gt;
&lt;br /&gt;
#LOAD THE FIRST EIGHT INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# UNCOMMENT THE NEXT LINE TO ENABLE GenomicControl CORRECTION&lt;br /&gt;
# GENOMICCONTROL ON&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIRST INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE REF_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile1.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SECOND INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile2.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE THIRD INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE A_REF OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE pvalue &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile3.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FOURTH INPUT FILE ===&lt;br /&gt;
MARKER MARKERNAME&lt;br /&gt;
ALLELE EFFECTALLELE NON_EFFECT_ALLELE&lt;br /&gt;
EFFECT EFFECT1&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT NONMISS&lt;br /&gt;
PROCESS inputfile4.txt &lt;br /&gt;
&lt;br /&gt;
# === CARRY OUT AN INTERIM ANALYSIS OF THE FIRST FOUR FILES ===&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1to4_ .tbl&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
# LOAD THE NEXT FOUR INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIFTH INPUT FILE ===&lt;br /&gt;
MARKER rsid&lt;br /&gt;
ALLELE EFFECT_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE Add_p&lt;br /&gt;
WEIGHT total_N&lt;br /&gt;
SEPARATOR COMMAS&lt;br /&gt;
PROCESS inputfile5.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SIXTH INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile6.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE SEVENTH INPUT FILE ===&lt;br /&gt;
ALLELE ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT N&lt;br /&gt;
SEPARATOR WHITESPACE&lt;br /&gt;
PROCESS inputfile7.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE NINTH INPUT FILE ===&lt;br /&gt;
ALLELE BETA_ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE P_VAL&lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile8.txt &lt;br /&gt;
&lt;br /&gt;
#for the final meta-analysis of all 8 samples only output results if the&lt;br /&gt;
#combined weight is greater than 10000 people&lt;br /&gt;
&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1-8_ .tbl&lt;br /&gt;
MINWEIGHT 10000&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
QUIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=785</id>
		<title>METAL Documentation</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=785"/>
		<updated>2010-03-29T02:03:01Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Input File Separators */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== History ==&lt;br /&gt;
&lt;br /&gt;
METAL was developed by Goncalo Abecasis, Yun Li and Cristen Willer. The first version was developed in 2007 and was used for the analyses presented in [http://www.sph.umich.edu/csg/abecasis/publications/18193045.html Sanna et al (2008)] and [http://www.sph.umich.edu/csg/abecasis/publications/18193043.html Willer et al (2008)]. Since then, it has become quite a popular tool for the analysis of genomewide association scans.&lt;br /&gt;
&lt;br /&gt;
== Brief Description ==&lt;br /&gt;
&lt;br /&gt;
METAL is a tool for meta-analysis genomewide association scans. METAL can combine either (a) test statistics and standard errors or (b) p-values across studies (taking sample size and direction of effect into account).  METAL analysis is a convenient alternative to a direct analysis of merged data from multiple studies. It is especially appropriate when data from the individual studies cannot be analyzed together because of differences in ethnicity, phenotype distribution, gender or constraints in sharing of individual level data imposed. Meta-analysis results in little or no loss of efficiency compared to analysis of a combined dataset including data from all individual studies. &lt;br /&gt;
&lt;br /&gt;
== Approach ==&lt;br /&gt;
&lt;br /&gt;
One of the most common questions we receive is about the approach used by METAL to carry out a meta-analysis using p-values as input. The process is actually quite simple! First, for each marker, a reference allele is selected and a z-statistic characterizing the evidence for association is calculated. The z-statistic summarizes the magnitude and the direction of effect relative to the reference allele and all studies are aligned to the same reference allele.  Next, an overall z-statistic and p-value are then calculated from a weighted sum of the individual statistics. Weights are proportional to the square-root of the number of individuals examined in each sample and selected such that the squared weights sum to 1.0. For samples that contain related individuals, a smaller ‘effective’ sample size may be used, but simulations suggest that modest changes in the effective sample size have very little impact on the final p-value.&lt;br /&gt;
&lt;br /&gt;
== Basic Usage Instructions ==&lt;br /&gt;
&lt;br /&gt;
METAL is a command line tool. It is typically run from a Linux, Unix or DOS prompt by invoking the command &amp;lt;code&amp;gt;metal&amp;lt;/code&amp;gt;. Analyses can be run interactively or a simple script can be provided as input. Interactive analyses are usually convenient when learning how to use METAL, whereas the scripting approach is preferred for production use (as it allows analyses to be conveniently repeated).  An example METAL script is included at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
METAL has lots of options and here we have listed some common ones that, hopefully, will help you get started. &lt;br /&gt;
&lt;br /&gt;
=== Help! ===&lt;br /&gt;
&lt;br /&gt;
Issuing the &amp;lt;code&amp;gt;HELP&amp;lt;/code&amp;gt; command lists all available commands and the current settings for each option. The list of all available commands is also available in the [[METAL Command Reference]].&lt;br /&gt;
&lt;br /&gt;
=== Input File Separators ===&lt;br /&gt;
&lt;br /&gt;
METAL expects that each set of results will be summarized in a table. This table must be stored in a text file but otherwise METAL is quite flexible about details such as column separators, column headers and the like. This does mean that an essential bit of information needed before any meta-analysis is a description of each input file.&lt;br /&gt;
&lt;br /&gt;
The first thing you should specify is the column separator. By default, METAL assumes columns are separated by whitespace (which consists of any combination of space and tab characters). You can also specify:&lt;br /&gt;
&lt;br /&gt;
   SEPARATOR  WHITESPACE    - the default&lt;br /&gt;
   SEPARATOR  COMMA         - for comma delimited files that are popular in some platforms&lt;br /&gt;
   SEPARATOR  TAB           - columns separated by a single tab, so that consecutive tabs indicate an empty column&lt;br /&gt;
&lt;br /&gt;
=== Input File Columns ===&lt;br /&gt;
&lt;br /&gt;
Each input file should include the following information:&lt;br /&gt;
&lt;br /&gt;
* A column with marker name, which should be consistent across studies&lt;br /&gt;
* A column indicating the tested allele&lt;br /&gt;
* A column indicating the other allele&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a sample size weighted analysis (based on p-values), you will also need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the direction of effect for the tested allele&lt;br /&gt;
* A column indicating the corresponding p-value&lt;br /&gt;
* An optional column indicating the sample size (if the sample size varies by marker)&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a meta-analysis based on standard errors, you will need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the estimated effect size for each marker&lt;br /&gt;
* A column indicating the standard error of this effect size estimate&lt;br /&gt;
&lt;br /&gt;
The header for each of these columns must be specified so that METAL knows how to interpret the data. As noted below, additional columns including allele frequency information, strand information, and others can also be present.&lt;br /&gt;
&lt;br /&gt;
Here is a typical set of commands that would describe a table where the headers SNP, RefAllele, NonRefAllele, Pvalue and Beta correspond to the MARKER, ALLELE 1 and 2, PVALUE and EFFECT columns:&lt;br /&gt;
&lt;br /&gt;
  MARKERLABEL   SNP&lt;br /&gt;
  ALLELELABELS  RefAllele NonRefAllele&lt;br /&gt;
  PVALUELABEL   P-value&lt;br /&gt;
  EFFECTLABEL   Effect&lt;br /&gt;
&lt;br /&gt;
These can be abbreviated as:&lt;br /&gt;
&lt;br /&gt;
  MARKER        SNP&lt;br /&gt;
  ALLELE        RefAllele NonRefAllele&lt;br /&gt;
  PVALUE        P-value&lt;br /&gt;
  EFFECT        Effect&lt;br /&gt;
&lt;br /&gt;
=== Specifying Weights in P-value Based Analysis ===&lt;br /&gt;
&lt;br /&gt;
The weight for each MARKER can be stored in a column in the table (specified with the &amp;lt;code&amp;gt;WEIGHTLABEL&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;WEIGHT&amp;lt;/code&amp;gt; commands) or can be fixed for each file (in which case the fixed weight can be set with the &amp;lt;code&amp;gt;DEFAULTWEIGHT&amp;lt;/code&amp;gt; command).&lt;br /&gt;
&lt;br /&gt;
=== Reading Each Input File ===&lt;br /&gt;
&lt;br /&gt;
Once all appropriate headers have been specified, issuing the &amp;lt;code&amp;gt;PROCESS&amp;lt;/code&amp;gt; command will read an input file and update summary statistics to take the results it contains into account. Thus:&lt;br /&gt;
&lt;br /&gt;
  PROCESS      study1-results.tbl&lt;br /&gt;
&lt;br /&gt;
=== Performing the Final Analysis ===&lt;br /&gt;
&lt;br /&gt;
Once all input files have been processed, simply issue the &amp;lt;code&amp;gt;ANALYZE&amp;lt;/code&amp;gt; command to execute a meta-analysis. If you&#039;d like to execute interim analysis that include only a subset of the studies, issue the ANALYZE command after the corresponding input files have been processed.&lt;br /&gt;
&lt;br /&gt;
To allow for heterogeneity, use the &amp;lt;code&amp;gt;ANALYZE HETEROGENEITY&amp;lt;/code&amp;gt; command. This command will take a little longer to run, because it requires each input file to be examined twice. The METAL heterogeneity analysis requires a second pass of analysis to decide whether observed effect sizes (or test statistics) are homogeneous across samples.  The resulting heterogeneity statistic has n-1 degrees of freedom for n samples.&lt;br /&gt;
&lt;br /&gt;
METAL does not require that all input files report a result for every marker.  Any available data is used.  To restrict the output to only markers that have at least a specific number of individuals analysed (or weight), use a command like the following:&lt;br /&gt;
&lt;br /&gt;
  MINWEIGHT 10000&lt;br /&gt;
&lt;br /&gt;
For example to restrict the output to show only Markers with at least 10,000 individuals.&lt;br /&gt;
&lt;br /&gt;
== Additional Analysis Options ==&lt;br /&gt;
&lt;br /&gt;
=== Selecting an Analysis Scheme ===&lt;br /&gt;
&lt;br /&gt;
  SCHEME SAMPLESIZE        - default approach, uses p-value and direction of effect, weighted according to sample size&lt;br /&gt;
  SCHEME STDERR            - classical approach, uses effect size estimates and standard errors&lt;br /&gt;
&lt;br /&gt;
By default, METAL combines p-values across studies taking into account a study specific weight (typically, the sample size) and direction of effect. This behavior can be requested explicitly with the &amp;lt;code&amp;gt;SCHEME SAMPLESIZE&amp;lt;/code&amp;gt; command. An alternative can be requested with the &amp;lt;code&amp;gt;SCHEME STDERR&amp;lt;/code&amp;gt; command and weights effect size estimates using the inverse of the corresponding standard errors. While standard error based weights are more common in the biostatistical literature, if you decide to use this approach, it is very important to ensure that effect size estimates (&#039;&#039;beta&#039;&#039; coefficients) and standard errors use the same units in all studies (i.e. make sure that the exact same trait was examined in each study and that the same transformations were applied). Inconsistent use of measurement units across studies is the most common cause of discrepancies between these two analysis strategies. &lt;br /&gt;
&lt;br /&gt;
=== Genomic Control Correction ===&lt;br /&gt;
&lt;br /&gt;
   GENOMICCONTROL OFF      - the default, no adjustment to test statistics&lt;br /&gt;
   GENOMICCONTROL ON       - automatically correct test statistics to account for small amounts of population stratification or unaccounted for relatedness&lt;br /&gt;
   GENOMICCONTROL [value]  - correct test statistics using the specified inflation factor&lt;br /&gt;
&lt;br /&gt;
METAL has the ability to apply a genomic control correction to all input files.  METAL will estimate the inflation of the test statistic by comparing the median test statistic to that expected by chance, and then apply the genomic control correction to the p-values (for SAMPLESIZE weighted meta-analysis) or the standard error (for STDERR weighted meta-analysis).  This should only be applied to files with whole genome data (i.e. should not be used for settings where results are only available for a candidate locus or a small number of SNPs selected for follow-up of GWAS results). Genomic control settings can be customized for each input file.  We recommend applying genomic control correction to all input files that include genomewide data and, in addition, to the meta-analysis results. To apply genomic control to the meta-analysis results, just perform an initial meta-analysis and then load the initial set of results into METAL to get final, genomic control adjusted results.&lt;br /&gt;
&lt;br /&gt;
=== Strand Information ===&lt;br /&gt;
&lt;br /&gt;
   USESTRAND   ON&lt;br /&gt;
   STRANDLABEL StrandColumnHeading&lt;br /&gt;
&lt;br /&gt;
Input files can contain a column that indicates which strand the alleles are coded on (given as +/-).  If this column is present, you should issue the &amp;lt;code&amp;gt;USESTRAND ON&amp;lt;/code&amp;gt; command and specify an appropriate header with the &amp;lt;code&amp;gt;STRANDLABEL&amp;lt;/code&amp;gt; command.  If USESTRAND is off, the strand is assumed to be “+” for all SNPs, although obvious strand problems are identified by METAL and appropriately handled (for example, when one study provides A/G alleles and a different study provides C/T alleles).&lt;br /&gt;
&lt;br /&gt;
=== Filtering ===&lt;br /&gt;
&lt;br /&gt;
Custom filters can be used to select SNPs for inclusion in the meta-analysis.  This can be used, for example, to select SNPs within a specified minor-allele frequency range for analysis. &lt;br /&gt;
&lt;br /&gt;
Here are some possible filters:&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER N &amp;gt; 1000&lt;br /&gt;
   ADDFILTER MAF &amp;gt; 0.01&lt;br /&gt;
&lt;br /&gt;
Together, these two filters would only consider entries where the value in the N column is greater than 1000 and the value in the MAF column is also greater than 0.01.&lt;br /&gt;
&lt;br /&gt;
Filters can be defined using the &amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;=, =, != and IN operators. The IS operator tests membership in a set. For example to restrict analysis to three interesting SNPs, use:&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER MARKER_ID IN (rs1234,rs123456,rs123)&lt;br /&gt;
&lt;br /&gt;
To remove all previously defined filters, use the command:&lt;br /&gt;
&lt;br /&gt;
   REMOVEFILTERS&lt;br /&gt;
&lt;br /&gt;
=== Verbose Mode ===&lt;br /&gt;
&lt;br /&gt;
   VERBOSE ON&lt;br /&gt;
&lt;br /&gt;
METAL allows for complete output of individual summary statistics for all SNPs in all input files.  This can create a very large file and should be used with caution.  Typically, one should create custom filters  to restrict analyses to interesting SNPs of interest before using this option.  This option can be useful for comparing direction of effect across many studies since METAL takes care of all the strand flipping and provides the direction of effect relative to the same allele.  This is also a way to double-check that the expected data are being used appropriately by METAL.&lt;br /&gt;
&lt;br /&gt;
=== Lenient Mode ===&lt;br /&gt;
 &lt;br /&gt;
    COLUMNCOUNTING STRICT         - requires expected number of columns in every row&lt;br /&gt;
    COLUMNCOUNTING LENIENT        - tries to interpret rows with fewer columns than expected&lt;br /&gt;
&lt;br /&gt;
By default, METAL will skip lines in each input file that don&#039;t have the expected number of columns. This is usually a good idea because it avoids producing incorrect results when a column is missing. Sometimes (for example, when there are optional extra columns at the end of each line), the &amp;lt;code&amp;gt;COLUMNCOUNTING LENIENT&amp;lt;/code&amp;gt; option can be useful.&lt;br /&gt;
&lt;br /&gt;
=== Tracking Allele Frequencies ===&lt;br /&gt;
&lt;br /&gt;
   AVERAGEFREQ ON&lt;br /&gt;
   MINMAXFREQ ON&lt;br /&gt;
&lt;br /&gt;
METAL can optionally track the effect allele frequency across all files and report its mean, minimum and maximum.  These can be quite useful to check that allele frequencies are similar across different cohorts after METAL performs all strand alignment. Large differences in allele frequencies across studies can suggest inconsistent naming of alleles across studies. METAL requires all input files to have an allele frequency column when this feature is turned on. To specify the column header for allele frequency information, use the &amp;lt;code&amp;gt;FREQLABEL&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Custom Variables ===&lt;br /&gt;
&lt;br /&gt;
We allow users to keep cumulative counts of custom variables across input files.  An example of this might be to keep track of the sample size when performing standard-error weighted meta-analysis.  The name of the custom variable should be defined once, before input files are loaded.  The corresponding column label in each input file can be specified using the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command. For example, to create a custom variable labeled TotalSampleSize that tallies the total of the N column across files, one could issue the commands:&lt;br /&gt;
&lt;br /&gt;
  CUSTOMVARIABLE TotalSampleSize&lt;br /&gt;
  LABEL TotalSampleSize as N&lt;br /&gt;
&lt;br /&gt;
If needed, the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command can be used multiple times to customize column headers for each input file.&lt;br /&gt;
&lt;br /&gt;
=== Input File Recommendations ===&lt;br /&gt;
&lt;br /&gt;
We strongly recommend that both allele labels, corresponding to the the effect allele and non-effect allele, should be provided for all SNPs.  As long as both allele columns are given for each input file, METAL appropriately accounts for situations when different input files use different reference alleles. Alleles can be coded numerically (A=1,C=2,G=3,T=4) or alphabetically (A,C,G,T,a,c,g,t) and can be on either strand if not an A/T or C/G SNP.  For A/T or C/G SNPs, METAL requires SNPs to be on a consistent strand in different input files for the results to be interpretable.  For other SNPs, METAL can automatically identify and resolve strand inconsistencies. &lt;br /&gt;
&lt;br /&gt;
P-values that are &amp;amp;lt; 0.0, &amp;amp;gt; 1.0 or non-numeric will be treated as missing and generate a warning.  &lt;br /&gt;
&lt;br /&gt;
The EFFECT column can have positive and negative values (beta values from regression, for example), or simply directions of effect relative to the reference allele, listed as “+” and “-“.  An EFFECT of “+” (or any positive number) with respect to the reference allele A (or effect allele A), for example, represents a case where increasing number of copies of allele A are correlated with increasing trait values. For discrete traits, it is common to report odds ratios, which are always positive. In this case, to calculate the direction of effect, one should look at the log of the odds ratio. METAL can compute the odds ratio for you if you specify &amp;lt;code&amp;gt;EFFECT log(ODDS_RATIO_COLUMN)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To perform odds-ratio based meta-analysis, select SCHEME STDERR at the beginning of the script.  Then, for each file, provide the natural log of the odds ratio as the EFFECT column or another appropriate statistic (such as the corresponding regression coefficient from a logistic regression analysis).&lt;br /&gt;
&lt;br /&gt;
== Example: A METAL Meta-Analysis Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#THIS SCRIPT EXECUTES AN ANALYSIS OF EIGHT STUDIES&lt;br /&gt;
#THE RESULTS FOR EACH STUDY ARE STORED IN FILES Inputfile1.txt THROUGH Inputfile8.txt&lt;br /&gt;
&lt;br /&gt;
#LOAD THE FIRST EIGHT INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# UNCOMMENT THE NEXT LINE TO ENABLE GenomicControl CORRECTION&lt;br /&gt;
# GENOMICCONTROL ON&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIRST INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE REF_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile1.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SECOND INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile2.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE THIRD INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE A_REF OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE pvalue &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile3.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FOURTH INPUT FILE ===&lt;br /&gt;
MARKER MARKERNAME&lt;br /&gt;
ALLELE EFFECTALLELE NON_EFFECT_ALLELE&lt;br /&gt;
EFFECT EFFECT1&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT NONMISS&lt;br /&gt;
PROCESS inputfile4.txt &lt;br /&gt;
&lt;br /&gt;
# === CARRY OUT AN INTERIM ANALYSIS OF THE FIRST FOUR FILES ===&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1to4_ .tbl&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
# LOAD THE NEXT FOUR INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIFTH INPUT FILE ===&lt;br /&gt;
MARKER rsid&lt;br /&gt;
ALLELE EFFECT_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE Add_p&lt;br /&gt;
WEIGHT total_N&lt;br /&gt;
SEPARATOR COMMAS&lt;br /&gt;
PROCESS inputfile5.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SIXTH INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile6.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE SEVENTH INPUT FILE ===&lt;br /&gt;
ALLELE ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT N&lt;br /&gt;
SEPARATOR WHITESPACE&lt;br /&gt;
PROCESS inputfile7.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE NINTH INPUT FILE ===&lt;br /&gt;
ALLELE BETA_ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE P_VAL&lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile8.txt &lt;br /&gt;
&lt;br /&gt;
#for the final meta-analysis of all 8 samples only output results if the&lt;br /&gt;
#combined weight is greater than 10000 people&lt;br /&gt;
&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1-8_ .tbl&lt;br /&gt;
MINWEIGHT 10000&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
QUIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=784</id>
		<title>METAL Documentation</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=784"/>
		<updated>2010-03-29T02:02:18Z</updated>

		<summary type="html">&lt;p&gt;Cristen: /* Approach */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== History ==&lt;br /&gt;
&lt;br /&gt;
METAL was developed by Goncalo Abecasis, Yun Li and Cristen Willer. The first version was developed in 2007 and was used for the analyses presented in [http://www.sph.umich.edu/csg/abecasis/publications/18193045.html Sanna et al (2008)] and [http://www.sph.umich.edu/csg/abecasis/publications/18193043.html Willer et al (2008)]. Since then, it has become quite a popular tool for the analysis of genomewide association scans.&lt;br /&gt;
&lt;br /&gt;
== Brief Description ==&lt;br /&gt;
&lt;br /&gt;
METAL is a tool for meta-analysis genomewide association scans. METAL can combine either (a) test statistics and standard errors or (b) p-values across studies (taking sample size and direction of effect into account).  METAL analysis is a convenient alternative to a direct analysis of merged data from multiple studies. It is especially appropriate when data from the individual studies cannot be analyzed together because of differences in ethnicity, phenotype distribution, gender or constraints in sharing of individual level data imposed. Meta-analysis results in little or no loss of efficiency compared to analysis of a combined dataset including data from all individual studies. &lt;br /&gt;
&lt;br /&gt;
== Approach ==&lt;br /&gt;
&lt;br /&gt;
One of the most common questions we receive is about the approach used by METAL to carry out a meta-analysis using p-values as input. The process is actually quite simple! First, for each marker, a reference allele is selected and a z-statistic characterizing the evidence for association is calculated. The z-statistic summarizes the magnitude and the direction of effect relative to the reference allele and all studies are aligned to the same reference allele.  Next, an overall z-statistic and p-value are then calculated from a weighted sum of the individual statistics. Weights are proportional to the square-root of the number of individuals examined in each sample and selected such that the squared weights sum to 1.0. For samples that contain related individuals, a smaller ‘effective’ sample size may be used, but simulations suggest that modest changes in the effective sample size have very little impact on the final p-value.&lt;br /&gt;
&lt;br /&gt;
== Basic Usage Instructions ==&lt;br /&gt;
&lt;br /&gt;
METAL is a command line tool. It is typically run from a Linux, Unix or DOS prompt by invoking the command &amp;lt;code&amp;gt;metal&amp;lt;/code&amp;gt;. Analyses can be run interactively or a simple script can be provided as input. Interactive analyses are usually convenient when learning how to use METAL, whereas the scripting approach is preferred for production use (as it allows analyses to be conveniently repeated).  An example METAL script is included at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
METAL has lots of options and here we have listed some common ones that, hopefully, will help you get started. &lt;br /&gt;
&lt;br /&gt;
=== Help! ===&lt;br /&gt;
&lt;br /&gt;
Issuing the &amp;lt;code&amp;gt;HELP&amp;lt;/code&amp;gt; command lists all available commands and the current settings for each option. The list of all available commands is also available in the [[METAL Command Reference]].&lt;br /&gt;
&lt;br /&gt;
=== Input File Separators ===&lt;br /&gt;
&lt;br /&gt;
METAL expects that each set of results will be summarized in a table. This table must be stored in a text file but otherwise METAL is quite flexible about details such as column separators, column headers and the like. This does mean that an essential bit of information needed before any meta-analysis is a description of each input file.&lt;br /&gt;
&lt;br /&gt;
The first thing you should specify is the column separator. By default, METAL assumes columns are separated by each other by whitespace (which consists of any combination of space and tab characters). You can also specify:&lt;br /&gt;
&lt;br /&gt;
   SEPARATOR  WHITESPACE    - the default&lt;br /&gt;
   SEPARATOR  COMMA         - for comma delimited files that are popular in some platforms&lt;br /&gt;
   SEPARATOR  TAB           - columns separated by a single tab, so that consecutive tabs indicate an empty column&lt;br /&gt;
&lt;br /&gt;
=== Input File Columns ===&lt;br /&gt;
&lt;br /&gt;
Each input file should include the following information:&lt;br /&gt;
&lt;br /&gt;
* A column with marker name, which should be consistent across studies&lt;br /&gt;
* A column indicating the tested allele&lt;br /&gt;
* A column indicating the other allele&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a sample size weighted analysis (based on p-values), you will also need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the direction of effect for the tested allele&lt;br /&gt;
* A column indicating the corresponding p-value&lt;br /&gt;
* An optional column indicating the sample size (if the sample size varies by marker)&lt;br /&gt;
&lt;br /&gt;
If you are carrying out a meta-analysis based on standard errors, you will need:&lt;br /&gt;
&lt;br /&gt;
* A column indicating the estimated effect size for each marker&lt;br /&gt;
* A column indicating the standard error of this effect size estimate&lt;br /&gt;
&lt;br /&gt;
The header for each of these columns must be specified so that METAL knows how to interpret the data. As noted below, additional columns including allele frequency information, strand information, and others can also be present.&lt;br /&gt;
&lt;br /&gt;
Here is a typical set of commands that would describe a table where the headers SNP, RefAllele, NonRefAllele, Pvalue and Beta correspond to the MARKER, ALLELE 1 and 2, PVALUE and EFFECT columns:&lt;br /&gt;
&lt;br /&gt;
  MARKERLABEL   SNP&lt;br /&gt;
  ALLELELABELS  RefAllele NonRefAllele&lt;br /&gt;
  PVALUELABEL   P-value&lt;br /&gt;
  EFFECTLABEL   Effect&lt;br /&gt;
&lt;br /&gt;
These can be abbreviated as:&lt;br /&gt;
&lt;br /&gt;
  MARKER        SNP&lt;br /&gt;
  ALLELE        RefAllele NonRefAllele&lt;br /&gt;
  PVALUE        P-value&lt;br /&gt;
  EFFECT        Effect&lt;br /&gt;
&lt;br /&gt;
=== Specifying Weights in P-value Based Analysis ===&lt;br /&gt;
&lt;br /&gt;
The weight for each MARKER can be stored in a column in the table (specified with the &amp;lt;code&amp;gt;WEIGHTLABEL&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;WEIGHT&amp;lt;/code&amp;gt; commands) or can be fixed for each file (in which case the fixed weight can be set with the &amp;lt;code&amp;gt;DEFAULTWEIGHT&amp;lt;/code&amp;gt; command).&lt;br /&gt;
&lt;br /&gt;
=== Reading Each Input File ===&lt;br /&gt;
&lt;br /&gt;
Once all appropriate headers have been specified, issuing the &amp;lt;code&amp;gt;PROCESS&amp;lt;/code&amp;gt; command will read an input file and update summary statistics to take the results it contains into account. Thus:&lt;br /&gt;
&lt;br /&gt;
  PROCESS      study1-results.tbl&lt;br /&gt;
&lt;br /&gt;
=== Performing the Final Analysis ===&lt;br /&gt;
&lt;br /&gt;
Once all input files have been processed, simply issue the &amp;lt;code&amp;gt;ANALYZE&amp;lt;/code&amp;gt; command to execute a meta-analysis. If you&#039;d like to execute interim analysis that include only a subset of the studies, issue the ANALYZE command after the corresponding input files have been processed.&lt;br /&gt;
&lt;br /&gt;
To allow for heterogeneity, use the &amp;lt;code&amp;gt;ANALYZE HETEROGENEITY&amp;lt;/code&amp;gt; command. This command will take a little longer to run, because it requires each input file to be examined twice. The METAL heterogeneity analysis requires a second pass of analysis to decide whether observed effect sizes (or test statistics) are homogeneous across samples.  The resulting heterogeneity statistic has n-1 degrees of freedom for n samples.&lt;br /&gt;
&lt;br /&gt;
METAL does not require that all input files report a result for every marker.  Any available data is used.  To restrict the output to only markers that have at least a specific number of individuals analysed (or weight), use a command like the following:&lt;br /&gt;
&lt;br /&gt;
  MINWEIGHT 10000&lt;br /&gt;
&lt;br /&gt;
For example to restrict the output to show only Markers with at least 10,000 individuals.&lt;br /&gt;
&lt;br /&gt;
== Additional Analysis Options ==&lt;br /&gt;
&lt;br /&gt;
=== Selecting an Analysis Scheme ===&lt;br /&gt;
&lt;br /&gt;
  SCHEME SAMPLESIZE        - default approach, uses p-value and direction of effect, weighted according to sample size&lt;br /&gt;
  SCHEME STDERR            - classical approach, uses effect size estimates and standard errors&lt;br /&gt;
&lt;br /&gt;
By default, METAL combines p-values across studies taking into account a study specific weight (typically, the sample size) and direction of effect. This behavior can be requested explicitly with the &amp;lt;code&amp;gt;SCHEME SAMPLESIZE&amp;lt;/code&amp;gt; command. An alternative can be requested with the &amp;lt;code&amp;gt;SCHEME STDERR&amp;lt;/code&amp;gt; command and weights effect size estimates using the inverse of the corresponding standard errors. While standard error based weights are more common in the biostatistical literature, if you decide to use this approach, it is very important to ensure that effect size estimates (&#039;&#039;beta&#039;&#039; coefficients) and standard errors use the same units in all studies (i.e. make sure that the exact same trait was examined in each study and that the same transformations were applied). Inconsistent use of measurement units across studies is the most common cause of discrepancies between these two analysis strategies. &lt;br /&gt;
&lt;br /&gt;
=== Genomic Control Correction ===&lt;br /&gt;
&lt;br /&gt;
   GENOMICCONTROL OFF      - the default, no adjustment to test statistics&lt;br /&gt;
   GENOMICCONTROL ON       - automatically correct test statistics to account for small amounts of population stratification or unaccounted for relatedness&lt;br /&gt;
   GENOMICCONTROL [value]  - correct test statistics using the specified inflation factor&lt;br /&gt;
&lt;br /&gt;
METAL has the ability to apply a genomic control correction to all input files.  METAL will estimate the inflation of the test statistic by comparing the median test statistic to that expected by chance, and then apply the genomic control correction to the p-values (for SAMPLESIZE weighted meta-analysis) or the standard error (for STDERR weighted meta-analysis).  This should only be applied to files with whole genome data (i.e. should not be used for settings where results are only available for a candidate locus or a small number of SNPs selected for follow-up of GWAS results). Genomic control settings can be customized for each input file.  We recommend applying genomic control correction to all input files that include genomewide data and, in addition, to the meta-analysis results. To apply genomic control to the meta-analysis results, just perform an initial meta-analysis and then load the initial set of results into METAL to get final, genomic control adjusted results.&lt;br /&gt;
&lt;br /&gt;
=== Strand Information ===&lt;br /&gt;
&lt;br /&gt;
   USESTRAND   ON&lt;br /&gt;
   STRANDLABEL StrandColumnHeading&lt;br /&gt;
&lt;br /&gt;
Input files can contain a column that indicates which strand the alleles are coded on (given as +/-).  If this column is present, you should issue the &amp;lt;code&amp;gt;USESTRAND ON&amp;lt;/code&amp;gt; command and specify an appropriate header with the &amp;lt;code&amp;gt;STRANDLABEL&amp;lt;/code&amp;gt; command.  If USESTRAND is off, the strand is assumed to be “+” for all SNPs, although obvious strand problems are identified by METAL and appropriately handled (for example, when one study provides A/G alleles and a different study provides C/T alleles).&lt;br /&gt;
&lt;br /&gt;
=== Filtering ===&lt;br /&gt;
&lt;br /&gt;
Custom filters can be used to select SNPs for inclusion in the meta-analysis.  This can be used, for example, to select SNPs within a specified minor-allele frequency range for analysis. &lt;br /&gt;
&lt;br /&gt;
Here are some possible filters:&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER N &amp;gt; 1000&lt;br /&gt;
   ADDFILTER MAF &amp;gt; 0.01&lt;br /&gt;
&lt;br /&gt;
Together, these two filters would only consider entries where the value in the N column is greater than 1000 and the value in the MAF column is also greater than 0.01.&lt;br /&gt;
&lt;br /&gt;
Filters can be defined using the &amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;=, =, != and IN operators. The IS operator tests membership in a set. For example to restrict analysis to three interesting SNPs, use:&lt;br /&gt;
&lt;br /&gt;
   ADDFILTER MARKER_ID IN (rs1234,rs123456,rs123)&lt;br /&gt;
&lt;br /&gt;
To remove all previously defined filters, use the command:&lt;br /&gt;
&lt;br /&gt;
   REMOVEFILTERS&lt;br /&gt;
&lt;br /&gt;
=== Verbose Mode ===&lt;br /&gt;
&lt;br /&gt;
   VERBOSE ON&lt;br /&gt;
&lt;br /&gt;
METAL allows for complete output of individual summary statistics for all SNPs in all input files.  This can create a very large file and should be used with caution.  Typically, one should create custom filters  to restrict analyses to interesting SNPs of interest before using this option.  This option can be useful for comparing direction of effect across many studies since METAL takes care of all the strand flipping and provides the direction of effect relative to the same allele.  This is also a way to double-check that the expected data are being used appropriately by METAL.&lt;br /&gt;
&lt;br /&gt;
=== Lenient Mode ===&lt;br /&gt;
 &lt;br /&gt;
    COLUMNCOUNTING STRICT         - requires expected number of columns in every row&lt;br /&gt;
    COLUMNCOUNTING LENIENT        - tries to interpret rows with fewer columns than expected&lt;br /&gt;
&lt;br /&gt;
By default, METAL will skip lines in each input file that don&#039;t have the expected number of columns. This is usually a good idea because it avoids producing incorrect results when a column is missing. Sometimes (for example, when there are optional extra columns at the end of each line), the &amp;lt;code&amp;gt;COLUMNCOUNTING LENIENT&amp;lt;/code&amp;gt; option can be useful.&lt;br /&gt;
&lt;br /&gt;
=== Tracking Allele Frequencies ===&lt;br /&gt;
&lt;br /&gt;
   AVERAGEFREQ ON&lt;br /&gt;
   MINMAXFREQ ON&lt;br /&gt;
&lt;br /&gt;
METAL can optionally track the effect allele frequency across all files and report its mean, minimum and maximum.  These can be quite useful to check that allele frequencies are similar across different cohorts after METAL performs all strand alignment. Large differences in allele frequencies across studies can suggest inconsistent naming of alleles across studies. METAL requires all input files to have an allele frequency column when this feature is turned on. To specify the column header for allele frequency information, use the &amp;lt;code&amp;gt;FREQLABEL&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Custom Variables ===&lt;br /&gt;
&lt;br /&gt;
We allow users to keep cumulative counts of custom variables across input files.  An example of this might be to keep track of the sample size when performing standard-error weighted meta-analysis.  The name of the custom variable should be defined once, before input files are loaded.  The corresponding column label in each input file can be specified using the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command. For example, to create a custom variable labeled TotalSampleSize that tallies the total of the N column across files, one could issue the commands:&lt;br /&gt;
&lt;br /&gt;
  CUSTOMVARIABLE TotalSampleSize&lt;br /&gt;
  LABEL TotalSampleSize as N&lt;br /&gt;
&lt;br /&gt;
If needed, the &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt; command can be used multiple times to customize column headers for each input file.&lt;br /&gt;
&lt;br /&gt;
=== Input File Recommendations ===&lt;br /&gt;
&lt;br /&gt;
We strongly recommend that both allele labels, corresponding to the the effect allele and non-effect allele, should be provided for all SNPs.  As long as both allele columns are given for each input file, METAL appropriately accounts for situations when different input files use different reference alleles. Alleles can be coded numerically (A=1,C=2,G=3,T=4) or alphabetically (A,C,G,T,a,c,g,t) and can be on either strand if not an A/T or C/G SNP.  For A/T or C/G SNPs, METAL requires SNPs to be on a consistent strand in different input files for the results to be interpretable.  For other SNPs, METAL can automatically identify and resolve strand inconsistencies. &lt;br /&gt;
&lt;br /&gt;
P-values that are &amp;amp;lt; 0.0, &amp;amp;gt; 1.0 or non-numeric will be treated as missing and generate a warning.  &lt;br /&gt;
&lt;br /&gt;
The EFFECT column can have positive and negative values (beta values from regression, for example), or simply directions of effect relative to the reference allele, listed as “+” and “-“.  An EFFECT of “+” (or any positive number) with respect to the reference allele A (or effect allele A), for example, represents a case where increasing number of copies of allele A are correlated with increasing trait values. For discrete traits, it is common to report odds ratios, which are always positive. In this case, to calculate the direction of effect, one should look at the log of the odds ratio. METAL can compute the odds ratio for you if you specify &amp;lt;code&amp;gt;EFFECT log(ODDS_RATIO_COLUMN)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To perform odds-ratio based meta-analysis, select SCHEME STDERR at the beginning of the script.  Then, for each file, provide the natural log of the odds ratio as the EFFECT column or another appropriate statistic (such as the corresponding regression coefficient from a logistic regression analysis).&lt;br /&gt;
&lt;br /&gt;
== Example: A METAL Meta-Analysis Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#THIS SCRIPT EXECUTES AN ANALYSIS OF EIGHT STUDIES&lt;br /&gt;
#THE RESULTS FOR EACH STUDY ARE STORED IN FILES Inputfile1.txt THROUGH Inputfile8.txt&lt;br /&gt;
&lt;br /&gt;
#LOAD THE FIRST EIGHT INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# UNCOMMENT THE NEXT LINE TO ENABLE GenomicControl CORRECTION&lt;br /&gt;
# GENOMICCONTROL ON&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIRST INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE REF_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile1.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SECOND INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile2.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE THIRD INPUT FILE ===&lt;br /&gt;
MARKER SNP&lt;br /&gt;
ALLELE A_REF OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE pvalue &lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile3.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FOURTH INPUT FILE ===&lt;br /&gt;
MARKER MARKERNAME&lt;br /&gt;
ALLELE EFFECTALLELE NON_EFFECT_ALLELE&lt;br /&gt;
EFFECT EFFECT1&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT NONMISS&lt;br /&gt;
PROCESS inputfile4.txt &lt;br /&gt;
&lt;br /&gt;
# === CARRY OUT AN INTERIM ANALYSIS OF THE FIRST FOUR FILES ===&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1to4_ .tbl&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
# LOAD THE NEXT FOUR INPUT FILES&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE FIFTH INPUT FILE ===&lt;br /&gt;
MARKER rsid&lt;br /&gt;
ALLELE EFFECT_ALLELE OTHER_ALLELE&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE Add_p&lt;br /&gt;
WEIGHT total_N&lt;br /&gt;
SEPARATOR COMMAS&lt;br /&gt;
PROCESS inputfile5.txt&lt;br /&gt;
&lt;br /&gt;
# === THE SIXTH INPUT FILE HAS THE SAME FORMAT AND CAN BE PROCESSED IMMEDIATELY ===&lt;br /&gt;
PROCESS inputfile6.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE SEVENTH INPUT FILE ===&lt;br /&gt;
ALLELE ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE PVALUE&lt;br /&gt;
WEIGHT N&lt;br /&gt;
SEPARATOR WHITESPACE&lt;br /&gt;
PROCESS inputfile7.txt&lt;br /&gt;
&lt;br /&gt;
# === DESCRIBE AND PROCESS THE NINTH INPUT FILE ===&lt;br /&gt;
ALLELE BETA_ALLELE OTHER_ALLELE&lt;br /&gt;
MARKER SNP&lt;br /&gt;
EFFECT BETA&lt;br /&gt;
PVALUE P_VAL&lt;br /&gt;
WEIGHT N&lt;br /&gt;
PROCESS inputfile8.txt &lt;br /&gt;
&lt;br /&gt;
#for the final meta-analysis of all 8 samples only output results if the&lt;br /&gt;
#combined weight is greater than 10000 people&lt;br /&gt;
&lt;br /&gt;
OUTFILE METAANALYSIS_inputfile1-8_ .tbl&lt;br /&gt;
MINWEIGHT 10000&lt;br /&gt;
ANALYZE &lt;br /&gt;
&lt;br /&gt;
QUIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cristen</name></author>
	</entry>
</feed>