<?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=Welchr</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=Welchr"/>
	<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/wiki/Special:Contributions/Welchr"/>
	<updated>2026-09-24T08:58:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=RAREMETALWORKER&amp;diff=15145</id>
		<title>RAREMETALWORKER</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=RAREMETALWORKER&amp;diff=15145"/>
		<updated>2019-11-20T17:34:13Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* PED and DAT Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:RAREMETALWORKER]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;RAREMETALWORKER&#039;&#039;&#039; is a tool for single variant analysis, generating summary statistics for gene level meta analyses in [http://genome.sph.umich.edu/wiki/RAREMETAL &#039;&#039;&#039;RAREMETAL&#039;&#039;&#039;].&lt;br /&gt;
&lt;br /&gt;
If you feel this program is useful, please tell us your name and contact in this [https://docs.google.com/spreadsheet/ccc?key=0AuYjznTeEDYudFpqUk9sQ2pkN3d3endjYldqMEp6ZUE&amp;amp;usp=sharing &#039;&#039;&#039;registration&#039;&#039;&#039;].&lt;br /&gt;
&lt;br /&gt;
If you have any questions, please contact Sai Chen (saichen at umich dot edu) or [[Goncalo_Abecasis | &#039;&#039;&#039;Goncalo Abecasis&#039;&#039;&#039;]] (goncalo at umich dot edu).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Useful Wiki Pages ==&lt;br /&gt;
&lt;br /&gt;
There are several pages in this Wiki that may be useful to RAREMETALWORKER users. Here are links to key pages:&lt;br /&gt;
* The [[RAREMETALWORKER_command_reference | &#039;&#039;&#039;RAREMETALWORKER command reference&#039;&#039;&#039;]]&lt;br /&gt;
* The [[RAREMETALWORKER_method | &#039;&#039;&#039;RAREMETALWORKER method&#039;&#039;&#039;]]&lt;br /&gt;
* The [[Tutorial:_RAREMETAL| &#039;&#039;&#039;RAREMETALWORKER quick start tutorial&#039;&#039;&#039;]]&lt;br /&gt;
* The [[RAREMETALWORKER_SPECIAL_TOPICS | &#039;&#039;&#039;RAREMETALWORKER special topics&#039;&#039;&#039;]]&lt;br /&gt;
* The [[RAREMETAL_Documentation | &#039;&#039;&#039;RAREMETAL documentation&#039;&#039;&#039;]]&lt;br /&gt;
* The [[RAREMETAL FAQ | &#039;&#039;&#039;FAQ&#039;&#039;&#039;]]&lt;br /&gt;
* The [[RAREMETAL_Change_Log | &#039;&#039;&#039;Change Log&#039;&#039;&#039;]]&lt;br /&gt;
&lt;br /&gt;
== Key Features ==&lt;br /&gt;
RAREMETALWORKER has the following features:&lt;br /&gt;
* Takes genotypes from either PED file or VCF file.&lt;br /&gt;
* Generates summary statistics for both related and unrelated individuals.&lt;br /&gt;
* Generates linkage disequilibrium matrices summarizing covariance between single marker statistics using an adjustable sliding window. &lt;br /&gt;
* Optionally handles related individuals using a kinship matrix derived from either pedigree or genotype data.&lt;br /&gt;
* Has the option of fitting shared environment.&lt;br /&gt;
* Can handle variants on Chromosome X.&lt;br /&gt;
* Calculates QC statistics such as hwe pvalue, call rate and genomic control.&lt;br /&gt;
* Automatically generate QQ and manhattan plots.&lt;br /&gt;
&lt;br /&gt;
== Software Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== DOWNLOAD ===&lt;br /&gt;
&lt;br /&gt;
We have tested compilation on several platforms including Linux, MAC OS X, and Windows. &lt;br /&gt;
&lt;br /&gt;
For source code and executables together with instructions of building from source, please go to [[RAREMETAL_DOWNLOAD_%26_BUILD |&#039;&#039;&#039;DOWNLOAD source and executables&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
For questions about building and compilation, please go to [[RAREMETAL_FAQ | &#039;&#039;&#039;FAQ&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
=== How to Execute ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* To execute the program, go to /RareMetalWorker_0.4.8/RareMetalWorker/bin, issue ./raremetalworker.&lt;br /&gt;
* For example command lines, please refer to [[RAREMETALWORKER#Example_Command_Lines | &#039;&#039;&#039;RAREMETALWORKER EXAMPLES&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
==Method==&lt;br /&gt;
&lt;br /&gt;
Method description and key formulae can be found in [http://genome.sph.umich.edu/wiki/RAREMETALWORKER_method &#039;&#039;&#039;RAREMETALWORKER METHOD&#039;&#039;&#039;].&lt;br /&gt;
&lt;br /&gt;
==For Binary Traits==&lt;br /&gt;
&lt;br /&gt;
RAREMETALWORKER currently treat all traits as quantitative. If your trait is binary, the odds ratio can be approximated from effect size estimates generated by RAREMETALWORKER. The installation/source package has a script included to augment the odds ratio estimates to the last column of the RAREMETALWORKER output. For details, please refer to [[RAREMETAL_DOWNLOAD_%26_BUILD#Calculating_Odds_Ratio_from_RAREMETALWORKER_output | &#039;&#039;&#039;Calculate Odds Ratio from RAREMETALWORKER output&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
== Software Specifications ==&lt;br /&gt;
&lt;br /&gt;
===INTERFACE===&lt;br /&gt;
&lt;br /&gt;
RAREMETALWORKER is a command line tool. Once you execute, you will see a full list of options printed on the screen. &lt;br /&gt;
&lt;br /&gt;
For detailed description of command options, please go to [[RAREMETALWORKER_command_reference | &#039;&#039;&#039;command reference&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
 Options:&lt;br /&gt;
       Input Files : --ped [], --dat [], --vcf [], --dosage, --noeof&lt;br /&gt;
      Output Files : --prefix [], --LDwindow [1000000], --zip, --thin,&lt;br /&gt;
                     --labelHits&lt;br /&gt;
        VC Options : --vcX, --separateX&lt;br /&gt;
     Trait Options : --makeResiduals, --inverseNormal, --traitName []&lt;br /&gt;
     Model Options : --recessive, --dominant&lt;br /&gt;
    Kinship Source : --kinPedigree, --kinGeno, --kinFile [], --kinxFile [],&lt;br /&gt;
                     --kinSave&lt;br /&gt;
   Kinship Options : --kinMaf [0.05], --kinMiss [0.05]&lt;br /&gt;
      Chromosome X : --xLabel [X], --xStart [2699520], --xEnd [154931044],&lt;br /&gt;
                     --maleLabel [1], --femaleLabel [2]&lt;br /&gt;
            others : --cpu [1], --kinOnly,&lt;br /&gt;
                     --geneMap [../data/refFlat_hg19.txt]&lt;br /&gt;
         PhoneHome : --noPhoneHome, --phoneHomeThinning [100]&lt;br /&gt;
&lt;br /&gt;
===INPUT FILE FORMAT===&lt;br /&gt;
&lt;br /&gt;
RMW needs the following files as input: PED and DAT file in Merlin format, &#039;&#039;&#039;AND/OR&#039;&#039;&#039; a VCF file. When genotypes are stored in PED and DAT file, the VCF file is not needed. However, even if genotypes are saved in a VCF file, PED and DAT files are still needed for carrying covariate and trait information. &lt;br /&gt;
&lt;br /&gt;
==== PED and DAT Files ====&lt;br /&gt;
* When PED file has genotypes saved, there is no need for a VCF file as input.&lt;br /&gt;
* RMW takes PED/DAT file in Merlin format. Please refer to [http://www.sph.umich.edu/csg/abecasis/merlin/tour/input_files.html PED/DAT format description] for details.&lt;br /&gt;
* PED file requires &amp;quot;dummy&amp;quot; parents to be included in the pedigree file. To check the integrity of your PED/DAT file, please use [http://www.sph.umich.edu/csg/abecasis/PedStats &#039;&#039;&#039;pedstats&#039;&#039;&#039;]. To add dummy parents into the pedigree, please use the [[Media:Script.tgz | &#039;&#039;&#039;perl script&#039;&#039;&#039;]].&lt;br /&gt;
* An example PED file is in the following:&lt;br /&gt;
     1 1 0 0 1 1.5 1 23 A A A A A A A A A A&lt;br /&gt;
     2 1 0 0 1 1.0 1 34 A C A C A C A C A C&lt;br /&gt;
     3 1 0 0 2 0.4 1 43 A A A A A A A A A A&lt;br /&gt;
     4 1 0 0 2 0.9 1 13 A C A C A C A C A C&lt;br /&gt;
* The matching DAT file is in the following:&lt;br /&gt;
  T YourTraitName&lt;br /&gt;
  C SEX&lt;br /&gt;
  C AGE&lt;br /&gt;
  M 1:123456&lt;br /&gt;
  M 1:234567&lt;br /&gt;
  M 2:111111&lt;br /&gt;
  M 2:222222&lt;br /&gt;
  M X:12345&lt;br /&gt;
* DAT file must have variant names in the following format &amp;quot;M chr:pos&amp;quot;. &lt;br /&gt;
* Orders of labels in DAT file have to match the order of fields in PED file. &lt;br /&gt;
* &#039;&#039;&#039;Markers in PED and DAT file must be sorted by chromosome and position.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Covariate and trait values are saved in PED file. Covariate and trait descriptions are saved in DAT file. Note that you must specify &amp;lt;code&amp;gt;--makeResiduals&amp;lt;/code&amp;gt; in order to adjust the covariates out of the phenotype. See [[RAREMETALWORKER#Example_Command_Lines | Example Command Lines]] for examples and [[RAREMETALWORKER_command_reference#Trait_Options | Trait Options]] for more information.&lt;br /&gt;
&lt;br /&gt;
==== VCF File ====&lt;br /&gt;
=====GENOTYPES=====&lt;br /&gt;
* Another option is to use VCF as input. Please refer to the following link for VCF file specification: [http://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant-call-format-version-41 1000 genome wiki VCF specs]&lt;br /&gt;
* VCF file should be compressed by bgzip and indexed by tabix, using the following command:&lt;br /&gt;
  bgzip input.vcf     ## this command will produce input.vcf.gz&lt;br /&gt;
  tabix -p vcf -f input.vcf.gz  ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
* Even with the presence of VCF file, PED/DAT files are still needed for covariates and phenotypes.&lt;br /&gt;
* Are you using PLINK file formats? Converting to VCF is easy. Use WDIST (very similar to PLINK) to make the conversion. Visit this page [https://www.cog-genomics.org/wdist/ | WDIST] to find documentation and downloads for WDIST.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When genotypes are saved in a VCF file, PED and DAT files are used for specifying pedigree structure, covariate and trait information. An example command line might look like this:&lt;br /&gt;
  --ped input.ped --dat input.dat --vcf input.vcf.gz&lt;br /&gt;
* When genotypes are saved in the PED file, the VCF file is not needed. An example command line might look like this:&lt;br /&gt;
  --ped input.ped --dat input.dat&lt;br /&gt;
&lt;br /&gt;
=====DOSAGE=====&lt;br /&gt;
* If you want to analyze dosage data from VCF file, the following option has to be specified: --dosage. A key word &amp;quot;DS&amp;quot; in FORMAT field in VCF file has to included accordingly. An example is in the following:&lt;br /&gt;
&lt;br /&gt;
  #CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	IDx	ID1	ID2	ID3&lt;br /&gt;
  22	16050408	37239779	T	C	.	PASS	AC=2;AN=496	GT:DS:GP	./.:.:0,0,0	./.:.:0,0,0	./.:.:0,0,0	&lt;br /&gt;
  22	16050933	37239784	G	A	.	PASS	AC=141;AN=904	GT:DS:GP	0/0:0.0:1,0,0	0/0:0.0:1,0,0	0/0:0.0:1,0,0&lt;br /&gt;
&lt;br /&gt;
* --noeof allows using VCF file without BGZF EOF markers. This is a very rare option to use. If your run is terminated with error message: &amp;quot;&amp;quot;, then you might want to check out this option.&lt;br /&gt;
&lt;br /&gt;
=== OUTPUT===&lt;br /&gt;
&lt;br /&gt;
====OUTPUT FILE NAMES====&lt;br /&gt;
&lt;br /&gt;
* Three files are generated automatically by default:&lt;br /&gt;
  prefix.traitName.singlevar.score.txt (single variant summary statistics and QC statistics)&lt;br /&gt;
  prefix.traitName.singlevar.cov.txt (covariance matrices of single variant score statistics)&lt;br /&gt;
  prefix.singlevar.log (log file)&lt;br /&gt;
&lt;br /&gt;
* If --zip option is used, then the following will be generated automatically:&lt;br /&gt;
  prefix.traitName.singlevar.score.txt.gz&lt;br /&gt;
  prefix.traitName.singlevar.score.txt.gz.tbi&lt;br /&gt;
  prefix.traitName.singlevar.cov.txt.gz&lt;br /&gt;
  prefix.traitName.singlevar.cov.txt.gz.tbi&lt;br /&gt;
  prefix.singlevar.log&lt;br /&gt;
&lt;br /&gt;
* If --recessive and/or --dominant options are used, then the following files are also generated &#039;&#039;&#039;in addition&#039;&#039;&#039; to the above files&lt;br /&gt;
  prefix.traitName.recessive.singlevar.score.txt.gz&lt;br /&gt;
  prefix.traitName.recessive.singlevar.cov.txt.gz&lt;br /&gt;
  prefix.traitName.dominant.singlevar.score.txt.gz&lt;br /&gt;
  prefix.traitName.dominant.singlevar.cov.txt.gz&lt;br /&gt;
&lt;br /&gt;
* If --kinGeno --kinSave is used, then the genomic relationship matrix is stored in&lt;br /&gt;
  prefix.Empirical.Kinship.gz&lt;br /&gt;
&lt;br /&gt;
* If --vcX option is used, then the genomic relationship matrix from chromosome X is stored in&lt;br /&gt;
  prefix.Empirical.KinshipX.gz&lt;br /&gt;
&lt;br /&gt;
====OUTPUT FILE FORMATS====&lt;br /&gt;
&lt;br /&gt;
=====Summary Statistics=====&lt;br /&gt;
* In the file with summary statistics named prefix.traitName.singlevar.score.txt contains summary statistics that are needed by Rare-Metal. An example is shown in below:&lt;br /&gt;
&lt;br /&gt;
 LDL mean= -0.00, variance=  1.00, heritability= 34.30 &lt;br /&gt;
 CHR       POS REF_ALLELE ALT_ALLELE  INFORMATIVE_N  FOUNDER_AF    ALL_AF  INFORMATIVE_AC  HWE_PVALUE      STAT  ALT_ALLELE_EFFSIZE        PVALUE&lt;br /&gt;
  10  45410002          G          A           6103    0.034159  0.034159             410    0.165893  126.2050            0.309798  4.030740e-10&lt;br /&gt;
  19  45412079          G          A           6103    0.036812  0.036812             434    0.714645 -265.8400           -0.587356  7.878510e-36&lt;br /&gt;
  19  45414451          G          A           6103    0.444989  0.444989            5312    0.075927  -26.1212           -0.008371  6.400580e-01&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* pvalues from the above output are from the family-based single variant score test.&lt;br /&gt;
&lt;br /&gt;
=====LD Matrices=====&lt;br /&gt;
* prefix.traitName.singlevar.cov.txt contains the LD matrix among a variant and the adjacent markers within a prefixed-sized window. The default window size is 1MB. It has the following format:&lt;br /&gt;
  &lt;br /&gt;
 CHR     POS                            VAR_POS_IN_WINDOW                                                                  LD_MATRIX&lt;br /&gt;
   1  762320   762320,865628,865665,878744,879381,1560000  0.0359084,-0.000242112,-0.00125797,-0.000993422,-0.000344509,-0.00017077,&lt;br /&gt;
   1  865628  865628,865665,878744,879381,1560000,1864659           0.419804,-0.0103663,-0.00635265,0.0594056,0.0534505,-0.00462183,&lt;br /&gt;
   1  878744        878744,879381,1560000,1864659,1877659             0.000404537,-0.000235215,-1.4455e-05,-8.69137e-06,-3.1027e-05,&lt;br /&gt;
&lt;br /&gt;
=====Genomic Relationship Matrix (GRM)=====&lt;br /&gt;
&lt;br /&gt;
* Once --kinGeno --kinSave --prefix options are requested, you would expect to see a GRM generated (compressed by gzip) with name yourprefix.Empirical.Kinship.gz. If --prefix option is not used, then the file name is Empirical.Kinship.gz. &lt;br /&gt;
* If --vcX --kinGeno --kinSave --prefix options are requested, besides the autosomal GRM, you would also expect to see a separate GRM for chromosome X saved (compressed by gzip also) under the name yourprefix.Empirical.KinshipX.gz. &lt;br /&gt;
* The GRMs are generated based on all genotyped individuals included in the PED file; samples with missing phenotype or missing covariates are not excluded from GRMs. This feature makes GRMs reusable if you have multiple traits to analyze in separate runs. You can simplely use --kinFile option (--kinxFile option if you have X chromosome GRM together with --vcX option issued) to reuse the pre-saved GRMs.&lt;br /&gt;
* The format for both autosomal and chromosome X GRMs are the same. The first row has all sample IDs (sample size=N) listed. The rest of the file is a symmetric matrix with dimention &#039;&#039;NxN&#039;&#039;, and element &#039;&#039;ij&#039;&#039; of this matrix represents the kinship between the &amp;lt;math&amp;gt;i^{th}&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;j^{th}&amp;lt;/math&amp;gt; sample whose ID can be found from the first row.&lt;br /&gt;
* For details about GRM calculation, please refer to [[RAREMETALWORKER_method | &#039;&#039;&#039;method&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
=====Log File=====&lt;br /&gt;
* RMW automatically generates a log file named &amp;quot;yourprefix.singlevar.log&amp;quot;. &lt;br /&gt;
* The first part of the log file has options used for your analysis saved.&lt;br /&gt;
&lt;br /&gt;
 The following parameters are in effect:&lt;br /&gt;
 &lt;br /&gt;
 Input Files:&lt;br /&gt;
 ============================&lt;br /&gt;
 --ped [pheno.ped]&lt;br /&gt;
 --dat [pheno.dat] &lt;br /&gt;
 --vcf [allvars.vcf.gz]&lt;br /&gt;
 --dosage [false]&lt;br /&gt;
 --noeof [false]&lt;br /&gt;
 &lt;br /&gt;
 Output Files:&lt;br /&gt;
 ============================&lt;br /&gt;
 --prefix [rmw.test]&lt;br /&gt;
 --LDwindow [1000000]&lt;br /&gt;
 --zip [false]&lt;br /&gt;
 --thin [false]&lt;br /&gt;
 --labelHits [false]&lt;br /&gt;
 &lt;br /&gt;
 VC Options:&lt;br /&gt;
 ============================&lt;br /&gt;
 --vcX [true]&lt;br /&gt;
 --separateX [true]&lt;br /&gt;
 &lt;br /&gt;
 Trait Options:&lt;br /&gt;
 ============================&lt;br /&gt;
 --makeResiduals [false]&lt;br /&gt;
 --inverseNormal [false]&lt;br /&gt;
 --traitName []&lt;br /&gt;
 &lt;br /&gt;
 Model Options:&lt;br /&gt;
 ============================&lt;br /&gt;
 --recessive [false]&lt;br /&gt;
 --dominant [false]&lt;br /&gt;
 &lt;br /&gt;
 Kinship Source:&lt;br /&gt;
 ============================&lt;br /&gt;
 --kinPedigree [true]&lt;br /&gt;
 --kinGeno [false]&lt;br /&gt;
 --kinFile []&lt;br /&gt;
 --kinxFile []&lt;br /&gt;
 --kinSave [false]&lt;br /&gt;
 &lt;br /&gt;
 Kinship Options:&lt;br /&gt;
 ============================&lt;br /&gt;
 --kinMaf [0.05]&lt;br /&gt;
 --kinMiss [0.05]&lt;br /&gt;
 &lt;br /&gt;
 Chromosome X:&lt;br /&gt;
 ============================&lt;br /&gt;
 xLabel [X]&lt;br /&gt;
 xStart [2699520]&lt;br /&gt;
 xEnd [154931044]&lt;br /&gt;
 maleLabel [1]&lt;br /&gt;
 femaleLabel [2]&lt;br /&gt;
&lt;br /&gt;
* The second part of the log file has all warnings and running messages saved.&lt;br /&gt;
&lt;br /&gt;
=====Plots=====&lt;br /&gt;
* RAREMETALWORKER generates QQ plot and Manhattan plots automatically, unless there are only trivial number of variants analyzed. &lt;br /&gt;
* RAREMETALWORKER stores plots of each trait in separate files named &#039;&#039;yourprefix.traitname.plots.pdf&#039;&#039;.&lt;br /&gt;
* RAREMETALWORKER stores plots for recessive and dominant results separated with files named &#039;&#039;yourprefix.traitname.recessive.plots.pdf&#039;&#039; and &#039;&#039;yourprefix.traitname.dominant.plots.pdf&#039;&#039;.&lt;br /&gt;
* RAREMETALWORKER automatically generates three stratified QQ plots, one with all variants, one with variants of maf&amp;lt;0.05, and one with variants of maf&amp;lt;0.01.&lt;br /&gt;
* Genomic controls are automatically calculated and labeled in QQ plots. &lt;br /&gt;
* By using --labelHits option, users can choose to label the hits. &lt;br /&gt;
* Here is an example QQ plot and manhattan plot generated by RAREMETALWORKER.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; width=&amp;quot;100&amp;quot; | [[File:QQ.png]]&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; width=&amp;quot;200&amp;quot; | [[File:Single_var_manhattan.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===SPECIAL TOPICS===&lt;br /&gt;
* For special topics such as how RAREMEALWORKER handles missing data, unrelated individuals, markers on chromosomeX, please go to [[RAREMETALWORKER_SPECIAL_TOPICS | &#039;&#039;&#039;SPECIAL TOPICS&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
== Example Command Lines ==&lt;br /&gt;
&lt;br /&gt;
The following list a few popular combinations of options used for analyses. For an itemized description of options, please go to [[RAREMETALWORKER_command_reference | &#039;&#039;&#039;COMMAND REFERENCE&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
===General Usage===&lt;br /&gt;
&lt;br /&gt;
* If your PED file has many traits but you only want one of them to be analyzed, then the following command does the trick:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --traitName BMI --prefix yourFavoritePrefix&lt;br /&gt;
&lt;br /&gt;
* If you want to inverse normalize (quantile normalize) your trait before doing associations, this can be done by adding --inverseNormal to your command line:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --traitName BMI --prefix yourFavoritePrefix --inverseNormal&lt;br /&gt;
&lt;br /&gt;
* The following command will adjust covariates first and then use residuals to proceed association:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --traitName BMI --prefix yourFavoritePrefix --makeResiduals&lt;br /&gt;
&lt;br /&gt;
* The following command will adjust covariates first and then use the inverse normalized residuals to proceed association:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --traitName BMI --prefix yourFavoritePrefix --makeResiduals --inverseNormal&lt;br /&gt;
&lt;br /&gt;
=== Related individuals ===&lt;br /&gt;
&lt;br /&gt;
* When pedigree is known and you want to use it to count for relatedness then the following command can be used:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --kinPedigree --prefix yourFavoritePrefix&lt;br /&gt;
&lt;br /&gt;
* When you want to an estimated genomic relationship matrix to count for relatedness then the following command can be used:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --prefix yourFavoritePrefix --kinGeno --kinSave (this will save the genomic relationship matrix for future use)&lt;br /&gt;
&lt;br /&gt;
* If the genomic relationship matrix has been saved previously, and you want to use it to count for relatedness then the following command can be used:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --prefix yourFavoritePrefix --kinFile yourPreviouslySavedKinship&lt;br /&gt;
&lt;br /&gt;
=== Unrelated individuals ===&lt;br /&gt;
&lt;br /&gt;
* To analyze individuals as unrelated, even if pedigree is known, you just have to use the following command:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --prefix yourFavoritePrefix&lt;br /&gt;
&lt;br /&gt;
===Analyzing Chromosome X===&lt;br /&gt;
&lt;br /&gt;
* To analyze markers on chromosome X, if relatedness is not considered, then no special options needs to be issued. &lt;br /&gt;
&lt;br /&gt;
* When relatedness is modeled using linear mixed model, and pedigree is known, then the following command fits use both autosomal kinship and chromosomeX kinship to fit a variance component model:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --kinPedigree --vcX --vcf yourInput.vcf.gz --prefix yourFavoritePrefix &lt;br /&gt;
&lt;br /&gt;
* Adding --separateX to the above command line will only use chromosome X kinship to fit the variance component model:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --kinPedigree --vcX --separateX --vcf yourInput.vcf.gz --prefix yourFavoritePrefix&lt;br /&gt;
&lt;br /&gt;
* Please refer to [[RAREMETALWORKER_method | &#039;&#039;&#039;METHODS&#039;&#039;&#039;]] for methods and [[RAREMETALWORKER_SPECIAL_TOPICS#Analyzing_Chromosome_X | &#039;&#039;&#039;SPECIAL TOPICS&#039;&#039;&#039;]] for technical details.&lt;br /&gt;
&lt;br /&gt;
===Using MERLIN format PED/DAT INPUT FILES===&lt;br /&gt;
* When genotypes are stored in MERLIN format PED/DAT files, command should be the same to do the above analysis, except --vcf option should be excluded.&lt;br /&gt;
* Please refer to [[RAREMETALWORKER#PED_and_DAT_Files | &#039;&#039;&#039;PED/DAT format&#039;&#039;&#039;]] for format requirements.&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
* For a comprehensive tutorial of RMW and RAREMETAL using example data sets, please go to the following:&lt;br /&gt;
&lt;br /&gt;
  [http://genome.sph.umich.edu/wiki/Tutorial:_RareMETAL &#039;&#039;&#039;RAREMETAL and RAREMETALWORKER Tutorial&#039;&#039;&#039;]&lt;/div&gt;</summary>
		<author><name>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=Talk:METAL_Documentation&amp;diff=15144</id>
		<title>Talk:METAL Documentation</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=Talk:METAL_Documentation&amp;diff=15144"/>
		<updated>2019-11-13T20:41:48Z</updated>

		<summary type="html">&lt;p&gt;Welchr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The website said &amp;quot;The joint meta-analysis method has been implemented though a patch to METAL available from http://www.sph.umich.edu/csg/abecasis/Meta&amp;quot;. However, I can not use SCHEME INTERACTION. I used lasted version of METAL. where I can find the patch?&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
---------&lt;br /&gt;
&lt;br /&gt;
Hi Cindy, &lt;br /&gt;
&lt;br /&gt;
It seems as though this patch never made it into the main METAL codebase (https://github.com/statgen/METAL). From what I can gather, it was used in the following paper: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3312394/. Alisa Manning looks to be who posted it on this wiki originally, and she is the first author on the paper. You could try contacting her to see if she still has the code. &lt;br /&gt;
&lt;br /&gt;
Regards, &lt;br /&gt;
&lt;br /&gt;
Ryan Welch&lt;/div&gt;</summary>
		<author><name>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=15034</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=15034"/>
		<updated>2018-05-16T17:00:39Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* METAL formatted 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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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.7+] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 3.0+]. Note that if using R 3.1, you must install LocusZoom 1.3 (previous versions will fail.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK]&lt;br /&gt;
*[http://samtools.sourceforge.net/ tabix], downloaded with samtools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://github.com/statgen/locuszoom-standalone download] page. The current version is &#039;&#039;&#039;1.3&#039;&#039;&#039;, released on June 20th, 2014.  &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. 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;
== Download == &lt;br /&gt;
&lt;br /&gt;
See our [https://github.com/statgen/locuszoom-standalone 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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Install tabix ===&lt;br /&gt;
&lt;br /&gt;
Tabix is used to quickly extract regions from bgzipped and tabix-indexed files. It is used in LocusZoom to extract regions from VCF files when calculating LD, and for extracting from EPACTS result files. &lt;br /&gt;
&lt;br /&gt;
It can be downloaded from the sourceforge site [http://samtools.sourceforge.net/ here] or directly to the download site [http://sourceforge.net/projects/samtools/files/ here].&lt;br /&gt;
&lt;br /&gt;
=== Step 6: 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 and hg19&#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;
***dbmeister.py (script for creating custom user databases)&lt;br /&gt;
***lzupdate.py (script for creating an updated copy of the provided locuszoom database)&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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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; | chr4:401141 &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;
Markers can be either rsIDs or chr:pos format (see above). &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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#00CC33&amp;quot;&amp;gt;&#039;&#039;&#039;Note&#039;&#039;&#039;&amp;lt;/span&amp;gt;: LocusZoom (as of 1.3) will now use the tabix index for the EPACTS file if it exists and if tabix is intalled on your system. This results in much faster loading of EPACTS files and should absolutely be used if possible. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;Warning&#039;&#039;&#039;&amp;lt;/span&amp;gt;: The &amp;quot;test&amp;quot; version of EPACTS changed the format of the output. To make LZ work, you&#039;ll also need to add &amp;lt;code&amp;gt;--epacts-beg-col BEG&amp;lt;/code&amp;gt; to your command line.&lt;br /&gt;
&lt;br /&gt;
==== Reading from STDIN ====&lt;br /&gt;
&lt;br /&gt;
If you have a quick way of pulling out regions from your association results to plot (such as with tabix), you can pass the data directly to locuszoom on STDIN by specifying the file as &amp;quot;-&amp;quot;. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tabix -h my_file.gz 1:1-10000 | locuszoom --metal - --refgene TCF7L2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In version 1.3, if you have VCF files separated out by chromosome, you can create a JSON file mapping chromosome name --&amp;gt; VCF file, and provide the JSON file to --ld-vcf. For example, the JSON file could look like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;X&amp;quot;: &amp;quot;/path/to/X.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;Y&amp;quot;: &amp;quot;/path/to/Y.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;MT&amp;quot;: &amp;quot;/path/to/MT.vcf.gz&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then pass it directly using &amp;lt;code&amp;gt;locuszoom --ld-vcf my_vcfs.json&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole-cat_significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example of a method generating such a set of SNPs.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&lt;br /&gt;
&lt;br /&gt;
=== Plotting BED tracks ===&lt;br /&gt;
&lt;br /&gt;
You can supply locuszoom with a BED file, and the tracks within it will be added to the plot. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:Bed_tracks.png]]&lt;br /&gt;
&lt;br /&gt;
Use the --bed-tracks option, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom ... --bed-tracks &amp;lt;your bed file&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BED file should have at least 4 columns: the first 3 for chr/start/end, and the 4th column for the label of the track. It must be &#039;&#039;&#039;tab-delimited&#039;&#039;&#039;, not white-space delimited. &lt;br /&gt;
&lt;br /&gt;
Color can also be specified, but the BED file then needs to follow the full [http://genome.ucsc.edu/FAQ/FAQformat.html#format1 BED format].&lt;br /&gt;
&lt;br /&gt;
=== Specify gene table (refFlat, GENCODE, etc.) ===&lt;br /&gt;
&lt;br /&gt;
You can now specify a different gene information table to use. LocusZoom provides both refFlat and GENCODE. refFlat is the default. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --gene-table gencode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;. 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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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 -log10 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;
New/fixed options in 1.3: &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;
| colorCol=NULL&lt;br /&gt;
| Specify the name of a column in association results file denoting the color each marker should be. This disables coloring by LD. For the column values, color names should be used, for example &amp;quot;red&amp;quot; &amp;quot;olivedrab&amp;quot; etc. &lt;br /&gt;
|-&lt;br /&gt;
| signifLine=NULL&lt;br /&gt;
| Specify (in -log10 p-value scale) where to place a horizontal significance line. Can have multiple lines, e.g. signifLine=&amp;quot;7.3,9&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineColor=NULL&lt;br /&gt;
| Specify color of each significance line, e.g. signifLineColor=&amp;quot;red,blue&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineWidth=NULL&lt;br /&gt;
| Specify the line width for each significance line, e.g. signifLineWidth=&amp;quot;2,3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| showIso=F&lt;br /&gt;
| Show genes as isoforms, rather than collapsed into one canonical transcript. To enable use showIso=T&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options: &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;
=== 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 --build hg18 --source hapmap&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 custom SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide SQLite databases based on UCSC human genome &#039;&#039;&#039;build hg18 and hg19&#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;
=== Updating the existing locuszoom database(s) ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom now comes with a database updating script &amp;lt;code&amp;gt;bin/lzupdate.py&amp;lt;/code&amp;gt;. This script can download the necessary data from UCSC, NCBI, NGHRI, and GENCODE to create an up-to-date database file. The script performs the following actions: &lt;br /&gt;
&lt;br /&gt;
# Download latest SNP table from UCSC for the given build&lt;br /&gt;
# Reformat SNP table for insertion into sqlite database&lt;br /&gt;
# Download latest refFlat from UCSC for the given build&lt;br /&gt;
# Reformat refFlat for insertion into sqlite database&lt;br /&gt;
# (optional) Download GENCODE annotation file from GENCODE FTP site&lt;br /&gt;
# Download RsMergeArch from NCBI&lt;br /&gt;
# Write formatted translation table for old rsIDs to latest (from RsMergeArch)&lt;br /&gt;
# Create a SNP set file (for indicating rug of markers at top of plot for different genotyping arrays)&lt;br /&gt;
# Download the latest NHGRI GWAS catalog&lt;br /&gt;
# Format catalog for use with locuszoom&lt;br /&gt;
# Call &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; to insert everything above (except the GWAS catalog file, which remains a separate file)&lt;br /&gt;
&lt;br /&gt;
An example of running the script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bin/lzupdate.py --build hg19 --gencode 19 --gwas-cat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script will NOT overwrite the existing locuszoom database, since you should likely back it up first (under data/database/*.db). After running the script you should have both a new locuszoom.db file, and a gwas catalog file. You can then either overwrite the locuszoom database after backing it up, or you could place them in a different location and modify the conf file accordingly. The script will provide instructions after running for how to do this. &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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=14991</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=14991"/>
		<updated>2017-12-22T19:52:43Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Sample Overlap Correction */&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). Most commonly, the weight will be the number of individuals contributing to that particular p-value.&lt;br /&gt;
&lt;br /&gt;
  WEIGHTLABEL     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;
  WEIGHTLABEL     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;
=== Sample Overlap Correction ===&lt;br /&gt;
&lt;br /&gt;
Correction for sample overlap in sample size weighted meta-analysis (developed by Sebanti Sengupta and implemented by Daniel Taliun). &lt;br /&gt;
&lt;br /&gt;
First, METAL estimates the number of individuals that are common among two or more studies based on Z-statistics from each study. Then, METAL adjusts for sample overlap when calculating overall Z-statistics by correcting the weights with the estimated number of individuals in common.&lt;br /&gt;
&lt;br /&gt;
To enable correction for sample overlap in your sample size weighted meta-analysis, use OVERLAP ON command (valid only with SCHEME SAMPLESIZE). By default, METAL uses Z-statistics &amp;lt;1 for esimating the number of individuals that are common among studies. To change this threshold, use ZCUTOFF [number] command.&lt;br /&gt;
&lt;br /&gt;
More information on the method can be found in: &lt;br /&gt;
&lt;br /&gt;
* [[media:METAL_sample_overlap_2017-11-15.pptx|Method overview and results]]&lt;br /&gt;
* [[media:METAL_sample_overlap_method_2017-11-15.pdf|Full method description]] (current draft, manuscript est. 2018)&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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=File:METAL_sample_overlap_method_2017-11-15.pdf&amp;diff=14990</id>
		<title>File:METAL sample overlap method 2017-11-15.pdf</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=File:METAL_sample_overlap_method_2017-11-15.pdf&amp;diff=14990"/>
		<updated>2017-12-22T19:48:28Z</updated>

		<summary type="html">&lt;p&gt;Welchr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=METAL_Documentation&amp;diff=14989</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=14989"/>
		<updated>2017-12-22T19:40:46Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Additional Analysis Options */&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). Most commonly, the weight will be the number of individuals contributing to that particular p-value.&lt;br /&gt;
&lt;br /&gt;
  WEIGHTLABEL     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;
  WEIGHTLABEL     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;
=== Sample Overlap Correction ===&lt;br /&gt;
&lt;br /&gt;
Correction for sample overlap in sample size weighted meta-analysis (developed by Sebanti Sengupta and implemented by Daniel Taliun). &lt;br /&gt;
&lt;br /&gt;
First, METAL estimates the number of individuals that are common among two or more studies based on Z-statistics from each study. Then, METAL adjusts for sample overlap when calculating overall Z-statistics by correcting the weights with the estimated number of individuals in common.&lt;br /&gt;
&lt;br /&gt;
To enable correction for sample overlap in your sample size weighted meta-analysis, use OVERLAP ON command (valid only with SCHEME SAMPLESIZE). By default, METAL uses Z-statistics &amp;lt;1 for esimating the number of individuals that are common among studies. To change this threshold, use ZCUTOFF [number] command.&lt;br /&gt;
&lt;br /&gt;
Details on the method can be found in [[media:METAL_sample_overlap_2017-11-15.pptx|these slides]], and eventually as a manuscript (est. 2018). &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=File:METAL_sample_overlap_2017-11-15.pptx&amp;diff=14988</id>
		<title>File:METAL sample overlap 2017-11-15.pptx</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=File:METAL_sample_overlap_2017-11-15.pptx&amp;diff=14988"/>
		<updated>2017-12-22T19:35:20Z</updated>

		<summary type="html">&lt;p&gt;Welchr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=CSG_Tech_Talks&amp;diff=14818</id>
		<title>CSG Tech Talks</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=CSG_Tech_Talks&amp;diff=14818"/>
		<updated>2017-07-26T17:14:56Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Upcoming Schedule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Center for Statistical Genetics (CSG) is hosting a series of talks to help people working in the field of statistical genetics, or applied statistics in general, become more knowledgeable about the technical tools available to them.  &lt;br /&gt;
&lt;br /&gt;
We will be hosting meetings during the summer on alternating Wednesdays at 2pm at SPH2 (in room 1152 unless otherwise noted).&lt;br /&gt;
&lt;br /&gt;
To be notified of upcoming presentations, you may add your e-mail address to the csg-tech-talks@umich.edu mailing list on [https://mcommunity.umich.edu MCommunity]&lt;br /&gt;
&lt;br /&gt;
To suggest topic or volunteer to present, please email Matthew at mflick@umich.edu&lt;br /&gt;
&lt;br /&gt;
== Upcoming Schedule ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* July 26, 2pm - SPH2 M1152 - &#039;&#039;&#039;Make and Snakemake&#039;&#039;&#039; by Matthew Flickinger, Ryan Welch&lt;br /&gt;
** [https://github.com/welchr/csg-snakemake/raw/master/materials/tech_talk_snakemake_20170726.pptx Slides]&lt;br /&gt;
** [https://github.com/welchr/csg-snakemake Github]&lt;br /&gt;
&lt;br /&gt;
== Presentation Slides ==&lt;br /&gt;
&lt;br /&gt;
* [[Media:Dplyr_tidyverse.pdf| dplyr and the tidyverse by Matthew Flickinger (July 12, 2017)]] -[https://gist.githubusercontent.com/MrFlick/4297321683f9b3d483a4303e5acd586e/raw/716e2668d483d21e402ddb33dd618168ec697fe0/dplyr_tidyverse.Rmd Markdown Document] - [[Media:Dplyr_tidyverse_md.pdf| Rendered Markdown]]&lt;br /&gt;
* [[Media:Cplusplus11-features-and-tricks.pdf| C++11 Features and Tricks by Daniel Taliun (Jul 28, 2016)]]&lt;br /&gt;
* [[Media:ReproducibleResearch-TechTalk.pdf| Reproducible Research by Matthew Flickinger (Jul 14, 2016)]]&lt;br /&gt;
* [[Media:Julia_presentation.pdf| The Julia Manifesto by Jonathon LeFaive (Jun 30, 2016)]]&lt;br /&gt;
* [https://github.com/welchr/csg-jupyter-tutorial Quick introduction to the jupyter notebook by Ryan Welch (Jun 02, 2016)]&lt;br /&gt;
* [[Media:TechTalk-RTroubleshooting.pdf| What R You Doing? (Answering Your Own R Questions) by Matthew Flickinger (May 19, 2016)]]&lt;br /&gt;
* [[Media:Brooksisms.ppt| Brookisms And Other Nuggets of Programming Wisdom by Chris Clark (May 12, 2016)]]&lt;/div&gt;</summary>
		<author><name>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=CSG_Tech_Talks&amp;diff=14817</id>
		<title>CSG Tech Talks</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=CSG_Tech_Talks&amp;diff=14817"/>
		<updated>2017-07-26T17:12:59Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Upcoming Schedule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Center for Statistical Genetics (CSG) is hosting a series of talks to help people working in the field of statistical genetics, or applied statistics in general, become more knowledgeable about the technical tools available to them.  &lt;br /&gt;
&lt;br /&gt;
We will be hosting meetings during the summer on alternating Wednesdays at 2pm at SPH2 (in room 1152 unless otherwise noted).&lt;br /&gt;
&lt;br /&gt;
To be notified of upcoming presentations, you may add your e-mail address to the csg-tech-talks@umich.edu mailing list on [https://mcommunity.umich.edu MCommunity]&lt;br /&gt;
&lt;br /&gt;
To suggest topic or volunteer to present, please email Matthew at mflick@umich.edu&lt;br /&gt;
&lt;br /&gt;
== Upcoming Schedule ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* July 26, 2pm - SPH2 M1152 - &#039;&#039;&#039;Make and Snakemake&#039;&#039;&#039; by Matthew Flickinger, Ryan Welch&lt;br /&gt;
** Slides&lt;br /&gt;
** Github&lt;br /&gt;
&lt;br /&gt;
== Presentation Slides ==&lt;br /&gt;
&lt;br /&gt;
* [[Media:Dplyr_tidyverse.pdf| dplyr and the tidyverse by Matthew Flickinger (July 12, 2017)]] -[https://gist.githubusercontent.com/MrFlick/4297321683f9b3d483a4303e5acd586e/raw/716e2668d483d21e402ddb33dd618168ec697fe0/dplyr_tidyverse.Rmd Markdown Document] - [[Media:Dplyr_tidyverse_md.pdf| Rendered Markdown]]&lt;br /&gt;
* [[Media:Cplusplus11-features-and-tricks.pdf| C++11 Features and Tricks by Daniel Taliun (Jul 28, 2016)]]&lt;br /&gt;
* [[Media:ReproducibleResearch-TechTalk.pdf| Reproducible Research by Matthew Flickinger (Jul 14, 2016)]]&lt;br /&gt;
* [[Media:Julia_presentation.pdf| The Julia Manifesto by Jonathon LeFaive (Jun 30, 2016)]]&lt;br /&gt;
* [https://github.com/welchr/csg-jupyter-tutorial Quick introduction to the jupyter notebook by Ryan Welch (Jun 02, 2016)]&lt;br /&gt;
* [[Media:TechTalk-RTroubleshooting.pdf| What R You Doing? (Answering Your Own R Questions) by Matthew Flickinger (May 19, 2016)]]&lt;br /&gt;
* [[Media:Brooksisms.ppt| Brookisms And Other Nuggets of Programming Wisdom by Chris Clark (May 12, 2016)]]&lt;/div&gt;</summary>
		<author><name>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=14714</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=14714"/>
		<updated>2017-05-31T18:28:16Z</updated>

		<summary type="html">&lt;p&gt;Welchr: &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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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.7+] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 3.0+]. Note that if using R 3.1, you must install LocusZoom 1.3 (previous versions will fail.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK]&lt;br /&gt;
*[http://samtools.sourceforge.net/ tabix], downloaded with samtools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://github.com/statgen/locuszoom-standalone download] page. The current version is &#039;&#039;&#039;1.3&#039;&#039;&#039;, released on June 20th, 2014.  &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. 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;
== Download == &lt;br /&gt;
&lt;br /&gt;
See our [https://github.com/statgen/locuszoom-standalone 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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Install tabix ===&lt;br /&gt;
&lt;br /&gt;
Tabix is used to quickly extract regions from bgzipped and tabix-indexed files. It is used in LocusZoom to extract regions from VCF files when calculating LD, and for extracting from EPACTS result files. &lt;br /&gt;
&lt;br /&gt;
It can be downloaded from the sourceforge site [http://samtools.sourceforge.net/ here] or directly to the download site [http://sourceforge.net/projects/samtools/files/ here].&lt;br /&gt;
&lt;br /&gt;
=== Step 6: 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 and hg19&#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;
***dbmeister.py (script for creating custom user databases)&lt;br /&gt;
***lzupdate.py (script for creating an updated copy of the provided locuszoom database)&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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#00CC33&amp;quot;&amp;gt;&#039;&#039;&#039;Note&#039;&#039;&#039;&amp;lt;/span&amp;gt;: LocusZoom (as of 1.3) will now use the tabix index for the EPACTS file if it exists and if tabix is intalled on your system. This results in much faster loading of EPACTS files and should absolutely be used if possible. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;Warning&#039;&#039;&#039;&amp;lt;/span&amp;gt;: The &amp;quot;test&amp;quot; version of EPACTS changed the format of the output. To make LZ work, you&#039;ll also need to add &amp;lt;code&amp;gt;--epacts-beg-col BEG&amp;lt;/code&amp;gt; to your command line.&lt;br /&gt;
&lt;br /&gt;
==== Reading from STDIN ====&lt;br /&gt;
&lt;br /&gt;
If you have a quick way of pulling out regions from your association results to plot (such as with tabix), you can pass the data directly to locuszoom on STDIN by specifying the file as &amp;quot;-&amp;quot;. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tabix -h my_file.gz 1:1-10000 | locuszoom --metal - --refgene TCF7L2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In version 1.3, if you have VCF files separated out by chromosome, you can create a JSON file mapping chromosome name --&amp;gt; VCF file, and provide the JSON file to --ld-vcf. For example, the JSON file could look like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;X&amp;quot;: &amp;quot;/path/to/X.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;Y&amp;quot;: &amp;quot;/path/to/Y.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;MT&amp;quot;: &amp;quot;/path/to/MT.vcf.gz&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then pass it directly using &amp;lt;code&amp;gt;locuszoom --ld-vcf my_vcfs.json&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole-cat_significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example of a method generating such a set of SNPs.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&lt;br /&gt;
&lt;br /&gt;
=== Plotting BED tracks ===&lt;br /&gt;
&lt;br /&gt;
You can supply locuszoom with a BED file, and the tracks within it will be added to the plot. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:Bed_tracks.png]]&lt;br /&gt;
&lt;br /&gt;
Use the --bed-tracks option, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom ... --bed-tracks &amp;lt;your bed file&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BED file should have at least 4 columns: the first 3 for chr/start/end, and the 4th column for the label of the track. It must be &#039;&#039;&#039;tab-delimited&#039;&#039;&#039;, not white-space delimited. &lt;br /&gt;
&lt;br /&gt;
Color can also be specified, but the BED file then needs to follow the full [http://genome.ucsc.edu/FAQ/FAQformat.html#format1 BED format].&lt;br /&gt;
&lt;br /&gt;
=== Specify gene table (refFlat, GENCODE, etc.) ===&lt;br /&gt;
&lt;br /&gt;
You can now specify a different gene information table to use. LocusZoom provides both refFlat and GENCODE. refFlat is the default. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --gene-table gencode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;. 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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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 -log10 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;
New/fixed options in 1.3: &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;
| colorCol=NULL&lt;br /&gt;
| Specify the name of a column in association results file denoting the color each marker should be. This disables coloring by LD. For the column values, color names should be used, for example &amp;quot;red&amp;quot; &amp;quot;olivedrab&amp;quot; etc. &lt;br /&gt;
|-&lt;br /&gt;
| signifLine=NULL&lt;br /&gt;
| Specify (in -log10 p-value scale) where to place a horizontal significance line. Can have multiple lines, e.g. signifLine=&amp;quot;7.3,9&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineColor=NULL&lt;br /&gt;
| Specify color of each significance line, e.g. signifLineColor=&amp;quot;red,blue&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineWidth=NULL&lt;br /&gt;
| Specify the line width for each significance line, e.g. signifLineWidth=&amp;quot;2,3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| showIso=F&lt;br /&gt;
| Show genes as isoforms, rather than collapsed into one canonical transcript. To enable use showIso=T&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options: &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;
=== 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 --build hg18 --source hapmap&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 custom SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide SQLite databases based on UCSC human genome &#039;&#039;&#039;build hg18 and hg19&#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;
=== Updating the existing locuszoom database(s) ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom now comes with a database updating script &amp;lt;code&amp;gt;bin/lzupdate.py&amp;lt;/code&amp;gt;. This script can download the necessary data from UCSC, NCBI, NGHRI, and GENCODE to create an up-to-date database file. The script performs the following actions: &lt;br /&gt;
&lt;br /&gt;
# Download latest SNP table from UCSC for the given build&lt;br /&gt;
# Reformat SNP table for insertion into sqlite database&lt;br /&gt;
# Download latest refFlat from UCSC for the given build&lt;br /&gt;
# Reformat refFlat for insertion into sqlite database&lt;br /&gt;
# (optional) Download GENCODE annotation file from GENCODE FTP site&lt;br /&gt;
# Download RsMergeArch from NCBI&lt;br /&gt;
# Write formatted translation table for old rsIDs to latest (from RsMergeArch)&lt;br /&gt;
# Create a SNP set file (for indicating rug of markers at top of plot for different genotyping arrays)&lt;br /&gt;
# Download the latest NHGRI GWAS catalog&lt;br /&gt;
# Format catalog for use with locuszoom&lt;br /&gt;
# Call &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; to insert everything above (except the GWAS catalog file, which remains a separate file)&lt;br /&gt;
&lt;br /&gt;
An example of running the script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bin/lzupdate.py --build hg19 --gencode 19 --gwas-cat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script will NOT overwrite the existing locuszoom database, since you should likely back it up first (under data/database/*.db). After running the script you should have both a new locuszoom.db file, and a gwas catalog file. You can then either overwrite the locuszoom database after backing it up, or you could place them in a different location and modify the conf file accordingly. The script will provide instructions after running for how to do this. &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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=CSG_Tech_Talks&amp;diff=14192</id>
		<title>CSG Tech Talks</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=CSG_Tech_Talks&amp;diff=14192"/>
		<updated>2016-06-02T20:34:40Z</updated>

		<summary type="html">&lt;p&gt;Welchr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Center for Statistical Genetics (CSG) is hosting a series of talks to help people working in the field of statistical genetics, or applied statistics in general, become more knowledgeable about the technical tools available to them.  &lt;br /&gt;
&lt;br /&gt;
We will be hosting meetings during the summer on Thursdays at 2pm at SPH2 (in room 1152 unless otherwise noted).&lt;br /&gt;
&lt;br /&gt;
To be notified of upcoming presentations, you may add your e-mail address to the csg-tech-talks@umich.edu mailing list on [https://mcommunity.umich.edu MCommunity]&lt;br /&gt;
&lt;br /&gt;
To suggest topic or volunteer to present, please email Matthew at mflick@umich.edu&lt;br /&gt;
&lt;br /&gt;
== Presentation List ==&lt;br /&gt;
&lt;br /&gt;
* [[Media:TechTalk-RTroubleshooting.pdf| What R You Doing? (Answering Your Own R Questions) by Matthew Flickinger (May 19, 2016)]]&lt;br /&gt;
* [http://genome.sph.umich.edu/w/images/c/c5/Brooksisms.ppt Brooksisms And Other Nuggets of Programming Wisdom by Chris Clark (May 12, 2016)]&lt;br /&gt;
* [https://github.com/welchr/csg-jupyter-tutorial Quick introduction to the jupyter notebook by Ryan Welch (Jun 02, 2016)]&lt;/div&gt;</summary>
		<author><name>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=14161</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=14161"/>
		<updated>2016-05-02T21:04:05Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Plotting BED tracks */&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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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.7+] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 3.0+]. Note that if using R 3.1, you must install LocusZoom 1.3 (previous versions will fail.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK]&lt;br /&gt;
*[http://samtools.sourceforge.net/ tabix], downloaded with samtools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.3&#039;&#039;&#039;, released on June 20th, 2014.  &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. 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;
== 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;
== Changes in Version 1.3 == &lt;br /&gt;
&lt;br /&gt;
New features: &lt;br /&gt;
&lt;br /&gt;
* Database and GWAS catalog files updated for hg19&lt;br /&gt;
* [[#Plotting BED tracks| Adding BED tracks]]&lt;br /&gt;
* [[#Updating the existing locuszoom database(s)| Update locuszoom&#039;s database without waiting for a release]]&lt;br /&gt;
* [[#Specify gene table (refFlat, GENCODE, etc.) | Use different gene information tables + GENCODE support]]&lt;br /&gt;
* [[#EPACTS formatted file|Support for tabix indexed EPACTS files]]&lt;br /&gt;
* [[#Reading from STDIN| Read data from STDIN]]&lt;br /&gt;
* [[#Plotting options| New plotting options for color, significance lines]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Provide multiple chromosome separated VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&lt;br /&gt;
&lt;br /&gt;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Install tabix ===&lt;br /&gt;
&lt;br /&gt;
Tabix is used to quickly extract regions from bgzipped and tabix-indexed files. It is used in LocusZoom to extract regions from VCF files when calculating LD, and for extracting from EPACTS result files. &lt;br /&gt;
&lt;br /&gt;
It can be downloaded from the sourceforge site [http://samtools.sourceforge.net/ here] or directly to the download site [http://sourceforge.net/projects/samtools/files/ here].&lt;br /&gt;
&lt;br /&gt;
=== Step 6: 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 and hg19&#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;
***dbmeister.py (script for creating custom user databases)&lt;br /&gt;
***lzupdate.py (script for creating an updated copy of the provided locuszoom database)&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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#00CC33&amp;quot;&amp;gt;&#039;&#039;&#039;Note&#039;&#039;&#039;&amp;lt;/span&amp;gt;: LocusZoom (as of 1.3) will now use the tabix index for the EPACTS file if it exists and if tabix is intalled on your system. This results in much faster loading of EPACTS files and should absolutely be used if possible. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;Warning&#039;&#039;&#039;&amp;lt;/span&amp;gt;: The &amp;quot;test&amp;quot; version of EPACTS changed the format of the output. To make LZ work, you&#039;ll also need to add &amp;lt;code&amp;gt;--epacts-beg-col BEG&amp;lt;/code&amp;gt; to your command line.&lt;br /&gt;
&lt;br /&gt;
==== Reading from STDIN ====&lt;br /&gt;
&lt;br /&gt;
If you have a quick way of pulling out regions from your association results to plot (such as with tabix), you can pass the data directly to locuszoom on STDIN by specifying the file as &amp;quot;-&amp;quot;. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tabix -h my_file.gz 1:1-10000 | locuszoom --metal - --refgene TCF7L2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In version 1.3, if you have VCF files separated out by chromosome, you can create a JSON file mapping chromosome name --&amp;gt; VCF file, and provide the JSON file to --ld-vcf. For example, the JSON file could look like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;X&amp;quot;: &amp;quot;/path/to/X.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;Y&amp;quot;: &amp;quot;/path/to/Y.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;MT&amp;quot;: &amp;quot;/path/to/MT.vcf.gz&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then pass it directly using &amp;lt;code&amp;gt;locuszoom --ld-vcf my_vcfs.json&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole-cat_significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example of a method generating such a set of SNPs.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&lt;br /&gt;
&lt;br /&gt;
=== Plotting BED tracks ===&lt;br /&gt;
&lt;br /&gt;
You can supply locuszoom with a BED file, and the tracks within it will be added to the plot. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:Bed_tracks.png]]&lt;br /&gt;
&lt;br /&gt;
Use the --bed-tracks option, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom ... --bed-tracks &amp;lt;your bed file&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BED file should have at least 4 columns: the first 3 for chr/start/end, and the 4th column for the label of the track. It must be &#039;&#039;&#039;tab-delimited&#039;&#039;&#039;, not white-space delimited. &lt;br /&gt;
&lt;br /&gt;
Color can also be specified, but the BED file then needs to follow the full [http://genome.ucsc.edu/FAQ/FAQformat.html#format1 BED format].&lt;br /&gt;
&lt;br /&gt;
=== Specify gene table (refFlat, GENCODE, etc.) ===&lt;br /&gt;
&lt;br /&gt;
You can now specify a different gene information table to use. LocusZoom provides both refFlat and GENCODE. refFlat is the default. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --gene-table gencode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;. 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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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 -log10 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;
New/fixed options in 1.3: &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;
| colorCol=NULL&lt;br /&gt;
| Specify the name of a column in association results file denoting the color each marker should be. This disables coloring by LD. For the column values, color names should be used, for example &amp;quot;red&amp;quot; &amp;quot;olivedrab&amp;quot; etc. &lt;br /&gt;
|-&lt;br /&gt;
| signifLine=NULL&lt;br /&gt;
| Specify (in -log10 p-value scale) where to place a horizontal significance line. Can have multiple lines, e.g. signifLine=&amp;quot;7.3,9&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineColor=NULL&lt;br /&gt;
| Specify color of each significance line, e.g. signifLineColor=&amp;quot;red,blue&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineWidth=NULL&lt;br /&gt;
| Specify the line width for each significance line, e.g. signifLineWidth=&amp;quot;2,3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| showIso=F&lt;br /&gt;
| Show genes as isoforms, rather than collapsed into one canonical transcript. To enable use showIso=T&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options: &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;
=== 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 --build hg18 --source hapmap&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 custom SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide SQLite databases based on UCSC human genome &#039;&#039;&#039;build hg18 and hg19&#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;
=== Updating the existing locuszoom database(s) ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom now comes with a database updating script &amp;lt;code&amp;gt;bin/lzupdate.py&amp;lt;/code&amp;gt;. This script can download the necessary data from UCSC, NCBI, NGHRI, and GENCODE to create an up-to-date database file. The script performs the following actions: &lt;br /&gt;
&lt;br /&gt;
# Download latest SNP table from UCSC for the given build&lt;br /&gt;
# Reformat SNP table for insertion into sqlite database&lt;br /&gt;
# Download latest refFlat from UCSC for the given build&lt;br /&gt;
# Reformat refFlat for insertion into sqlite database&lt;br /&gt;
# (optional) Download GENCODE annotation file from GENCODE FTP site&lt;br /&gt;
# Download RsMergeArch from NCBI&lt;br /&gt;
# Write formatted translation table for old rsIDs to latest (from RsMergeArch)&lt;br /&gt;
# Create a SNP set file (for indicating rug of markers at top of plot for different genotyping arrays)&lt;br /&gt;
# Download the latest NHGRI GWAS catalog&lt;br /&gt;
# Format catalog for use with locuszoom&lt;br /&gt;
# Call &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; to insert everything above (except the GWAS catalog file, which remains a separate file)&lt;br /&gt;
&lt;br /&gt;
An example of running the script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bin/lzupdate.py --build hg19 --gencode 19 --gwas-cat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script will NOT overwrite the existing locuszoom database, since you should likely back it up first (under data/database/*.db). After running the script you should have both a new locuszoom.db file, and a gwas catalog file. You can then either overwrite the locuszoom database after backing it up, or you could place them in a different location and modify the conf file accordingly. The script will provide instructions after running for how to do this. &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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=RAREMETALWORKER&amp;diff=13290</id>
		<title>RAREMETALWORKER</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=RAREMETALWORKER&amp;diff=13290"/>
		<updated>2015-05-17T18:28:14Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* LD Matrices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;RAREMETALWORKER&#039;&#039;&#039; is a tool for single variant analysis, generating summary statistics for gene level meta analyses in [http://genome.sph.umich.edu/wiki/RAREMETAL &#039;&#039;&#039;RAREMETAL&#039;&#039;&#039;].&lt;br /&gt;
&lt;br /&gt;
If you feel this program is useful, please tell us your name and contact in this [https://docs.google.com/spreadsheet/ccc?key=0AuYjznTeEDYudFpqUk9sQ2pkN3d3endjYldqMEp6ZUE&amp;amp;usp=sharing &#039;&#039;&#039;registration&#039;&#039;&#039;].&lt;br /&gt;
&lt;br /&gt;
If you have any questions, please contact [[Shuang Feng|&#039;&#039;&#039;Shuang Feng&#039;&#039;&#039;]] sfengsph at umich dot edu or [[Goncalo_Abecasis | &#039;&#039;&#039;Goncalo Abecasis&#039;&#039;&#039;]] goncalo at umich dot edu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Useful Wiki Pages ==&lt;br /&gt;
&lt;br /&gt;
There are several pages in this Wiki that may be useful to RAREMETALWORKER users. Here are links to key pages:&lt;br /&gt;
* The [[RAREMETALWORKER_command_reference | &#039;&#039;&#039;RAREMETALWORKER command reference&#039;&#039;&#039;]]&lt;br /&gt;
* The [[RAREMETALWORKER_method | &#039;&#039;&#039;RAREMETALWORKER method&#039;&#039;&#039;]]&lt;br /&gt;
* The [[Tutorial:_RAREMETAL| &#039;&#039;&#039;RAREMETALWORKER quick start tutorial&#039;&#039;&#039;]]&lt;br /&gt;
* The [[RAREMETALWORKER_SPECIAL_TOPICS | &#039;&#039;&#039;RAREMETALWORKER special topics&#039;&#039;&#039;]]&lt;br /&gt;
* The [[RAREMETAL_Documentation | &#039;&#039;&#039;RAREMETAL documentation&#039;&#039;&#039;]]&lt;br /&gt;
* The [[RAREMETAL FAQ | &#039;&#039;&#039;FAQ&#039;&#039;&#039;]]&lt;br /&gt;
&lt;br /&gt;
== Key Features ==&lt;br /&gt;
RAREMETALWORKER has the following features:&lt;br /&gt;
* Takes genotypes from either PED file or VCF file.&lt;br /&gt;
* Generates summary statistics for both related and unrelated individuals.&lt;br /&gt;
* Generates linkage disequilibrium matrices summarizing covariance between single marker statistics using an adjustable sliding window. &lt;br /&gt;
* Optionally handles related individuals using a kinship matrix derived from either pedigree or genotype data.&lt;br /&gt;
* Has the option of fitting shared environment.&lt;br /&gt;
* Can handle variants on Chromosome X.&lt;br /&gt;
* Calculates QC statistics such as hwe pvalue, call rate and genomic control.&lt;br /&gt;
* Automatically generate QQ and manhattan plots.&lt;br /&gt;
&lt;br /&gt;
== Software Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== DOWNLOAD ===&lt;br /&gt;
&lt;br /&gt;
We have tested compilation on several platforms including Linux, MAC OS X, and Windows. &lt;br /&gt;
&lt;br /&gt;
For source code and executables together with instructions of building from source, please go to [[RAREMETAL_DOWNLOAD_%26_BUILD |&#039;&#039;&#039;DOWNLOAD source and executables&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
For questions about building and compilation, please go to [[RAREMETAL_FAQ | &#039;&#039;&#039;FAQ&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
=== How to Execute ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* To execute the program, go to /RareMetalWorker_0.4.8/RareMetalWorker/bin, issue ./raremetalworker.&lt;br /&gt;
* For example command lines, please refer to [[RAREMETALWORKER#Example_Command_Lines | &#039;&#039;&#039;RAREMETALWORKER EXAMPLES&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
==Method==&lt;br /&gt;
&lt;br /&gt;
Method description and key formulae can be found in [http://genome.sph.umich.edu/wiki/RAREMETALWORKER_method &#039;&#039;&#039;RAREMETALWORKER METHOD&#039;&#039;&#039;].&lt;br /&gt;
&lt;br /&gt;
==For Binary Traits==&lt;br /&gt;
&lt;br /&gt;
RAREMETALWORKER currently treat all traits as quantitative. If your trait is binary, the odds ratio can be approximated from effect size estimates generated by RAREMETALWORKER. The installation/source package has a script included to augment the odds ratio estimates to the last column of the RAREMETALWORKER output. For details, please refer to [[RAREMETAL_DOWNLOAD_%26_BUILD#Calculating_Odds_Ratio_from_RAREMETALWORKER_output | &#039;&#039;&#039;Calculate Odds Ratio from RAREMETALWORKER output&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
== Software Specifications ==&lt;br /&gt;
&lt;br /&gt;
===INTERFACE===&lt;br /&gt;
&lt;br /&gt;
RAREMETALWORKER is a command line tool. Once you execute, you will see a full list of options printed on the screen. &lt;br /&gt;
&lt;br /&gt;
For detailed description of command options, please go to [[RAREMETALWORKER_command_reference | &#039;&#039;&#039;command reference&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
 Options:&lt;br /&gt;
       Input Files : --ped [], --dat [], --vcf [], --dosage, --noeof&lt;br /&gt;
      Output Files : --prefix [], --LDwindow [1000000], --zip, --thin,&lt;br /&gt;
                     --labelHits&lt;br /&gt;
        VC Options : --vcX, --separateX&lt;br /&gt;
     Trait Options : --makeResiduals, --inverseNormal, --traitName []&lt;br /&gt;
     Model Options : --recessive, --dominant&lt;br /&gt;
    Kinship Source : --kinPedigree, --kinGeno, --kinFile [], --kinxFile [],&lt;br /&gt;
                     --kinSave&lt;br /&gt;
   Kinship Options : --kinMaf [0.05], --kinMiss [0.05]&lt;br /&gt;
      Chromosome X : --xLabel [X], --xStart [2699520], --xEnd [154931044],&lt;br /&gt;
                     --maleLabel [1], --femaleLabel [2]&lt;br /&gt;
            others : --cpu [1], --kinOnly,&lt;br /&gt;
                     --geneMap [../data/refFlat_hg19.txt]&lt;br /&gt;
         PhoneHome : --noPhoneHome, --phoneHomeThinning [100]&lt;br /&gt;
&lt;br /&gt;
===INPUT FILE FORMAT===&lt;br /&gt;
&lt;br /&gt;
RMW needs the following files as input: PED and DAT file in Merlin format, &#039;&#039;&#039;AND/OR&#039;&#039;&#039; a VCF file. When genotypes are stored in PED and DAT file, the VCF file is not needed. However, even if genotypes are saved in a VCF file, PED and DAT files are still needed for carrying covariate and trait information. &lt;br /&gt;
&lt;br /&gt;
==== PED and DAT Files ====&lt;br /&gt;
* When PED file has genotypes saved, there is no need for a VCF file as input.&lt;br /&gt;
* RMW takes PED/DAT file in Merlin format. Please refer to [http://www.sph.umich.edu/csg/abecasis/merlin/tour/input_files.html PED/DAT format description] for details.&lt;br /&gt;
* PED file requires &amp;quot;dummy&amp;quot; parents to be included in the pedigree file. To check the integrity of your PED/DAT file, please use [http://www.sph.umich.edu/csg/abecasis/PedStats &#039;&#039;&#039;pedstats&#039;&#039;&#039;]. To add dummy parents into the pedigree, please use the [[Media:Script.tgz | &#039;&#039;&#039;perl script&#039;&#039;&#039;]].&lt;br /&gt;
* An example PED file is in the following:&lt;br /&gt;
     1 1 0 0 1 1.5 1 23 A A A A A A A A A A&lt;br /&gt;
     2 1 0 0 1 1.0 1 34 A C A C A C A C A C&lt;br /&gt;
     3 1 0 0 2 0.4 1 43 A A A A A A A A A A&lt;br /&gt;
     4 1 0 0 2 0.9 1 13 A C A C A C A C A C&lt;br /&gt;
* The matching DAT file is in the following:&lt;br /&gt;
  T YourTraitName&lt;br /&gt;
  C SEX&lt;br /&gt;
  C AGE&lt;br /&gt;
  M 1:123456&lt;br /&gt;
  M 1:234567&lt;br /&gt;
  M 2:111111&lt;br /&gt;
  M 2:222222&lt;br /&gt;
  M X:12345&lt;br /&gt;
* DAT file must have variant names in the following format &amp;quot;M chr:pos&amp;quot;. &lt;br /&gt;
* Orders of labels in DAT file have to match the order of fields in PED file. &lt;br /&gt;
* &#039;&#039;&#039;Markers in PED and DAT file must be sorted by chromosome and position.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Covariate and trait values are saved in PED file. Covariate and trait descriptions are saved in DAT file.&lt;br /&gt;
&lt;br /&gt;
==== VCF File ====&lt;br /&gt;
=====GENOTYPES=====&lt;br /&gt;
* Another option is to use VCF as input. Please refer to the following link for VCF file specification: [http://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant-call-format-version-41 1000 genome wiki VCF specs]&lt;br /&gt;
* VCF file should be compressed by bgzip and indexed by tabix, using the following command:&lt;br /&gt;
  bgzip input.vcf     ## this command will produce input.vcf.gz&lt;br /&gt;
  tabix -p vcf -f input.vcf.gz  ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
* Even with the presence of VCF file, PED/DAT files are still needed for covariates and phenotypes.&lt;br /&gt;
* Are you using PLINK file formats? Converting to VCF is easy. Use WDIST (very similar to PLINK) to make the conversion. Visit this page [https://www.cog-genomics.org/wdist/ | WDIST] to find documentation and downloads for WDIST.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When genotypes are saved in a VCF file, PED and DAT files are used for specifying pedigree structure, covariate and trait information. An example command line might look like this:&lt;br /&gt;
  --ped input.ped --dat input.dat --vcf input.vcf.gz&lt;br /&gt;
* When genotypes are saved in the PED file, the VCF file is not needed. An example command line might look like this:&lt;br /&gt;
  --ped input.ped --dat input.dat&lt;br /&gt;
&lt;br /&gt;
=====DOSAGE=====&lt;br /&gt;
* If you want to analyze dosage data from VCF file, the following option has to be specified: --dosage. A key word &amp;quot;DS&amp;quot; in FORMAT field in VCF file has to included accordingly. An example is in the following:&lt;br /&gt;
&lt;br /&gt;
  #CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	IDx	ID1	ID2	ID3&lt;br /&gt;
  22	16050408	37239779	T	C	.	PASS	AC=2;AN=496	GT:DS:GP	./.:.:0,0,0	./.:.:0,0,0	./.:.:0,0,0	&lt;br /&gt;
  22	16050933	37239784	G	A	.	PASS	AC=141;AN=904	GT:DS:GP	0/0:0.0:1,0,0	0/0:0.0:1,0,0	0/0:0.0:1,0,0&lt;br /&gt;
&lt;br /&gt;
* --noeof allows using VCF file without BGZF EOF markers. This is a very rare option to use. If your run is terminated with error message: &amp;quot;&amp;quot;, then you might want to check out this option.&lt;br /&gt;
&lt;br /&gt;
=== OUTPUT===&lt;br /&gt;
&lt;br /&gt;
====OUTPUT FILE NAMES====&lt;br /&gt;
&lt;br /&gt;
* Three files are generated automatically by default:&lt;br /&gt;
  prefix.traitName.singlevar.score.txt (single variant summary statistics and QC statistics)&lt;br /&gt;
  prefix.traitName.singlevar.cov.txt (covariance matrices of single variant score statistics)&lt;br /&gt;
  prefix.singlevar.log (log file)&lt;br /&gt;
&lt;br /&gt;
* If --zip option is used, then the following will be generated automatically:&lt;br /&gt;
  prefix.traitName.singlevar.score.txt.gz&lt;br /&gt;
  prefix.traitName.singlevar.cov.txt.gz&lt;br /&gt;
  prefix.singlevar.log&lt;br /&gt;
&lt;br /&gt;
* If --recessive and/or --dominant options are used, then the following files are also generated &#039;&#039;&#039;in addition&#039;&#039;&#039; to the above files&lt;br /&gt;
  prefix.traitName.recessive.singlevar.score.txt.gz&lt;br /&gt;
  prefix.traitName.recessive.singlevar.cov.txt.gz&lt;br /&gt;
  prefix.traitName.dominant.singlevar.score.txt.gz&lt;br /&gt;
  prefix.traitName.dominant.singlevar.cov.txt.gz&lt;br /&gt;
&lt;br /&gt;
* If --kinGeno --kinSave is used, then the genomic relationship matrix is stored in&lt;br /&gt;
  prefix.Empirical.Kinship.gz&lt;br /&gt;
&lt;br /&gt;
* If --vcX option is used, then the genomic relationship matrix from chromosome X is stored in&lt;br /&gt;
  prefix.Empirical.KinshipX.gz&lt;br /&gt;
&lt;br /&gt;
====OUTPUT FILE FORMATS====&lt;br /&gt;
&lt;br /&gt;
=====Summary Statistics=====&lt;br /&gt;
* In the file with summary statistics named prefix.traitName.singlevar.score.txt contains summary statistics that are needed by Rare-Metal. An example is shown in below:&lt;br /&gt;
&lt;br /&gt;
 LDL mean= -0.00, variance=  1.00, heritability= 34.30 &lt;br /&gt;
 CHR       POS REF_ALLELE ALT_ALLELE  INFORMATIVE_N  FOUNDER_AF    ALL_AF  INFORMATIVE_AC  HWE_PVALUE      STAT  ALT_ALLELE_EFFSIZE        PVALUE&lt;br /&gt;
  10  45410002          G          A           6103    0.034159  0.034159             410    0.165893  126.2050            0.309798  4.030740e-10&lt;br /&gt;
  19  45412079          G          A           6103    0.036812  0.036812             434    0.714645 -265.8400           -0.587356  7.878510e-36&lt;br /&gt;
  19  45414451          G          A           6103    0.444989  0.444989            5312    0.075927  -26.1212           -0.008371  6.400580e-01&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* pvalues from the above output are from the family-based single variant score test.&lt;br /&gt;
&lt;br /&gt;
=====LD Matrices=====&lt;br /&gt;
* prefix.traitName.singlevar.cov.txt contains the LD matrix among a variant and the adjacent markers within a prefixed-sized window. The default window size is 1MB. It has the following format:&lt;br /&gt;
  &lt;br /&gt;
 CHR     POS                            VAR_POS_IN_WINDOW                                                                  LD_MATRIX&lt;br /&gt;
   1  762320   762320,865628,865665,878744,879381,1560000  0.0359084,-0.000242112,-0.00125797,-0.000993422,-0.000344509,-0.00017077,&lt;br /&gt;
   1  865628  865628,865665,878744,879381,1560000,1864659           0.419804,-0.0103663,-0.00635265,0.0594056,0.0534505,-0.00462183,&lt;br /&gt;
   1  878744        878744,879381,1560000,1864659,1877659             0.000404537,-0.000235215,-1.4455e-05,-8.69137e-06,-3.1027e-05,&lt;br /&gt;
&lt;br /&gt;
=====Genomic Relationship Matrix (GRM)=====&lt;br /&gt;
&lt;br /&gt;
* Once --kinGeno --kinSave --prefix options are requested, you would expect to see a GRM generated (compressed by gzip) with name yourprefix.Empirical.Kinship.gz. If --prefix option is not used, then the file name is Empirical.Kinship.gz. &lt;br /&gt;
* If --vcX --kinGeno --kinSave --prefix options are requested, besides the autosomal GRM, you would also expect to see a separate GRM for chromosome X saved (compressed by gzip also) under the name yourprefix.Empirical.KinshipX.gz. &lt;br /&gt;
* The GRMs are generated based on all genotyped individuals included in the PED file; samples with missing phenotype or missing covariates are not excluded from GRMs. This feature makes GRMs reusable if you have multiple traits to analyze in separate runs. You can simplely use --kinFile option (--kinxFile option if you have X chromosome GRM together with --vcX option issued) to reuse the pre-saved GRMs.&lt;br /&gt;
* The format for both autosomal and chromosome X GRMs are the same. The first row has all sample IDs (sample size=N) listed. The rest of the file is a symmetric matrix with dimention &#039;&#039;NxN&#039;&#039;, and element &#039;&#039;ij&#039;&#039; of this matrix represents the kinship between the &amp;lt;math&amp;gt;i^{th}&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;j^{th}&amp;lt;/math&amp;gt; sample whose ID can be found from the first row.&lt;br /&gt;
* For details about GRM calculation, please refer to [[RAREMETALWORKER_method | &#039;&#039;&#039;method&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
=====Log File=====&lt;br /&gt;
* RMW automatically generates a log file named &amp;quot;yourprefix.singlevar.log&amp;quot;. &lt;br /&gt;
* The first part of the log file has options used for your analysis saved.&lt;br /&gt;
&lt;br /&gt;
 The following parameters are in effect:&lt;br /&gt;
 &lt;br /&gt;
 Input Files:&lt;br /&gt;
 ============================&lt;br /&gt;
 --ped [pheno.ped]&lt;br /&gt;
 --dat [pheno.dat] &lt;br /&gt;
 --vcf [allvars.vcf.gz]&lt;br /&gt;
 --dosage [false]&lt;br /&gt;
 --noeof [false]&lt;br /&gt;
 &lt;br /&gt;
 Output Files:&lt;br /&gt;
 ============================&lt;br /&gt;
 --prefix [rmw.test]&lt;br /&gt;
 --LDwindow [1000000]&lt;br /&gt;
 --zip [false]&lt;br /&gt;
 --thin [false]&lt;br /&gt;
 --labelHits [false]&lt;br /&gt;
 &lt;br /&gt;
 VC Options:&lt;br /&gt;
 ============================&lt;br /&gt;
 --vcX [true]&lt;br /&gt;
 --separateX [true]&lt;br /&gt;
 &lt;br /&gt;
 Trait Options:&lt;br /&gt;
 ============================&lt;br /&gt;
 --makeResiduals [false]&lt;br /&gt;
 --inverseNormal [false]&lt;br /&gt;
 --traitName []&lt;br /&gt;
 &lt;br /&gt;
 Model Options:&lt;br /&gt;
 ============================&lt;br /&gt;
 --recessive [false]&lt;br /&gt;
 --dominant [false]&lt;br /&gt;
 &lt;br /&gt;
 Kinship Source:&lt;br /&gt;
 ============================&lt;br /&gt;
 --kinPedigree [true]&lt;br /&gt;
 --kinGeno [false]&lt;br /&gt;
 --kinFile []&lt;br /&gt;
 --kinxFile []&lt;br /&gt;
 --kinSave [false]&lt;br /&gt;
 &lt;br /&gt;
 Kinship Options:&lt;br /&gt;
 ============================&lt;br /&gt;
 --kinMaf [0.05]&lt;br /&gt;
 --kinMiss [0.05]&lt;br /&gt;
 &lt;br /&gt;
 Chromosome X:&lt;br /&gt;
 ============================&lt;br /&gt;
 xLabel [X]&lt;br /&gt;
 xStart [2699520]&lt;br /&gt;
 xEnd [154931044]&lt;br /&gt;
 maleLabel [1]&lt;br /&gt;
 femaleLabel [2]&lt;br /&gt;
&lt;br /&gt;
* The second part of the log file has all warnings and running messages saved.&lt;br /&gt;
&lt;br /&gt;
=====Plots=====&lt;br /&gt;
* RAREMETALWORKER generates QQ plot and Manhattan plots automatically, unless there are only trivial number of variants analyzed. &lt;br /&gt;
* RAREMETALWORKER stores plots of each trait in separate files named &#039;&#039;yourprefix.traitname.plots.pdf&#039;&#039;.&lt;br /&gt;
* RAREMETALWORKER stores plots for recessive and dominant results separated with files named &#039;&#039;yourprefix.traitname.recessive.plots.pdf&#039;&#039; and &#039;&#039;yourprefix.traitname.dominant.plots.pdf&#039;&#039;.&lt;br /&gt;
* RAREMETALWORKER automatically generates three stratified QQ plots, one with all variants, one with variants of maf&amp;lt;0.05, and one with variants of maf&amp;lt;0.01.&lt;br /&gt;
* Genomic controls are automatically calculated and labeled in QQ plots. &lt;br /&gt;
* By using --labelHits option, users can choose to label the hits. &lt;br /&gt;
* Here is an example QQ plot and manhattan plot generated by RAREMETALWORKER.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; width=&amp;quot;100&amp;quot; | [[File:QQ.png]]&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; width=&amp;quot;200&amp;quot; | [[File:Single_var_manhattan.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===SPECIAL TOPICS===&lt;br /&gt;
* For special topics such as how RAREMEALWORKER handles missing data, unrelated individuals, markers on chromosomeX, please go to [[RAREMETALWORKER_SPECIAL_TOPICS | &#039;&#039;&#039;SPECIAL TOPICS&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
== Example Command Lines ==&lt;br /&gt;
&lt;br /&gt;
The following list a few popular combinations of options used for analyses. For an itemized description of options, please go to [[RAREMETALWORKER_command_reference | &#039;&#039;&#039;COMMAND REFERENCE&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
===General Usage===&lt;br /&gt;
&lt;br /&gt;
* If your PED file has many traits but you only want one of them to be analyzed, then the following command does the trick:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --traitName BMI --prefix yourFavoritePrefix&lt;br /&gt;
&lt;br /&gt;
* If you want to inverse normalize (quantile normalize) your trait before doing associations, this can be done by adding --inverseNormal to your command line:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --traitName BMI --prefix yourFavoritePrefix --inverseNormal&lt;br /&gt;
&lt;br /&gt;
* The following command will adjust covariates first and then use residuals to proceed association:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --traitName BMI --prefix yourFavoritePrefix --makeResiduals&lt;br /&gt;
&lt;br /&gt;
* The following command will adjust covariates first and then use the inverse normalized residuals to proceed association:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --traitName BMI --prefix yourFavoritePrefix --makeResiduals --inverseNormal&lt;br /&gt;
&lt;br /&gt;
=== Related individuals ===&lt;br /&gt;
&lt;br /&gt;
* When pedigree is known and you want to use it to count for relatedness then the following command can be used:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --kinPedigree --prefix yourFavoritePrefix&lt;br /&gt;
&lt;br /&gt;
* When you want to an estimated genomic relationship matrix to count for relatedness then the following command can be used:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --prefix yourFavoritePrefix --kinGeno --kinSave (this will save the genomic relationship matrix for future use)&lt;br /&gt;
&lt;br /&gt;
* If the genomic relationship matrix has been saved previously, and you want to use it to count for relatedness then the following command can be used:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --prefix yourFavoritePrefix --kinFile yourPreviouslySavedKinship&lt;br /&gt;
&lt;br /&gt;
=== Unrelated individuals ===&lt;br /&gt;
&lt;br /&gt;
* To analyze individuals as unrelated, even if pedigree is known, you just have to use the following command:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --prefix yourFavoritePrefix&lt;br /&gt;
&lt;br /&gt;
===Analyzing Chromosome X===&lt;br /&gt;
&lt;br /&gt;
* To analyze markers on chromosome X, if relatedness is not considered, then no special options needs to be issued. &lt;br /&gt;
&lt;br /&gt;
* When relatedness is modeled using linear mixed model, and pedigree is known, then the following command fits use both autosomal kinship and chromosomeX kinship to fit a variance component model:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --kinPedigree --vcX --vcf yourInput.vcf.gz --prefix yourFavoritePrefix &lt;br /&gt;
&lt;br /&gt;
* Adding --separateX to the above command line will only use chromosome X kinship to fit the variance component model:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --kinPedigree --vcX --separateX --vcf yourInput.vcf.gz --prefix yourFavoritePrefix&lt;br /&gt;
&lt;br /&gt;
* Please refer to [[RAREMETALWORKER_method | &#039;&#039;&#039;METHODS&#039;&#039;&#039;]] for methods and [[RAREMETALWORKER_SPECIAL_TOPICS#Analyzing_Chromosome_X | &#039;&#039;&#039;SPECIAL TOPICS&#039;&#039;&#039;]] for technical details.&lt;br /&gt;
&lt;br /&gt;
===Using MERLIN format PED/DAT INPUT FILES===&lt;br /&gt;
* When genotypes are stored in MERLIN format PED/DAT files, command should be the same to do the above analysis, except --vcf option should be excluded.&lt;br /&gt;
* Please refer to [[RAREMETALWORKER#PED_and_DAT_Files | &#039;&#039;&#039;PED/DAT format&#039;&#039;&#039;]] for format requirements.&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
* For a comprehensive tutorial of RMW and RAREMETAL using example data sets, please go to the following:&lt;br /&gt;
&lt;br /&gt;
  [http://genome.sph.umich.edu/wiki/Tutorial:_RareMETAL &#039;&#039;&#039;RAREMETAL and RAREMETALWORKER Tutorial&#039;&#039;&#039;]&lt;/div&gt;</summary>
		<author><name>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=RAREMETALWORKER&amp;diff=13289</id>
		<title>RAREMETALWORKER</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=RAREMETALWORKER&amp;diff=13289"/>
		<updated>2015-05-17T18:26:52Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Summary Statistics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;RAREMETALWORKER&#039;&#039;&#039; is a tool for single variant analysis, generating summary statistics for gene level meta analyses in [http://genome.sph.umich.edu/wiki/RAREMETAL &#039;&#039;&#039;RAREMETAL&#039;&#039;&#039;].&lt;br /&gt;
&lt;br /&gt;
If you feel this program is useful, please tell us your name and contact in this [https://docs.google.com/spreadsheet/ccc?key=0AuYjznTeEDYudFpqUk9sQ2pkN3d3endjYldqMEp6ZUE&amp;amp;usp=sharing &#039;&#039;&#039;registration&#039;&#039;&#039;].&lt;br /&gt;
&lt;br /&gt;
If you have any questions, please contact [[Shuang Feng|&#039;&#039;&#039;Shuang Feng&#039;&#039;&#039;]] sfengsph at umich dot edu or [[Goncalo_Abecasis | &#039;&#039;&#039;Goncalo Abecasis&#039;&#039;&#039;]] goncalo at umich dot edu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Useful Wiki Pages ==&lt;br /&gt;
&lt;br /&gt;
There are several pages in this Wiki that may be useful to RAREMETALWORKER users. Here are links to key pages:&lt;br /&gt;
* The [[RAREMETALWORKER_command_reference | &#039;&#039;&#039;RAREMETALWORKER command reference&#039;&#039;&#039;]]&lt;br /&gt;
* The [[RAREMETALWORKER_method | &#039;&#039;&#039;RAREMETALWORKER method&#039;&#039;&#039;]]&lt;br /&gt;
* The [[Tutorial:_RAREMETAL| &#039;&#039;&#039;RAREMETALWORKER quick start tutorial&#039;&#039;&#039;]]&lt;br /&gt;
* The [[RAREMETALWORKER_SPECIAL_TOPICS | &#039;&#039;&#039;RAREMETALWORKER special topics&#039;&#039;&#039;]]&lt;br /&gt;
* The [[RAREMETAL_Documentation | &#039;&#039;&#039;RAREMETAL documentation&#039;&#039;&#039;]]&lt;br /&gt;
* The [[RAREMETAL FAQ | &#039;&#039;&#039;FAQ&#039;&#039;&#039;]]&lt;br /&gt;
&lt;br /&gt;
== Key Features ==&lt;br /&gt;
RAREMETALWORKER has the following features:&lt;br /&gt;
* Takes genotypes from either PED file or VCF file.&lt;br /&gt;
* Generates summary statistics for both related and unrelated individuals.&lt;br /&gt;
* Generates linkage disequilibrium matrices summarizing covariance between single marker statistics using an adjustable sliding window. &lt;br /&gt;
* Optionally handles related individuals using a kinship matrix derived from either pedigree or genotype data.&lt;br /&gt;
* Has the option of fitting shared environment.&lt;br /&gt;
* Can handle variants on Chromosome X.&lt;br /&gt;
* Calculates QC statistics such as hwe pvalue, call rate and genomic control.&lt;br /&gt;
* Automatically generate QQ and manhattan plots.&lt;br /&gt;
&lt;br /&gt;
== Software Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== DOWNLOAD ===&lt;br /&gt;
&lt;br /&gt;
We have tested compilation on several platforms including Linux, MAC OS X, and Windows. &lt;br /&gt;
&lt;br /&gt;
For source code and executables together with instructions of building from source, please go to [[RAREMETAL_DOWNLOAD_%26_BUILD |&#039;&#039;&#039;DOWNLOAD source and executables&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
For questions about building and compilation, please go to [[RAREMETAL_FAQ | &#039;&#039;&#039;FAQ&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
=== How to Execute ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* To execute the program, go to /RareMetalWorker_0.4.8/RareMetalWorker/bin, issue ./raremetalworker.&lt;br /&gt;
* For example command lines, please refer to [[RAREMETALWORKER#Example_Command_Lines | &#039;&#039;&#039;RAREMETALWORKER EXAMPLES&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
==Method==&lt;br /&gt;
&lt;br /&gt;
Method description and key formulae can be found in [http://genome.sph.umich.edu/wiki/RAREMETALWORKER_method &#039;&#039;&#039;RAREMETALWORKER METHOD&#039;&#039;&#039;].&lt;br /&gt;
&lt;br /&gt;
==For Binary Traits==&lt;br /&gt;
&lt;br /&gt;
RAREMETALWORKER currently treat all traits as quantitative. If your trait is binary, the odds ratio can be approximated from effect size estimates generated by RAREMETALWORKER. The installation/source package has a script included to augment the odds ratio estimates to the last column of the RAREMETALWORKER output. For details, please refer to [[RAREMETAL_DOWNLOAD_%26_BUILD#Calculating_Odds_Ratio_from_RAREMETALWORKER_output | &#039;&#039;&#039;Calculate Odds Ratio from RAREMETALWORKER output&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
== Software Specifications ==&lt;br /&gt;
&lt;br /&gt;
===INTERFACE===&lt;br /&gt;
&lt;br /&gt;
RAREMETALWORKER is a command line tool. Once you execute, you will see a full list of options printed on the screen. &lt;br /&gt;
&lt;br /&gt;
For detailed description of command options, please go to [[RAREMETALWORKER_command_reference | &#039;&#039;&#039;command reference&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
 Options:&lt;br /&gt;
       Input Files : --ped [], --dat [], --vcf [], --dosage, --noeof&lt;br /&gt;
      Output Files : --prefix [], --LDwindow [1000000], --zip, --thin,&lt;br /&gt;
                     --labelHits&lt;br /&gt;
        VC Options : --vcX, --separateX&lt;br /&gt;
     Trait Options : --makeResiduals, --inverseNormal, --traitName []&lt;br /&gt;
     Model Options : --recessive, --dominant&lt;br /&gt;
    Kinship Source : --kinPedigree, --kinGeno, --kinFile [], --kinxFile [],&lt;br /&gt;
                     --kinSave&lt;br /&gt;
   Kinship Options : --kinMaf [0.05], --kinMiss [0.05]&lt;br /&gt;
      Chromosome X : --xLabel [X], --xStart [2699520], --xEnd [154931044],&lt;br /&gt;
                     --maleLabel [1], --femaleLabel [2]&lt;br /&gt;
            others : --cpu [1], --kinOnly,&lt;br /&gt;
                     --geneMap [../data/refFlat_hg19.txt]&lt;br /&gt;
         PhoneHome : --noPhoneHome, --phoneHomeThinning [100]&lt;br /&gt;
&lt;br /&gt;
===INPUT FILE FORMAT===&lt;br /&gt;
&lt;br /&gt;
RMW needs the following files as input: PED and DAT file in Merlin format, &#039;&#039;&#039;AND/OR&#039;&#039;&#039; a VCF file. When genotypes are stored in PED and DAT file, the VCF file is not needed. However, even if genotypes are saved in a VCF file, PED and DAT files are still needed for carrying covariate and trait information. &lt;br /&gt;
&lt;br /&gt;
==== PED and DAT Files ====&lt;br /&gt;
* When PED file has genotypes saved, there is no need for a VCF file as input.&lt;br /&gt;
* RMW takes PED/DAT file in Merlin format. Please refer to [http://www.sph.umich.edu/csg/abecasis/merlin/tour/input_files.html PED/DAT format description] for details.&lt;br /&gt;
* PED file requires &amp;quot;dummy&amp;quot; parents to be included in the pedigree file. To check the integrity of your PED/DAT file, please use [http://www.sph.umich.edu/csg/abecasis/PedStats &#039;&#039;&#039;pedstats&#039;&#039;&#039;]. To add dummy parents into the pedigree, please use the [[Media:Script.tgz | &#039;&#039;&#039;perl script&#039;&#039;&#039;]].&lt;br /&gt;
* An example PED file is in the following:&lt;br /&gt;
     1 1 0 0 1 1.5 1 23 A A A A A A A A A A&lt;br /&gt;
     2 1 0 0 1 1.0 1 34 A C A C A C A C A C&lt;br /&gt;
     3 1 0 0 2 0.4 1 43 A A A A A A A A A A&lt;br /&gt;
     4 1 0 0 2 0.9 1 13 A C A C A C A C A C&lt;br /&gt;
* The matching DAT file is in the following:&lt;br /&gt;
  T YourTraitName&lt;br /&gt;
  C SEX&lt;br /&gt;
  C AGE&lt;br /&gt;
  M 1:123456&lt;br /&gt;
  M 1:234567&lt;br /&gt;
  M 2:111111&lt;br /&gt;
  M 2:222222&lt;br /&gt;
  M X:12345&lt;br /&gt;
* DAT file must have variant names in the following format &amp;quot;M chr:pos&amp;quot;. &lt;br /&gt;
* Orders of labels in DAT file have to match the order of fields in PED file. &lt;br /&gt;
* &#039;&#039;&#039;Markers in PED and DAT file must be sorted by chromosome and position.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Covariate and trait values are saved in PED file. Covariate and trait descriptions are saved in DAT file.&lt;br /&gt;
&lt;br /&gt;
==== VCF File ====&lt;br /&gt;
=====GENOTYPES=====&lt;br /&gt;
* Another option is to use VCF as input. Please refer to the following link for VCF file specification: [http://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant-call-format-version-41 1000 genome wiki VCF specs]&lt;br /&gt;
* VCF file should be compressed by bgzip and indexed by tabix, using the following command:&lt;br /&gt;
  bgzip input.vcf     ## this command will produce input.vcf.gz&lt;br /&gt;
  tabix -p vcf -f input.vcf.gz  ## this command will produce input.vcf.gz.tbi&lt;br /&gt;
* Even with the presence of VCF file, PED/DAT files are still needed for covariates and phenotypes.&lt;br /&gt;
* Are you using PLINK file formats? Converting to VCF is easy. Use WDIST (very similar to PLINK) to make the conversion. Visit this page [https://www.cog-genomics.org/wdist/ | WDIST] to find documentation and downloads for WDIST.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When genotypes are saved in a VCF file, PED and DAT files are used for specifying pedigree structure, covariate and trait information. An example command line might look like this:&lt;br /&gt;
  --ped input.ped --dat input.dat --vcf input.vcf.gz&lt;br /&gt;
* When genotypes are saved in the PED file, the VCF file is not needed. An example command line might look like this:&lt;br /&gt;
  --ped input.ped --dat input.dat&lt;br /&gt;
&lt;br /&gt;
=====DOSAGE=====&lt;br /&gt;
* If you want to analyze dosage data from VCF file, the following option has to be specified: --dosage. A key word &amp;quot;DS&amp;quot; in FORMAT field in VCF file has to included accordingly. An example is in the following:&lt;br /&gt;
&lt;br /&gt;
  #CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	IDx	ID1	ID2	ID3&lt;br /&gt;
  22	16050408	37239779	T	C	.	PASS	AC=2;AN=496	GT:DS:GP	./.:.:0,0,0	./.:.:0,0,0	./.:.:0,0,0	&lt;br /&gt;
  22	16050933	37239784	G	A	.	PASS	AC=141;AN=904	GT:DS:GP	0/0:0.0:1,0,0	0/0:0.0:1,0,0	0/0:0.0:1,0,0&lt;br /&gt;
&lt;br /&gt;
* --noeof allows using VCF file without BGZF EOF markers. This is a very rare option to use. If your run is terminated with error message: &amp;quot;&amp;quot;, then you might want to check out this option.&lt;br /&gt;
&lt;br /&gt;
=== OUTPUT===&lt;br /&gt;
&lt;br /&gt;
====OUTPUT FILE NAMES====&lt;br /&gt;
&lt;br /&gt;
* Three files are generated automatically by default:&lt;br /&gt;
  prefix.traitName.singlevar.score.txt (single variant summary statistics and QC statistics)&lt;br /&gt;
  prefix.traitName.singlevar.cov.txt (covariance matrices of single variant score statistics)&lt;br /&gt;
  prefix.singlevar.log (log file)&lt;br /&gt;
&lt;br /&gt;
* If --zip option is used, then the following will be generated automatically:&lt;br /&gt;
  prefix.traitName.singlevar.score.txt.gz&lt;br /&gt;
  prefix.traitName.singlevar.cov.txt.gz&lt;br /&gt;
  prefix.singlevar.log&lt;br /&gt;
&lt;br /&gt;
* If --recessive and/or --dominant options are used, then the following files are also generated &#039;&#039;&#039;in addition&#039;&#039;&#039; to the above files&lt;br /&gt;
  prefix.traitName.recessive.singlevar.score.txt.gz&lt;br /&gt;
  prefix.traitName.recessive.singlevar.cov.txt.gz&lt;br /&gt;
  prefix.traitName.dominant.singlevar.score.txt.gz&lt;br /&gt;
  prefix.traitName.dominant.singlevar.cov.txt.gz&lt;br /&gt;
&lt;br /&gt;
* If --kinGeno --kinSave is used, then the genomic relationship matrix is stored in&lt;br /&gt;
  prefix.Empirical.Kinship.gz&lt;br /&gt;
&lt;br /&gt;
* If --vcX option is used, then the genomic relationship matrix from chromosome X is stored in&lt;br /&gt;
  prefix.Empirical.KinshipX.gz&lt;br /&gt;
&lt;br /&gt;
====OUTPUT FILE FORMATS====&lt;br /&gt;
&lt;br /&gt;
=====Summary Statistics=====&lt;br /&gt;
* In the file with summary statistics named prefix.traitName.singlevar.score.txt contains summary statistics that are needed by Rare-Metal. An example is shown in below:&lt;br /&gt;
&lt;br /&gt;
 LDL mean= -0.00, variance=  1.00, heritability= 34.30 &lt;br /&gt;
 CHR       POS REF_ALLELE ALT_ALLELE  INFORMATIVE_N  FOUNDER_AF    ALL_AF  INFORMATIVE_AC  HWE_PVALUE      STAT  ALT_ALLELE_EFFSIZE        PVALUE&lt;br /&gt;
  10  45410002          G          A           6103    0.034159  0.034159             410    0.165893  126.2050            0.309798  4.030740e-10&lt;br /&gt;
  19  45412079          G          A           6103    0.036812  0.036812             434    0.714645 -265.8400           -0.587356  7.878510e-36&lt;br /&gt;
  19  45414451          G          A           6103    0.444989  0.444989            5312    0.075927  -26.1212           -0.008371  6.400580e-01&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* pvalues from the above output are from the family-based single variant score test.&lt;br /&gt;
&lt;br /&gt;
=====LD Matrices=====&lt;br /&gt;
* prefix.traitName.singlevar.cov.txt contains the LD matrix among a variant and the adjacent markers within a prefixed-sized window. The default window size is 1MB. It has the following format:&lt;br /&gt;
  &lt;br /&gt;
  CHR    POS        VAR_POS_IN_WINDOW                             LD_MATRIX&lt;br /&gt;
  1   762320     762320,865628,865665,878744,879381,1560000    0.0359084,-0.000242112,-0.00125797,-0.000993422,-0.000344509,-0.00017077,&lt;br /&gt;
  1   865628     865628,865665,878744,879381,1560000,1864659   0.419804,-0.0103663,-0.00635265,0.0594056,0.0534505,-0.00462183,&lt;br /&gt;
  1   878744     878744,879381,1560000,1864659,1877659         0.000404537,-0.000235215,-1.4455e-05,-8.69137e-06,-3.1027e-05,&lt;br /&gt;
&lt;br /&gt;
=====Genomic Relationship Matrix (GRM)=====&lt;br /&gt;
&lt;br /&gt;
* Once --kinGeno --kinSave --prefix options are requested, you would expect to see a GRM generated (compressed by gzip) with name yourprefix.Empirical.Kinship.gz. If --prefix option is not used, then the file name is Empirical.Kinship.gz. &lt;br /&gt;
* If --vcX --kinGeno --kinSave --prefix options are requested, besides the autosomal GRM, you would also expect to see a separate GRM for chromosome X saved (compressed by gzip also) under the name yourprefix.Empirical.KinshipX.gz. &lt;br /&gt;
* The GRMs are generated based on all genotyped individuals included in the PED file; samples with missing phenotype or missing covariates are not excluded from GRMs. This feature makes GRMs reusable if you have multiple traits to analyze in separate runs. You can simplely use --kinFile option (--kinxFile option if you have X chromosome GRM together with --vcX option issued) to reuse the pre-saved GRMs.&lt;br /&gt;
* The format for both autosomal and chromosome X GRMs are the same. The first row has all sample IDs (sample size=N) listed. The rest of the file is a symmetric matrix with dimention &#039;&#039;NxN&#039;&#039;, and element &#039;&#039;ij&#039;&#039; of this matrix represents the kinship between the &amp;lt;math&amp;gt;i^{th}&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;j^{th}&amp;lt;/math&amp;gt; sample whose ID can be found from the first row.&lt;br /&gt;
* For details about GRM calculation, please refer to [[RAREMETALWORKER_method | &#039;&#039;&#039;method&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
=====Log File=====&lt;br /&gt;
* RMW automatically generates a log file named &amp;quot;yourprefix.singlevar.log&amp;quot;. &lt;br /&gt;
* The first part of the log file has options used for your analysis saved.&lt;br /&gt;
&lt;br /&gt;
 The following parameters are in effect:&lt;br /&gt;
 &lt;br /&gt;
 Input Files:&lt;br /&gt;
 ============================&lt;br /&gt;
 --ped [pheno.ped]&lt;br /&gt;
 --dat [pheno.dat] &lt;br /&gt;
 --vcf [allvars.vcf.gz]&lt;br /&gt;
 --dosage [false]&lt;br /&gt;
 --noeof [false]&lt;br /&gt;
 &lt;br /&gt;
 Output Files:&lt;br /&gt;
 ============================&lt;br /&gt;
 --prefix [rmw.test]&lt;br /&gt;
 --LDwindow [1000000]&lt;br /&gt;
 --zip [false]&lt;br /&gt;
 --thin [false]&lt;br /&gt;
 --labelHits [false]&lt;br /&gt;
 &lt;br /&gt;
 VC Options:&lt;br /&gt;
 ============================&lt;br /&gt;
 --vcX [true]&lt;br /&gt;
 --separateX [true]&lt;br /&gt;
 &lt;br /&gt;
 Trait Options:&lt;br /&gt;
 ============================&lt;br /&gt;
 --makeResiduals [false]&lt;br /&gt;
 --inverseNormal [false]&lt;br /&gt;
 --traitName []&lt;br /&gt;
 &lt;br /&gt;
 Model Options:&lt;br /&gt;
 ============================&lt;br /&gt;
 --recessive [false]&lt;br /&gt;
 --dominant [false]&lt;br /&gt;
 &lt;br /&gt;
 Kinship Source:&lt;br /&gt;
 ============================&lt;br /&gt;
 --kinPedigree [true]&lt;br /&gt;
 --kinGeno [false]&lt;br /&gt;
 --kinFile []&lt;br /&gt;
 --kinxFile []&lt;br /&gt;
 --kinSave [false]&lt;br /&gt;
 &lt;br /&gt;
 Kinship Options:&lt;br /&gt;
 ============================&lt;br /&gt;
 --kinMaf [0.05]&lt;br /&gt;
 --kinMiss [0.05]&lt;br /&gt;
 &lt;br /&gt;
 Chromosome X:&lt;br /&gt;
 ============================&lt;br /&gt;
 xLabel [X]&lt;br /&gt;
 xStart [2699520]&lt;br /&gt;
 xEnd [154931044]&lt;br /&gt;
 maleLabel [1]&lt;br /&gt;
 femaleLabel [2]&lt;br /&gt;
&lt;br /&gt;
* The second part of the log file has all warnings and running messages saved.&lt;br /&gt;
&lt;br /&gt;
=====Plots=====&lt;br /&gt;
* RAREMETALWORKER generates QQ plot and Manhattan plots automatically, unless there are only trivial number of variants analyzed. &lt;br /&gt;
* RAREMETALWORKER stores plots of each trait in separate files named &#039;&#039;yourprefix.traitname.plots.pdf&#039;&#039;.&lt;br /&gt;
* RAREMETALWORKER stores plots for recessive and dominant results separated with files named &#039;&#039;yourprefix.traitname.recessive.plots.pdf&#039;&#039; and &#039;&#039;yourprefix.traitname.dominant.plots.pdf&#039;&#039;.&lt;br /&gt;
* RAREMETALWORKER automatically generates three stratified QQ plots, one with all variants, one with variants of maf&amp;lt;0.05, and one with variants of maf&amp;lt;0.01.&lt;br /&gt;
* Genomic controls are automatically calculated and labeled in QQ plots. &lt;br /&gt;
* By using --labelHits option, users can choose to label the hits. &lt;br /&gt;
* Here is an example QQ plot and manhattan plot generated by RAREMETALWORKER.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; width=&amp;quot;100&amp;quot; | [[File:QQ.png]]&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; width=&amp;quot;200&amp;quot; | [[File:Single_var_manhattan.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===SPECIAL TOPICS===&lt;br /&gt;
* For special topics such as how RAREMEALWORKER handles missing data, unrelated individuals, markers on chromosomeX, please go to [[RAREMETALWORKER_SPECIAL_TOPICS | &#039;&#039;&#039;SPECIAL TOPICS&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
== Example Command Lines ==&lt;br /&gt;
&lt;br /&gt;
The following list a few popular combinations of options used for analyses. For an itemized description of options, please go to [[RAREMETALWORKER_command_reference | &#039;&#039;&#039;COMMAND REFERENCE&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
===General Usage===&lt;br /&gt;
&lt;br /&gt;
* If your PED file has many traits but you only want one of them to be analyzed, then the following command does the trick:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --traitName BMI --prefix yourFavoritePrefix&lt;br /&gt;
&lt;br /&gt;
* If you want to inverse normalize (quantile normalize) your trait before doing associations, this can be done by adding --inverseNormal to your command line:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --traitName BMI --prefix yourFavoritePrefix --inverseNormal&lt;br /&gt;
&lt;br /&gt;
* The following command will adjust covariates first and then use residuals to proceed association:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --traitName BMI --prefix yourFavoritePrefix --makeResiduals&lt;br /&gt;
&lt;br /&gt;
* The following command will adjust covariates first and then use the inverse normalized residuals to proceed association:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --traitName BMI --prefix yourFavoritePrefix --makeResiduals --inverseNormal&lt;br /&gt;
&lt;br /&gt;
=== Related individuals ===&lt;br /&gt;
&lt;br /&gt;
* When pedigree is known and you want to use it to count for relatedness then the following command can be used:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --kinPedigree --prefix yourFavoritePrefix&lt;br /&gt;
&lt;br /&gt;
* When you want to an estimated genomic relationship matrix to count for relatedness then the following command can be used:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --prefix yourFavoritePrefix --kinGeno --kinSave (this will save the genomic relationship matrix for future use)&lt;br /&gt;
&lt;br /&gt;
* If the genomic relationship matrix has been saved previously, and you want to use it to count for relatedness then the following command can be used:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --prefix yourFavoritePrefix --kinFile yourPreviouslySavedKinship&lt;br /&gt;
&lt;br /&gt;
=== Unrelated individuals ===&lt;br /&gt;
&lt;br /&gt;
* To analyze individuals as unrelated, even if pedigree is known, you just have to use the following command:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --vcf yourInput.vcf.gz --prefix yourFavoritePrefix&lt;br /&gt;
&lt;br /&gt;
===Analyzing Chromosome X===&lt;br /&gt;
&lt;br /&gt;
* To analyze markers on chromosome X, if relatedness is not considered, then no special options needs to be issued. &lt;br /&gt;
&lt;br /&gt;
* When relatedness is modeled using linear mixed model, and pedigree is known, then the following command fits use both autosomal kinship and chromosomeX kinship to fit a variance component model:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --kinPedigree --vcX --vcf yourInput.vcf.gz --prefix yourFavoritePrefix &lt;br /&gt;
&lt;br /&gt;
* Adding --separateX to the above command line will only use chromosome X kinship to fit the variance component model:&lt;br /&gt;
&lt;br /&gt;
  prompt&amp;gt; $PATH/bin/raremetalworker --ped yourInput.ped --dat yourInput.dat --kinPedigree --vcX --separateX --vcf yourInput.vcf.gz --prefix yourFavoritePrefix&lt;br /&gt;
&lt;br /&gt;
* Please refer to [[RAREMETALWORKER_method | &#039;&#039;&#039;METHODS&#039;&#039;&#039;]] for methods and [[RAREMETALWORKER_SPECIAL_TOPICS#Analyzing_Chromosome_X | &#039;&#039;&#039;SPECIAL TOPICS&#039;&#039;&#039;]] for technical details.&lt;br /&gt;
&lt;br /&gt;
===Using MERLIN format PED/DAT INPUT FILES===&lt;br /&gt;
* When genotypes are stored in MERLIN format PED/DAT files, command should be the same to do the above analysis, except --vcf option should be excluded.&lt;br /&gt;
* Please refer to [[RAREMETALWORKER#PED_and_DAT_Files | &#039;&#039;&#039;PED/DAT format&#039;&#039;&#039;]] for format requirements.&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
* For a comprehensive tutorial of RMW and RAREMETAL using example data sets, please go to the following:&lt;br /&gt;
&lt;br /&gt;
  [http://genome.sph.umich.edu/wiki/Tutorial:_RareMETAL &#039;&#039;&#039;RAREMETAL and RAREMETALWORKER Tutorial&#039;&#039;&#039;]&lt;/div&gt;</summary>
		<author><name>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=12480</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=12480"/>
		<updated>2015-01-13T01:50:53Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* 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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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.7+] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 3.0+]. Note that if using R 3.1, you must install LocusZoom 1.3 (previous versions will fail.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK]&lt;br /&gt;
*[http://samtools.sourceforge.net/ tabix], downloaded with samtools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.3&#039;&#039;&#039;, released on June 20th, 2014.  &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. 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;
== 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;
== Changes in Version 1.3 == &lt;br /&gt;
&lt;br /&gt;
New features: &lt;br /&gt;
&lt;br /&gt;
* Database and GWAS catalog files updated for hg19&lt;br /&gt;
* [[#Plotting BED tracks| Adding BED tracks]]&lt;br /&gt;
* [[#Updating the existing locuszoom database(s)| Update locuszoom&#039;s database without waiting for a release]]&lt;br /&gt;
* [[#Specify gene table (refFlat, GENCODE, etc.) | Use different gene information tables + GENCODE support]]&lt;br /&gt;
* [[#EPACTS formatted file|Support for tabix indexed EPACTS files]]&lt;br /&gt;
* [[#Reading from STDIN| Read data from STDIN]]&lt;br /&gt;
* [[#Plotting options| New plotting options for color, significance lines]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Provide multiple chromosome separated VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&lt;br /&gt;
&lt;br /&gt;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Install tabix ===&lt;br /&gt;
&lt;br /&gt;
Tabix is used to quickly extract regions from bgzipped and tabix-indexed files. It is used in LocusZoom to extract regions from VCF files when calculating LD, and for extracting from EPACTS result files. &lt;br /&gt;
&lt;br /&gt;
It can be downloaded from the sourceforge site [http://samtools.sourceforge.net/ here] or directly to the download site [http://sourceforge.net/projects/samtools/files/ here].&lt;br /&gt;
&lt;br /&gt;
=== Step 6: 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 and hg19&#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;
***dbmeister.py (script for creating custom user databases)&lt;br /&gt;
***lzupdate.py (script for creating an updated copy of the provided locuszoom database)&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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#00CC33&amp;quot;&amp;gt;&#039;&#039;&#039;Note&#039;&#039;&#039;&amp;lt;/span&amp;gt;: LocusZoom (as of 1.3) will now use the tabix index for the EPACTS file if it exists and if tabix is intalled on your system. This results in much faster loading of EPACTS files and should absolutely be used if possible. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;Warning&#039;&#039;&#039;&amp;lt;/span&amp;gt;: The &amp;quot;test&amp;quot; version of EPACTS changed the format of the output. To make LZ work, you&#039;ll also need to add &amp;lt;code&amp;gt;--epacts-beg-col BEG&amp;lt;/code&amp;gt; to your command line.&lt;br /&gt;
&lt;br /&gt;
==== Reading from STDIN ====&lt;br /&gt;
&lt;br /&gt;
If you have a quick way of pulling out regions from your association results to plot (such as with tabix), you can pass the data directly to locuszoom on STDIN by specifying the file as &amp;quot;-&amp;quot;. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tabix -h my_file.gz 1:1-10000 | locuszoom --metal - --refgene TCF7L2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In version 1.3, if you have VCF files separated out by chromosome, you can create a JSON file mapping chromosome name --&amp;gt; VCF file, and provide the JSON file to --ld-vcf. For example, the JSON file could look like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;X&amp;quot;: &amp;quot;/path/to/X.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;Y&amp;quot;: &amp;quot;/path/to/Y.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;MT&amp;quot;: &amp;quot;/path/to/MT.vcf.gz&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then pass it directly using &amp;lt;code&amp;gt;locuszoom --ld-vcf my_vcfs.json&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole-cat_significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example of a method generating such a set of SNPs.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&lt;br /&gt;
&lt;br /&gt;
=== Plotting BED tracks ===&lt;br /&gt;
&lt;br /&gt;
You can supply locuszoom with a BED file, and the tracks within it will be added to the plot. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:Bed_tracks.png]]&lt;br /&gt;
&lt;br /&gt;
Use the --bed-tracks option, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom ... --bed-tracks &amp;lt;your bed file&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BED file should have at least 4 columns: the first 3 for chr/start/end, and the 4th column for the label of the track.&lt;br /&gt;
&lt;br /&gt;
Color can also be specified, but the BED file then needs to follow the full [http://genome.ucsc.edu/FAQ/FAQformat.html#format1 BED format].&lt;br /&gt;
&lt;br /&gt;
=== Specify gene table (refFlat, GENCODE, etc.) ===&lt;br /&gt;
&lt;br /&gt;
You can now specify a different gene information table to use. LocusZoom provides both refFlat and GENCODE. refFlat is the default. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --gene-table gencode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;. 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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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 -log10 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;
New/fixed options in 1.3: &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;
| colorCol=NULL&lt;br /&gt;
| Specify the name of a column in association results file denoting the color each marker should be. This disables coloring by LD. For the column values, color names should be used, for example &amp;quot;red&amp;quot; &amp;quot;olivedrab&amp;quot; etc. &lt;br /&gt;
|-&lt;br /&gt;
| signifLine=NULL&lt;br /&gt;
| Specify (in -log10 p-value scale) where to place a horizontal significance line. Can have multiple lines, e.g. signifLine=&amp;quot;7.3,9&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineColor=NULL&lt;br /&gt;
| Specify color of each significance line, e.g. signifLineColor=&amp;quot;red,blue&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineWidth=NULL&lt;br /&gt;
| Specify the line width for each significance line, e.g. signifLineWidth=&amp;quot;2,3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| showIso=F&lt;br /&gt;
| Show genes as isoforms, rather than collapsed into one canonical transcript. To enable use showIso=T&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options: &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;
=== 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 --build hg18 --source hapmap&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 custom SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide SQLite databases based on UCSC human genome &#039;&#039;&#039;build hg18 and hg19&#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;
=== Updating the existing locuszoom database(s) ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom now comes with a database updating script &amp;lt;code&amp;gt;bin/lzupdate.py&amp;lt;/code&amp;gt;. This script can download the necessary data from UCSC, NCBI, NGHRI, and GENCODE to create an up-to-date database file. The script performs the following actions: &lt;br /&gt;
&lt;br /&gt;
# Download latest SNP table from UCSC for the given build&lt;br /&gt;
# Reformat SNP table for insertion into sqlite database&lt;br /&gt;
# Download latest refFlat from UCSC for the given build&lt;br /&gt;
# Reformat refFlat for insertion into sqlite database&lt;br /&gt;
# (optional) Download GENCODE annotation file from GENCODE FTP site&lt;br /&gt;
# Download RsMergeArch from NCBI&lt;br /&gt;
# Write formatted translation table for old rsIDs to latest (from RsMergeArch)&lt;br /&gt;
# Create a SNP set file (for indicating rug of markers at top of plot for different genotyping arrays)&lt;br /&gt;
# Download the latest NHGRI GWAS catalog&lt;br /&gt;
# Format catalog for use with locuszoom&lt;br /&gt;
# Call &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; to insert everything above (except the GWAS catalog file, which remains a separate file)&lt;br /&gt;
&lt;br /&gt;
An example of running the script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bin/lzupdate.py --build hg19 --gencode 19 --gwas-cat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script will NOT overwrite the existing locuszoom database, since you should likely back it up first (under data/database/*.db). After running the script you should have both a new locuszoom.db file, and a gwas catalog file. You can then either overwrite the locuszoom database after backing it up, or you could place them in a different location and modify the conf file accordingly. The script will provide instructions after running for how to do this. &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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=12479</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=12479"/>
		<updated>2015-01-13T01:50:32Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* 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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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.7+] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 3.0+]. Note that if using R 3.1, you must install LocusZoom 1.3 (previous versions will fail.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK]&lt;br /&gt;
*[http://samtools.sourceforge.net/ tabix], downloaded with samtools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.3&#039;&#039;&#039;, released on June 20th, 2014.  &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. 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;
== 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;
== Changes in Version 1.3 == &lt;br /&gt;
&lt;br /&gt;
New features: &lt;br /&gt;
&lt;br /&gt;
* Database and GWAS catalog files updated for hg19&lt;br /&gt;
* [[#Plotting BED tracks| Adding BED tracks]]&lt;br /&gt;
* [[#Updating the existing locuszoom database(s)| Update locuszoom&#039;s database without waiting for a release]]&lt;br /&gt;
* [[#Specify gene table (refFlat, GENCODE, etc.) | Use different gene information tables + GENCODE support]]&lt;br /&gt;
* [[#EPACTS formatted file|Support for tabix indexed EPACTS files]]&lt;br /&gt;
* [[#Reading from STDIN| Read data from STDIN]]&lt;br /&gt;
* [[#Plotting options| New plotting options for color, significance lines]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Provide multiple chromosome separated VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&lt;br /&gt;
&lt;br /&gt;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Install tabix ===&lt;br /&gt;
&lt;br /&gt;
Tabix is used to quickly extract regions from bgzipped and tabix-indexed files. It is used in LocusZoom to extract regions from VCF files when calculating LD, and for extracting from EPACTS result files. &lt;br /&gt;
&lt;br /&gt;
It can be downloaded from the sourceforge site [http://samtools.sourceforge.net/ here] or directly to the download site [http://sourceforge.net/projects/samtools/files/ here].&lt;br /&gt;
&lt;br /&gt;
=== Step 6: 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 and hg19&#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;
***dbmeister.py (script for creating custom user databases)&lt;br /&gt;
***lzupdate.py (script for creating an updated copy of the provided locuszoom database)&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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#00CC33&amp;quot;&amp;gt;&#039;&#039;&#039;Note&#039;&#039;&#039;&amp;lt;/span&amp;gt;: LocusZoom (as of 1.3) will now use the tabix index for the EPACTS file if it exists and if tabix is intalled on your system. This results in much faster loading of EPACTS files and should absolutely be used if possible. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;Warning&#039;&#039;&#039;&amp;lt;/span&amp;gt;: The &amp;quot;test&amp;quot; version of EPACTS changed the format of the output. To make LZ work, you&#039;ll also need to add &amp;lt;code&amp;gt;--epacts-beg-col BEG&amp;lt;/code&amp;gt; to your command line.&lt;br /&gt;
&lt;br /&gt;
==== Reading from STDIN ====&lt;br /&gt;
&lt;br /&gt;
If you have a quick way of pulling out regions from your association results to plot (such as with tabix), you can pass the data directly to locuszoom on STDIN by specifying the file as &amp;quot;-&amp;quot;. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tabix -h my_file.gz 1:1-10000 | locuszoom --metal - --refgene TCF7L2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In version 1.3, if you have VCF files separated out by chromosome, you can create a JSON file mapping chromosome name --&amp;gt; VCF file, and provide the JSON file to --ld-vcf. For example, the JSON file could look like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;X&amp;quot;: &amp;quot;/path/to/X.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;Y&amp;quot;: &amp;quot;/path/to/Y.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;MT&amp;quot;: &amp;quot;/path/to/MT.vcf.gz&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then pass it directly using &amp;lt;code&amp;gt;locuszoom --ld-vcf my_vcfs.json&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole-cat_significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example of a method generating such a set of SNPs.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&lt;br /&gt;
&lt;br /&gt;
=== Plotting BED tracks ===&lt;br /&gt;
&lt;br /&gt;
You can supply locuszoom with a BED file, and the tracks within it will be added to the plot. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:Bed_tracks.png]]&lt;br /&gt;
&lt;br /&gt;
Use the --bed-tracks option, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom ... --bed-tracks &amp;lt;your bed file&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BED file should have at least 4 columns: the first 3 for chr/start/end, and the 4th column for the label of the track.&lt;br /&gt;
&lt;br /&gt;
Color can also be specified, but the BED file then needs to follow the full [http://genome.ucsc.edu/FAQ/FAQformat.html#format1 BED format].&lt;br /&gt;
&lt;br /&gt;
=== Specify gene table (refFlat, GENCODE, etc.) ===&lt;br /&gt;
&lt;br /&gt;
You can now specify a different gene information table to use. LocusZoom provides both refFlat and GENCODE. refFlat is the default. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --gene-table gencode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;. 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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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 -log10 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;
New/fixed options in 1.3: &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;
| colorCol=NULL&lt;br /&gt;
| Specify the name of a column in association results file denoting the color each marker should be. This disables coloring by LD. Color names should be used, for example &amp;quot;red&amp;quot; &amp;quot;olivedrab&amp;quot; etc. &lt;br /&gt;
|-&lt;br /&gt;
| signifLine=NULL&lt;br /&gt;
| Specify (in -log10 p-value scale) where to place a horizontal significance line. Can have multiple lines, e.g. signifLine=&amp;quot;7.3,9&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineColor=NULL&lt;br /&gt;
| Specify color of each significance line, e.g. signifLineColor=&amp;quot;red,blue&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineWidth=NULL&lt;br /&gt;
| Specify the line width for each significance line, e.g. signifLineWidth=&amp;quot;2,3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| showIso=F&lt;br /&gt;
| Show genes as isoforms, rather than collapsed into one canonical transcript. To enable use showIso=T&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options: &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;
=== 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 --build hg18 --source hapmap&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 custom SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide SQLite databases based on UCSC human genome &#039;&#039;&#039;build hg18 and hg19&#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;
=== Updating the existing locuszoom database(s) ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom now comes with a database updating script &amp;lt;code&amp;gt;bin/lzupdate.py&amp;lt;/code&amp;gt;. This script can download the necessary data from UCSC, NCBI, NGHRI, and GENCODE to create an up-to-date database file. The script performs the following actions: &lt;br /&gt;
&lt;br /&gt;
# Download latest SNP table from UCSC for the given build&lt;br /&gt;
# Reformat SNP table for insertion into sqlite database&lt;br /&gt;
# Download latest refFlat from UCSC for the given build&lt;br /&gt;
# Reformat refFlat for insertion into sqlite database&lt;br /&gt;
# (optional) Download GENCODE annotation file from GENCODE FTP site&lt;br /&gt;
# Download RsMergeArch from NCBI&lt;br /&gt;
# Write formatted translation table for old rsIDs to latest (from RsMergeArch)&lt;br /&gt;
# Create a SNP set file (for indicating rug of markers at top of plot for different genotyping arrays)&lt;br /&gt;
# Download the latest NHGRI GWAS catalog&lt;br /&gt;
# Format catalog for use with locuszoom&lt;br /&gt;
# Call &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; to insert everything above (except the GWAS catalog file, which remains a separate file)&lt;br /&gt;
&lt;br /&gt;
An example of running the script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bin/lzupdate.py --build hg19 --gencode 19 --gwas-cat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script will NOT overwrite the existing locuszoom database, since you should likely back it up first (under data/database/*.db). After running the script you should have both a new locuszoom.db file, and a gwas catalog file. You can then either overwrite the locuszoom database after backing it up, or you could place them in a different location and modify the conf file accordingly. The script will provide instructions after running for how to do this. &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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=12478</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=12478"/>
		<updated>2015-01-13T01:50:02Z</updated>

		<summary type="html">&lt;p&gt;Welchr: &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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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.7+] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 3.0+]. Note that if using R 3.1, you must install LocusZoom 1.3 (previous versions will fail.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK]&lt;br /&gt;
*[http://samtools.sourceforge.net/ tabix], downloaded with samtools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.3&#039;&#039;&#039;, released on June 20th, 2014.  &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. 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;
== 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;
== Changes in Version 1.3 == &lt;br /&gt;
&lt;br /&gt;
New features: &lt;br /&gt;
&lt;br /&gt;
* Database and GWAS catalog files updated for hg19&lt;br /&gt;
* [[#Plotting BED tracks| Adding BED tracks]]&lt;br /&gt;
* [[#Updating the existing locuszoom database(s)| Update locuszoom&#039;s database without waiting for a release]]&lt;br /&gt;
* [[#Specify gene table (refFlat, GENCODE, etc.) | Use different gene information tables + GENCODE support]]&lt;br /&gt;
* [[#EPACTS formatted file|Support for tabix indexed EPACTS files]]&lt;br /&gt;
* [[#Reading from STDIN| Read data from STDIN]]&lt;br /&gt;
* [[#Plotting options| New plotting options for color, significance lines]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Provide multiple chromosome separated VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&lt;br /&gt;
&lt;br /&gt;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Install tabix ===&lt;br /&gt;
&lt;br /&gt;
Tabix is used to quickly extract regions from bgzipped and tabix-indexed files. It is used in LocusZoom to extract regions from VCF files when calculating LD, and for extracting from EPACTS result files. &lt;br /&gt;
&lt;br /&gt;
It can be downloaded from the sourceforge site [http://samtools.sourceforge.net/ here] or directly to the download site [http://sourceforge.net/projects/samtools/files/ here].&lt;br /&gt;
&lt;br /&gt;
=== Step 6: 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 and hg19&#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;
***dbmeister.py (script for creating custom user databases)&lt;br /&gt;
***lzupdate.py (script for creating an updated copy of the provided locuszoom database)&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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#00CC33&amp;quot;&amp;gt;&#039;&#039;&#039;Note&#039;&#039;&#039;&amp;lt;/span&amp;gt;: LocusZoom (as of 1.3) will now use the tabix index for the EPACTS file if it exists and if tabix is intalled on your system. This results in much faster loading of EPACTS files and should absolutely be used if possible. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;Warning&#039;&#039;&#039;&amp;lt;/span&amp;gt;: The &amp;quot;test&amp;quot; version of EPACTS changed the format of the output. To make LZ work, you&#039;ll also need to add &amp;lt;code&amp;gt;--epacts-beg-col BEG&amp;lt;/code&amp;gt; to your command line.&lt;br /&gt;
&lt;br /&gt;
==== Reading from STDIN ====&lt;br /&gt;
&lt;br /&gt;
If you have a quick way of pulling out regions from your association results to plot (such as with tabix), you can pass the data directly to locuszoom on STDIN by specifying the file as &amp;quot;-&amp;quot;. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tabix -h my_file.gz 1:1-10000 | locuszoom --metal - --refgene TCF7L2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In version 1.3, if you have VCF files separated out by chromosome, you can create a JSON file mapping chromosome name --&amp;gt; VCF file, and provide the JSON file to --ld-vcf. For example, the JSON file could look like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;X&amp;quot;: &amp;quot;/path/to/X.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;Y&amp;quot;: &amp;quot;/path/to/Y.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;MT&amp;quot;: &amp;quot;/path/to/MT.vcf.gz&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then pass it directly using &amp;lt;code&amp;gt;locuszoom --ld-vcf my_vcfs.json&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole-cat_significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example of a method generating such a set of SNPs.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&lt;br /&gt;
&lt;br /&gt;
=== Plotting BED tracks ===&lt;br /&gt;
&lt;br /&gt;
You can supply locuszoom with a BED file, and the tracks within it will be added to the plot. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:Bed_tracks.png]]&lt;br /&gt;
&lt;br /&gt;
Use the --bed-tracks option, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom ... --bed-tracks &amp;lt;your bed file&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BED file should have at least 4 columns: the first 3 for chr/start/end, and the 4th column for the label of the track.&lt;br /&gt;
&lt;br /&gt;
Color can also be specified, but the BED file then needs to follow the full [http://genome.ucsc.edu/FAQ/FAQformat.html#format1 BED format].&lt;br /&gt;
&lt;br /&gt;
=== Specify gene table (refFlat, GENCODE, etc.) ===&lt;br /&gt;
&lt;br /&gt;
You can now specify a different gene information table to use. LocusZoom provides both refFlat and GENCODE. refFlat is the default. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --gene-table gencode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;. 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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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 -log10 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;
New/fixed options in 1.3: &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;
| colorCol=NULL&lt;br /&gt;
| Specify the name of a column in association results file denoting the color each marker should be. This disables coloring by LD. &lt;br /&gt;
|-&lt;br /&gt;
| signifLine=NULL&lt;br /&gt;
| Specify (in -log10 p-value scale) where to place a horizontal significance line. Can have multiple lines, e.g. signifLine=&amp;quot;7.3,9&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineColor=NULL&lt;br /&gt;
| Specify color of each significance line, e.g. signifLineColor=&amp;quot;red,blue&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineWidth=NULL&lt;br /&gt;
| Specify the line width for each significance line, e.g. signifLineWidth=&amp;quot;2,3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| showIso=F&lt;br /&gt;
| Show genes as isoforms, rather than collapsed into one canonical transcript. To enable use showIso=T&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options: &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;
=== 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 --build hg18 --source hapmap&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 custom SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide SQLite databases based on UCSC human genome &#039;&#039;&#039;build hg18 and hg19&#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;
=== Updating the existing locuszoom database(s) ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom now comes with a database updating script &amp;lt;code&amp;gt;bin/lzupdate.py&amp;lt;/code&amp;gt;. This script can download the necessary data from UCSC, NCBI, NGHRI, and GENCODE to create an up-to-date database file. The script performs the following actions: &lt;br /&gt;
&lt;br /&gt;
# Download latest SNP table from UCSC for the given build&lt;br /&gt;
# Reformat SNP table for insertion into sqlite database&lt;br /&gt;
# Download latest refFlat from UCSC for the given build&lt;br /&gt;
# Reformat refFlat for insertion into sqlite database&lt;br /&gt;
# (optional) Download GENCODE annotation file from GENCODE FTP site&lt;br /&gt;
# Download RsMergeArch from NCBI&lt;br /&gt;
# Write formatted translation table for old rsIDs to latest (from RsMergeArch)&lt;br /&gt;
# Create a SNP set file (for indicating rug of markers at top of plot for different genotyping arrays)&lt;br /&gt;
# Download the latest NHGRI GWAS catalog&lt;br /&gt;
# Format catalog for use with locuszoom&lt;br /&gt;
# Call &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; to insert everything above (except the GWAS catalog file, which remains a separate file)&lt;br /&gt;
&lt;br /&gt;
An example of running the script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bin/lzupdate.py --build hg19 --gencode 19 --gwas-cat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script will NOT overwrite the existing locuszoom database, since you should likely back it up first (under data/database/*.db). After running the script you should have both a new locuszoom.db file, and a gwas catalog file. You can then either overwrite the locuszoom database after backing it up, or you could place them in a different location and modify the conf file accordingly. The script will provide instructions after running for how to do this. &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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=11404</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=11404"/>
		<updated>2014-09-03T04:14:44Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Plotting BED tracks */&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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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.7+] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 3.0+]. Note that if using R 3.1, you must install LocusZoom 1.3 (previous versions will fail.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK]&lt;br /&gt;
*[http://samtools.sourceforge.net/ tabix], downloaded with samtools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.3&#039;&#039;&#039;, released on June 20th, 2014.  &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. 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;
== 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;
== Changes in Version 1.3 == &lt;br /&gt;
&lt;br /&gt;
New features: &lt;br /&gt;
&lt;br /&gt;
* Database and GWAS catalog files updated for hg19&lt;br /&gt;
* [[#Plotting BED tracks| Adding BED tracks]]&lt;br /&gt;
* [[#Updating the existing locuszoom database(s)| Update locuszoom&#039;s database without waiting for a release]]&lt;br /&gt;
* [[#Specify gene table (refFlat, GENCODE, etc.) | Use different gene information tables + GENCODE support]]&lt;br /&gt;
* [[#EPACTS formatted file|Support for tabix indexed EPACTS files]]&lt;br /&gt;
* [[#Reading from STDIN| Read data from STDIN]]&lt;br /&gt;
* [[#Plotting options| New plotting options for color, significance lines]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Provide multiple chromosome separated VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&lt;br /&gt;
&lt;br /&gt;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Install tabix ===&lt;br /&gt;
&lt;br /&gt;
Tabix is used to quickly extract regions from bgzipped and tabix-indexed files. It is used in LocusZoom to extract regions from VCF files when calculating LD, and for extracting from EPACTS result files. &lt;br /&gt;
&lt;br /&gt;
It can be downloaded from the sourceforge site [http://samtools.sourceforge.net/ here] or directly to the download site [http://sourceforge.net/projects/samtools/files/ here].&lt;br /&gt;
&lt;br /&gt;
=== Step 6: 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 and hg19&#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;
***dbmeister.py (script for creating custom user databases)&lt;br /&gt;
***lzupdate.py (script for creating an updated copy of the provided locuszoom database)&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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#00CC33&amp;quot;&amp;gt;&#039;&#039;&#039;Note&#039;&#039;&#039;&amp;lt;/span&amp;gt;: LocusZoom (as of 1.3) will now use the tabix index for the EPACTS file if it exists and if tabix is intalled on your system. This results in much faster loading of EPACTS files and should absolutely be used if possible. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;Warning&#039;&#039;&#039;&amp;lt;/span&amp;gt;: The &amp;quot;test&amp;quot; version of EPACTS changed the format of the output. To make LZ work, you&#039;ll also need to add &amp;lt;code&amp;gt;--epacts-beg-col BEG&amp;lt;/code&amp;gt; to your command line.&lt;br /&gt;
&lt;br /&gt;
==== Reading from STDIN ====&lt;br /&gt;
&lt;br /&gt;
If you have a quick way of pulling out regions from your association results to plot (such as with tabix), you can pass the data directly to locuszoom on STDIN by specifying the file as &amp;quot;-&amp;quot;. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tabix -h my_file.gz 1:1-10000 | locuszoom --metal - --refgene TCF7L2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In version 1.3, if you have VCF files separated out by chromosome, you can create a JSON file mapping chromosome name --&amp;gt; VCF file, and provide the JSON file to --ld-vcf. For example, the JSON file could look like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;X&amp;quot;: &amp;quot;/path/to/X.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;Y&amp;quot;: &amp;quot;/path/to/Y.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;MT&amp;quot;: &amp;quot;/path/to/MT.vcf.gz&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then pass it directly using &amp;lt;code&amp;gt;locuszoom --ld-vcf my_vcfs.json&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole-cat_significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example of a method generating such a set of SNPs.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&lt;br /&gt;
&lt;br /&gt;
=== Plotting BED tracks ===&lt;br /&gt;
&lt;br /&gt;
You can supply locuszoom with a BED file, and the tracks within it will be added to the plot. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:Bed_tracks.png]]&lt;br /&gt;
&lt;br /&gt;
Use the --bed-tracks option, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom ... --bed-tracks &amp;lt;your bed file&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BED file should have at least 4 columns: the first 3 for chr/start/end, and the 4th column for the label of the track.&lt;br /&gt;
&lt;br /&gt;
Color can also be specified, but the BED file then needs to follow the full [http://genome.ucsc.edu/FAQ/FAQformat.html#format1 BED format].&lt;br /&gt;
&lt;br /&gt;
=== Specify gene table (refFlat, GENCODE, etc.) ===&lt;br /&gt;
&lt;br /&gt;
You can now specify a different gene information table to use. LocusZoom provides both refFlat and GENCODE. refFlat is the default. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --gene-table gencode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;. 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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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 -log10 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;
New/fixed options in 1.3: &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;
| colorCol=NULL&lt;br /&gt;
| Specify the name of a column in association results file denoting the color each marker should be. This disables coloring by LD. &lt;br /&gt;
|-&lt;br /&gt;
| signifLine=NULL&lt;br /&gt;
| Specify (in p-value scale) where to place a horizontal significance line. Can have multiple lines, e.g. signifLine=&amp;quot;5e-08,1e-10&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineColor=NULL&lt;br /&gt;
| Specify color of each significance line, e.g. signifLineColor=&amp;quot;red,blue&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineWidth=NULL&lt;br /&gt;
| Specify the line width for each significance line, e.g. signifLineWidth=&amp;quot;2,3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| showIso=F&lt;br /&gt;
| Show genes as isoforms, rather than collapsed into one canonical transcript. To enable use showIso=T&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options: &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;
=== 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 --build hg18 --source hapmap&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 custom SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide SQLite databases based on UCSC human genome &#039;&#039;&#039;build hg18 and hg19&#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;
=== Updating the existing locuszoom database(s) ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom now comes with a database updating script &amp;lt;code&amp;gt;bin/lzupdate.py&amp;lt;/code&amp;gt;. This script can download the necessary data from UCSC, NCBI, NGHRI, and GENCODE to create an up-to-date database file. The script performs the following actions: &lt;br /&gt;
&lt;br /&gt;
# Download latest SNP table from UCSC for the given build&lt;br /&gt;
# Reformat SNP table for insertion into sqlite database&lt;br /&gt;
# Download latest refFlat from UCSC for the given build&lt;br /&gt;
# Reformat refFlat for insertion into sqlite database&lt;br /&gt;
# (optional) Download GENCODE annotation file from GENCODE FTP site&lt;br /&gt;
# Download RsMergeArch from NCBI&lt;br /&gt;
# Write formatted translation table for old rsIDs to latest (from RsMergeArch)&lt;br /&gt;
# Create a SNP set file (for indicating rug of markers at top of plot for different genotyping arrays)&lt;br /&gt;
# Download the latest NHGRI GWAS catalog&lt;br /&gt;
# Format catalog for use with locuszoom&lt;br /&gt;
# Call &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; to insert everything above (except the GWAS catalog file, which remains a separate file)&lt;br /&gt;
&lt;br /&gt;
An example of running the script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bin/lzupdate.py --build hg19 --gencode 19 --gwas-cat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script will NOT overwrite the existing locuszoom database, since you should likely back it up first (under data/database/*.db). After running the script you should have both a new locuszoom.db file, and a gwas catalog file. You can then either overwrite the locuszoom database after backing it up, or you could place them in a different location and modify the conf file accordingly. The script will provide instructions after running for how to do this. &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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=11389</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=11389"/>
		<updated>2014-09-01T17:16:12Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Fine-mapping credible sets */&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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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.7+] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 3.0+]. Note that if using R 3.1, you must install LocusZoom 1.3 (previous versions will fail.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK]&lt;br /&gt;
*[http://samtools.sourceforge.net/ tabix], downloaded with samtools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.3&#039;&#039;&#039;, released on June 20th, 2014.  &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. 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;
== 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;
== Changes in Version 1.3 == &lt;br /&gt;
&lt;br /&gt;
New features: &lt;br /&gt;
&lt;br /&gt;
* Database and GWAS catalog files updated for hg19&lt;br /&gt;
* [[#Plotting BED tracks| Adding BED tracks]]&lt;br /&gt;
* [[#Updating the existing locuszoom database(s)| Update locuszoom&#039;s database without waiting for a release]]&lt;br /&gt;
* [[#Specify gene table (refFlat, GENCODE, etc.) | Use different gene information tables + GENCODE support]]&lt;br /&gt;
* [[#EPACTS formatted file|Support for tabix indexed EPACTS files]]&lt;br /&gt;
* [[#Reading from STDIN| Read data from STDIN]]&lt;br /&gt;
* [[#Plotting options| New plotting options for color, significance lines]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Provide multiple chromosome separated VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&lt;br /&gt;
&lt;br /&gt;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Install tabix ===&lt;br /&gt;
&lt;br /&gt;
Tabix is used to quickly extract regions from bgzipped and tabix-indexed files. It is used in LocusZoom to extract regions from VCF files when calculating LD, and for extracting from EPACTS result files. &lt;br /&gt;
&lt;br /&gt;
It can be downloaded from the sourceforge site [http://samtools.sourceforge.net/ here] or directly to the download site [http://sourceforge.net/projects/samtools/files/ here].&lt;br /&gt;
&lt;br /&gt;
=== Step 6: 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 and hg19&#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;
***dbmeister.py (script for creating custom user databases)&lt;br /&gt;
***lzupdate.py (script for creating an updated copy of the provided locuszoom database)&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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#00CC33&amp;quot;&amp;gt;&#039;&#039;&#039;Note&#039;&#039;&#039;&amp;lt;/span&amp;gt;: LocusZoom (as of 1.3) will now use the tabix index for the EPACTS file if it exists and if tabix is intalled on your system. This results in much faster loading of EPACTS files and should absolutely be used if possible. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;Warning&#039;&#039;&#039;&amp;lt;/span&amp;gt;: The &amp;quot;test&amp;quot; version of EPACTS changed the format of the output. To make LZ work, you&#039;ll also need to add &amp;lt;code&amp;gt;--epacts-beg-col BEG&amp;lt;/code&amp;gt; to your command line.&lt;br /&gt;
&lt;br /&gt;
==== Reading from STDIN ====&lt;br /&gt;
&lt;br /&gt;
If you have a quick way of pulling out regions from your association results to plot (such as with tabix), you can pass the data directly to locuszoom on STDIN by specifying the file as &amp;quot;-&amp;quot;. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tabix -h my_file.gz 1:1-10000 | locuszoom --metal - --refgene TCF7L2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In version 1.3, if you have VCF files separated out by chromosome, you can create a JSON file mapping chromosome name --&amp;gt; VCF file, and provide the JSON file to --ld-vcf. For example, the JSON file could look like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;X&amp;quot;: &amp;quot;/path/to/X.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;Y&amp;quot;: &amp;quot;/path/to/Y.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;MT&amp;quot;: &amp;quot;/path/to/MT.vcf.gz&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then pass it directly using &amp;lt;code&amp;gt;locuszoom --ld-vcf my_vcfs.json&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole-cat_significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example of a method generating such a set of SNPs.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&lt;br /&gt;
&lt;br /&gt;
=== Plotting BED tracks ===&lt;br /&gt;
&lt;br /&gt;
You can supply locuszoom with a BED file, and the tracks within it will be added to the plot. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:Bed_tracks.png]]&lt;br /&gt;
&lt;br /&gt;
Use the --bed-tracks option, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom ... --bed-tracks &amp;lt;your bed file&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BED file should have 4 columns: the first 3 for chr/start/end, and the 4th column for the label of the track.&lt;br /&gt;
&lt;br /&gt;
=== Specify gene table (refFlat, GENCODE, etc.) ===&lt;br /&gt;
&lt;br /&gt;
You can now specify a different gene information table to use. LocusZoom provides both refFlat and GENCODE. refFlat is the default. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --gene-table gencode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;. 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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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 -log10 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;
New/fixed options in 1.3: &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;
| colorCol=NULL&lt;br /&gt;
| Specify the name of a column in association results file denoting the color each marker should be. This disables coloring by LD. &lt;br /&gt;
|-&lt;br /&gt;
| signifLine=NULL&lt;br /&gt;
| Specify (in p-value scale) where to place a horizontal significance line. Can have multiple lines, e.g. signifLine=&amp;quot;5e-08,1e-10&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineColor=NULL&lt;br /&gt;
| Specify color of each significance line, e.g. signifLineColor=&amp;quot;red,blue&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineWidth=NULL&lt;br /&gt;
| Specify the line width for each significance line, e.g. signifLineWidth=&amp;quot;2,3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| showIso=F&lt;br /&gt;
| Show genes as isoforms, rather than collapsed into one canonical transcript. To enable use showIso=T&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options: &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;
=== 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 --build hg18 --source hapmap&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 custom SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide SQLite databases based on UCSC human genome &#039;&#039;&#039;build hg18 and hg19&#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;
=== Updating the existing locuszoom database(s) ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom now comes with a database updating script &amp;lt;code&amp;gt;bin/lzupdate.py&amp;lt;/code&amp;gt;. This script can download the necessary data from UCSC, NCBI, NGHRI, and GENCODE to create an up-to-date database file. The script performs the following actions: &lt;br /&gt;
&lt;br /&gt;
# Download latest SNP table from UCSC for the given build&lt;br /&gt;
# Reformat SNP table for insertion into sqlite database&lt;br /&gt;
# Download latest refFlat from UCSC for the given build&lt;br /&gt;
# Reformat refFlat for insertion into sqlite database&lt;br /&gt;
# (optional) Download GENCODE annotation file from GENCODE FTP site&lt;br /&gt;
# Download RsMergeArch from NCBI&lt;br /&gt;
# Write formatted translation table for old rsIDs to latest (from RsMergeArch)&lt;br /&gt;
# Create a SNP set file (for indicating rug of markers at top of plot for different genotyping arrays)&lt;br /&gt;
# Download the latest NHGRI GWAS catalog&lt;br /&gt;
# Format catalog for use with locuszoom&lt;br /&gt;
# Call &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; to insert everything above (except the GWAS catalog file, which remains a separate file)&lt;br /&gt;
&lt;br /&gt;
An example of running the script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bin/lzupdate.py --build hg19 --gencode 19 --gwas-cat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script will NOT overwrite the existing locuszoom database, since you should likely back it up first (under data/database/*.db). After running the script you should have both a new locuszoom.db file, and a gwas catalog file. You can then either overwrite the locuszoom database after backing it up, or you could place them in a different location and modify the conf file accordingly. The script will provide instructions after running for how to do this. &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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=11109</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=11109"/>
		<updated>2014-06-27T00:41:03Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Plotting BED tracks */&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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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.7+] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 3.0+]. Note that if using R 3.1, you must install LocusZoom 1.3 (previous versions will fail.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK]&lt;br /&gt;
*[http://samtools.sourceforge.net/ tabix], downloaded with samtools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.3&#039;&#039;&#039;, released on June 20th, 2014.  &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. 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;
== 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;
== Changes in Version 1.3 == &lt;br /&gt;
&lt;br /&gt;
New features: &lt;br /&gt;
&lt;br /&gt;
* Database and GWAS catalog files updated for hg19&lt;br /&gt;
* [[#Plotting BED tracks| Adding BED tracks]]&lt;br /&gt;
* [[#Updating the existing locuszoom database(s)| Update locuszoom&#039;s database without waiting for a release]]&lt;br /&gt;
* [[#Specify gene table (refFlat, GENCODE, etc.) | Use different gene information tables + GENCODE support]]&lt;br /&gt;
* [[#EPACTS formatted file|Support for tabix indexed EPACTS files]]&lt;br /&gt;
* [[#Reading from STDIN| Read data from STDIN]]&lt;br /&gt;
* [[#Plotting options| New plotting options for color, significance lines]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Provide multiple chromosome separated VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&lt;br /&gt;
&lt;br /&gt;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Install tabix ===&lt;br /&gt;
&lt;br /&gt;
Tabix is used to quickly extract regions from bgzipped and tabix-indexed files. It is used in LocusZoom to extract regions from VCF files when calculating LD, and for extracting from EPACTS result files. &lt;br /&gt;
&lt;br /&gt;
It can be downloaded from the sourceforge site [http://samtools.sourceforge.net/ here] or directly to the download site [http://sourceforge.net/projects/samtools/files/ here].&lt;br /&gt;
&lt;br /&gt;
=== Step 6: 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 and hg19&#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;
***dbmeister.py (script for creating custom user databases)&lt;br /&gt;
***lzupdate.py (script for creating an updated copy of the provided locuszoom database)&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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#00CC33&amp;quot;&amp;gt;&#039;&#039;&#039;Note&#039;&#039;&#039;&amp;lt;/span&amp;gt;: LocusZoom (as of 1.3) will now use the tabix index for the EPACTS file if it exists and if tabix is intalled on your system. This results in much faster loading of EPACTS files and should absolutely be used if possible. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;Warning&#039;&#039;&#039;&amp;lt;/span&amp;gt;: The &amp;quot;test&amp;quot; version of EPACTS changed the format of the output. To make LZ work, you&#039;ll also need to add &amp;lt;code&amp;gt;--epacts-beg-col BEG&amp;lt;/code&amp;gt; to your command line.&lt;br /&gt;
&lt;br /&gt;
==== Reading from STDIN ====&lt;br /&gt;
&lt;br /&gt;
If you have a quick way of pulling out regions from your association results to plot (such as with tabix), you can pass the data directly to locuszoom on STDIN by specifying the file as &amp;quot;-&amp;quot;. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tabix -h my_file.gz 1:1-10000 | locuszoom --metal - --refgene TCF7L2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In version 1.3, if you have VCF files separated out by chromosome, you can create a JSON file mapping chromosome name --&amp;gt; VCF file, and provide the JSON file to --ld-vcf. For example, the JSON file could look like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;X&amp;quot;: &amp;quot;/path/to/X.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;Y&amp;quot;: &amp;quot;/path/to/Y.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;MT&amp;quot;: &amp;quot;/path/to/MT.vcf.gz&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then pass it directly using &amp;lt;code&amp;gt;locuszoom --ld-vcf my_vcfs.json&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole-cat_significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&lt;br /&gt;
&lt;br /&gt;
=== Plotting BED tracks ===&lt;br /&gt;
&lt;br /&gt;
You can supply locuszoom with a BED file, and the tracks within it will be added to the plot. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:Bed_tracks.png]]&lt;br /&gt;
&lt;br /&gt;
Use the --bed-tracks option, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom ... --bed-tracks &amp;lt;your bed file&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BED file should have 4 columns: the first 3 for chr/start/end, and the 4th column for the label of the track.&lt;br /&gt;
&lt;br /&gt;
=== Specify gene table (refFlat, GENCODE, etc.) ===&lt;br /&gt;
&lt;br /&gt;
You can now specify a different gene information table to use. LocusZoom provides both refFlat and GENCODE. refFlat is the default. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --gene-table gencode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;. 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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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 -log10 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;
New/fixed options in 1.3: &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;
| colorCol=NULL&lt;br /&gt;
| Specify the name of a column in association results file denoting the color each marker should be. This disables coloring by LD. &lt;br /&gt;
|-&lt;br /&gt;
| signifLine=NULL&lt;br /&gt;
| Specify (in p-value scale) where to place a horizontal significance line. Can have multiple lines, e.g. signifLine=&amp;quot;5e-08,1e-10&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineColor=NULL&lt;br /&gt;
| Specify color of each significance line, e.g. signifLineColor=&amp;quot;red,blue&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineWidth=NULL&lt;br /&gt;
| Specify the line width for each significance line, e.g. signifLineWidth=&amp;quot;2,3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| showIso=F&lt;br /&gt;
| Show genes as isoforms, rather than collapsed into one canonical transcript. To enable use showIso=T&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options: &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;
=== 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 --build hg18 --source hapmap&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 custom SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide SQLite databases based on UCSC human genome &#039;&#039;&#039;build hg18 and hg19&#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;
=== Updating the existing locuszoom database(s) ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom now comes with a database updating script &amp;lt;code&amp;gt;bin/lzupdate.py&amp;lt;/code&amp;gt;. This script can download the necessary data from UCSC, NCBI, NGHRI, and GENCODE to create an up-to-date database file. The script performs the following actions: &lt;br /&gt;
&lt;br /&gt;
# Download latest SNP table from UCSC for the given build&lt;br /&gt;
# Reformat SNP table for insertion into sqlite database&lt;br /&gt;
# Download latest refFlat from UCSC for the given build&lt;br /&gt;
# Reformat refFlat for insertion into sqlite database&lt;br /&gt;
# (optional) Download GENCODE annotation file from GENCODE FTP site&lt;br /&gt;
# Download RsMergeArch from NCBI&lt;br /&gt;
# Write formatted translation table for old rsIDs to latest (from RsMergeArch)&lt;br /&gt;
# Create a SNP set file (for indicating rug of markers at top of plot for different genotyping arrays)&lt;br /&gt;
# Download the latest NHGRI GWAS catalog&lt;br /&gt;
# Format catalog for use with locuszoom&lt;br /&gt;
# Call &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; to insert everything above (except the GWAS catalog file, which remains a separate file)&lt;br /&gt;
&lt;br /&gt;
An example of running the script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bin/lzupdate.py --build hg19 --gencode 19 --gwas-cat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script will NOT overwrite the existing locuszoom database, since you should likely back it up first (under data/database/*.db). After running the script you should have both a new locuszoom.db file, and a gwas catalog file. You can then either overwrite the locuszoom database after backing it up, or you could place them in a different location and modify the conf file accordingly. The script will provide instructions after running for how to do this. &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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=11075</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=11075"/>
		<updated>2014-06-23T21:33:44Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Plotting BED tracks */&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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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.7+] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 3.0+]. Note that if using R 3.1, you must install LocusZoom 1.3 (previous versions will fail.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK]&lt;br /&gt;
*[http://samtools.sourceforge.net/ tabix], downloaded with samtools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.3&#039;&#039;&#039;, released on June 20th, 2014.  &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. 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;
== 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;
== Changes in Version 1.3 == &lt;br /&gt;
&lt;br /&gt;
New features: &lt;br /&gt;
&lt;br /&gt;
* Database and GWAS catalog files updated for hg19&lt;br /&gt;
* [[#Plotting BED tracks| Adding BED tracks]]&lt;br /&gt;
* [[#Updating the existing locuszoom database(s)| Update locuszoom&#039;s database without waiting for a release]]&lt;br /&gt;
* [[#Specify gene table (refFlat, GENCODE, etc.) | Use different gene information tables + GENCODE support]]&lt;br /&gt;
* [[#EPACTS formatted file|Support for tabix indexed EPACTS files]]&lt;br /&gt;
* [[#Reading from STDIN| Read data from STDIN]]&lt;br /&gt;
* [[#Plotting options| New plotting options for color, significance lines]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Provide multiple chromosome separated VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&lt;br /&gt;
&lt;br /&gt;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Install tabix ===&lt;br /&gt;
&lt;br /&gt;
Tabix is used to quickly extract regions from bgzipped and tabix-indexed files. It is used in LocusZoom to extract regions from VCF files when calculating LD, and for extracting from EPACTS result files. &lt;br /&gt;
&lt;br /&gt;
It can be downloaded from the sourceforge site [http://samtools.sourceforge.net/ here] or directly to the download site [http://sourceforge.net/projects/samtools/files/ here].&lt;br /&gt;
&lt;br /&gt;
=== Step 6: 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 and hg19&#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;
***dbmeister.py (script for creating custom user databases)&lt;br /&gt;
***lzupdate.py (script for creating an updated copy of the provided locuszoom database)&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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#00CC33&amp;quot;&amp;gt;&#039;&#039;&#039;Note&#039;&#039;&#039;&amp;lt;/span&amp;gt;: LocusZoom (as of 1.3) will now use the tabix index for the EPACTS file if it exists and if tabix is intalled on your system. This results in much faster loading of EPACTS files and should absolutely be used if possible. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;Warning&#039;&#039;&#039;&amp;lt;/span&amp;gt;: The &amp;quot;test&amp;quot; version of EPACTS changed the format of the output. To make LZ work, you&#039;ll also need to add &amp;lt;code&amp;gt;--epacts-beg-col BEG&amp;lt;/code&amp;gt; to your command line.&lt;br /&gt;
&lt;br /&gt;
==== Reading from STDIN ====&lt;br /&gt;
&lt;br /&gt;
If you have a quick way of pulling out regions from your association results to plot (such as with tabix), you can pass the data directly to locuszoom on STDIN by specifying the file as &amp;quot;-&amp;quot;. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tabix -h my_file.gz 1:1-10000 | locuszoom --metal - --refgene TCF7L2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In version 1.3, if you have VCF files separated out by chromosome, you can create a JSON file mapping chromosome name --&amp;gt; VCF file, and provide the JSON file to --ld-vcf. For example, the JSON file could look like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;X&amp;quot;: &amp;quot;/path/to/X.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;Y&amp;quot;: &amp;quot;/path/to/Y.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;MT&amp;quot;: &amp;quot;/path/to/MT.vcf.gz&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then pass it directly using &amp;lt;code&amp;gt;locuszoom --ld-vcf my_vcfs.json&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole-cat_significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&lt;br /&gt;
&lt;br /&gt;
=== Plotting BED tracks ===&lt;br /&gt;
&lt;br /&gt;
You can supply locuszoom with a BED file, and the tracks within it will be added to the plot. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:Bed_tracks.png]]&lt;br /&gt;
&lt;br /&gt;
Use the --bed-tracks option, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom ... --bed-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BED file should have 4 columns: the first 3 for chr/start/end, and the 4th column for the label of the track.&lt;br /&gt;
&lt;br /&gt;
=== Specify gene table (refFlat, GENCODE, etc.) ===&lt;br /&gt;
&lt;br /&gt;
You can now specify a different gene information table to use. LocusZoom provides both refFlat and GENCODE. refFlat is the default. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --gene-table gencode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;. 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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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 -log10 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;
New/fixed options in 1.3: &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;
| colorCol=NULL&lt;br /&gt;
| Specify the name of a column in association results file denoting the color each marker should be. This disables coloring by LD. &lt;br /&gt;
|-&lt;br /&gt;
| signifLine=NULL&lt;br /&gt;
| Specify (in p-value scale) where to place a horizontal significance line. Can have multiple lines, e.g. signifLine=&amp;quot;5e-08,1e-10&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineColor=NULL&lt;br /&gt;
| Specify color of each significance line, e.g. signifLineColor=&amp;quot;red,blue&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineWidth=NULL&lt;br /&gt;
| Specify the line width for each significance line, e.g. signifLineWidth=&amp;quot;2,3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| showIso=F&lt;br /&gt;
| Show genes as isoforms, rather than collapsed into one canonical transcript. To enable use showIso=T&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options: &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;
=== 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 --build hg18 --source hapmap&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 custom SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide SQLite databases based on UCSC human genome &#039;&#039;&#039;build hg18 and hg19&#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;
=== Updating the existing locuszoom database(s) ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom now comes with a database updating script &amp;lt;code&amp;gt;bin/lzupdate.py&amp;lt;/code&amp;gt;. This script can download the necessary data from UCSC, NCBI, NGHRI, and GENCODE to create an up-to-date database file. The script performs the following actions: &lt;br /&gt;
&lt;br /&gt;
# Download latest SNP table from UCSC for the given build&lt;br /&gt;
# Reformat SNP table for insertion into sqlite database&lt;br /&gt;
# Download latest refFlat from UCSC for the given build&lt;br /&gt;
# Reformat refFlat for insertion into sqlite database&lt;br /&gt;
# (optional) Download GENCODE annotation file from GENCODE FTP site&lt;br /&gt;
# Download RsMergeArch from NCBI&lt;br /&gt;
# Write formatted translation table for old rsIDs to latest (from RsMergeArch)&lt;br /&gt;
# Create a SNP set file (for indicating rug of markers at top of plot for different genotyping arrays)&lt;br /&gt;
# Download the latest NHGRI GWAS catalog&lt;br /&gt;
# Format catalog for use with locuszoom&lt;br /&gt;
# Call &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; to insert everything above (except the GWAS catalog file, which remains a separate file)&lt;br /&gt;
&lt;br /&gt;
An example of running the script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bin/lzupdate.py --build hg19 --gencode 19 --gwas-cat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script will NOT overwrite the existing locuszoom database, since you should likely back it up first (under data/database/*.db). After running the script you should have both a new locuszoom.db file, and a gwas catalog file. You can then either overwrite the locuszoom database after backing it up, or you could place them in a different location and modify the conf file accordingly. The script will provide instructions after running for how to do this. &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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=11074</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=11074"/>
		<updated>2014-06-23T21:33:27Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Plotting BED tracks */&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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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.7+] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 3.0+]. Note that if using R 3.1, you must install LocusZoom 1.3 (previous versions will fail.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK]&lt;br /&gt;
*[http://samtools.sourceforge.net/ tabix], downloaded with samtools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.3&#039;&#039;&#039;, released on June 20th, 2014.  &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. 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;
== 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;
== Changes in Version 1.3 == &lt;br /&gt;
&lt;br /&gt;
New features: &lt;br /&gt;
&lt;br /&gt;
* Database and GWAS catalog files updated for hg19&lt;br /&gt;
* [[#Plotting BED tracks| Adding BED tracks]]&lt;br /&gt;
* [[#Updating the existing locuszoom database(s)| Update locuszoom&#039;s database without waiting for a release]]&lt;br /&gt;
* [[#Specify gene table (refFlat, GENCODE, etc.) | Use different gene information tables + GENCODE support]]&lt;br /&gt;
* [[#EPACTS formatted file|Support for tabix indexed EPACTS files]]&lt;br /&gt;
* [[#Reading from STDIN| Read data from STDIN]]&lt;br /&gt;
* [[#Plotting options| New plotting options for color, significance lines]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Provide multiple chromosome separated VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&lt;br /&gt;
&lt;br /&gt;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Install tabix ===&lt;br /&gt;
&lt;br /&gt;
Tabix is used to quickly extract regions from bgzipped and tabix-indexed files. It is used in LocusZoom to extract regions from VCF files when calculating LD, and for extracting from EPACTS result files. &lt;br /&gt;
&lt;br /&gt;
It can be downloaded from the sourceforge site [http://samtools.sourceforge.net/ here] or directly to the download site [http://sourceforge.net/projects/samtools/files/ here].&lt;br /&gt;
&lt;br /&gt;
=== Step 6: 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 and hg19&#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;
***dbmeister.py (script for creating custom user databases)&lt;br /&gt;
***lzupdate.py (script for creating an updated copy of the provided locuszoom database)&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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#00CC33&amp;quot;&amp;gt;&#039;&#039;&#039;Note&#039;&#039;&#039;&amp;lt;/span&amp;gt;: LocusZoom (as of 1.3) will now use the tabix index for the EPACTS file if it exists and if tabix is intalled on your system. This results in much faster loading of EPACTS files and should absolutely be used if possible. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;Warning&#039;&#039;&#039;&amp;lt;/span&amp;gt;: The &amp;quot;test&amp;quot; version of EPACTS changed the format of the output. To make LZ work, you&#039;ll also need to add &amp;lt;code&amp;gt;--epacts-beg-col BEG&amp;lt;/code&amp;gt; to your command line.&lt;br /&gt;
&lt;br /&gt;
==== Reading from STDIN ====&lt;br /&gt;
&lt;br /&gt;
If you have a quick way of pulling out regions from your association results to plot (such as with tabix), you can pass the data directly to locuszoom on STDIN by specifying the file as &amp;quot;-&amp;quot;. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tabix -h my_file.gz 1:1-10000 | locuszoom --metal - --refgene TCF7L2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In version 1.3, if you have VCF files separated out by chromosome, you can create a JSON file mapping chromosome name --&amp;gt; VCF file, and provide the JSON file to --ld-vcf. For example, the JSON file could look like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;X&amp;quot;: &amp;quot;/path/to/X.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;Y&amp;quot;: &amp;quot;/path/to/Y.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;MT&amp;quot;: &amp;quot;/path/to/MT.vcf.gz&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then pass it directly using &amp;lt;code&amp;gt;locuszoom --ld-vcf my_vcfs.json&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole-cat_significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&lt;br /&gt;
&lt;br /&gt;
=== Plotting BED tracks ===&lt;br /&gt;
&lt;br /&gt;
You can supply locuszoom with a BED file, and the tracks within it will be added to the plot. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:Bed_tracks.png]]&lt;br /&gt;
&lt;br /&gt;
Use the --bed-tracks option, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --bed-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BED file should have 4 columns: the first 3 for chr/start/end, and the 4th column for the label of the track.&lt;br /&gt;
&lt;br /&gt;
=== Specify gene table (refFlat, GENCODE, etc.) ===&lt;br /&gt;
&lt;br /&gt;
You can now specify a different gene information table to use. LocusZoom provides both refFlat and GENCODE. refFlat is the default. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --gene-table gencode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;. 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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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 -log10 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;
New/fixed options in 1.3: &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;
| colorCol=NULL&lt;br /&gt;
| Specify the name of a column in association results file denoting the color each marker should be. This disables coloring by LD. &lt;br /&gt;
|-&lt;br /&gt;
| signifLine=NULL&lt;br /&gt;
| Specify (in p-value scale) where to place a horizontal significance line. Can have multiple lines, e.g. signifLine=&amp;quot;5e-08,1e-10&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineColor=NULL&lt;br /&gt;
| Specify color of each significance line, e.g. signifLineColor=&amp;quot;red,blue&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineWidth=NULL&lt;br /&gt;
| Specify the line width for each significance line, e.g. signifLineWidth=&amp;quot;2,3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| showIso=F&lt;br /&gt;
| Show genes as isoforms, rather than collapsed into one canonical transcript. To enable use showIso=T&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options: &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;
=== 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 --build hg18 --source hapmap&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 custom SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide SQLite databases based on UCSC human genome &#039;&#039;&#039;build hg18 and hg19&#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;
=== Updating the existing locuszoom database(s) ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom now comes with a database updating script &amp;lt;code&amp;gt;bin/lzupdate.py&amp;lt;/code&amp;gt;. This script can download the necessary data from UCSC, NCBI, NGHRI, and GENCODE to create an up-to-date database file. The script performs the following actions: &lt;br /&gt;
&lt;br /&gt;
# Download latest SNP table from UCSC for the given build&lt;br /&gt;
# Reformat SNP table for insertion into sqlite database&lt;br /&gt;
# Download latest refFlat from UCSC for the given build&lt;br /&gt;
# Reformat refFlat for insertion into sqlite database&lt;br /&gt;
# (optional) Download GENCODE annotation file from GENCODE FTP site&lt;br /&gt;
# Download RsMergeArch from NCBI&lt;br /&gt;
# Write formatted translation table for old rsIDs to latest (from RsMergeArch)&lt;br /&gt;
# Create a SNP set file (for indicating rug of markers at top of plot for different genotyping arrays)&lt;br /&gt;
# Download the latest NHGRI GWAS catalog&lt;br /&gt;
# Format catalog for use with locuszoom&lt;br /&gt;
# Call &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; to insert everything above (except the GWAS catalog file, which remains a separate file)&lt;br /&gt;
&lt;br /&gt;
An example of running the script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bin/lzupdate.py --build hg19 --gencode 19 --gwas-cat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script will NOT overwrite the existing locuszoom database, since you should likely back it up first (under data/database/*.db). After running the script you should have both a new locuszoom.db file, and a gwas catalog file. You can then either overwrite the locuszoom database after backing it up, or you could place them in a different location and modify the conf file accordingly. The script will provide instructions after running for how to do this. &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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=11073</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=11073"/>
		<updated>2014-06-23T21:30:40Z</updated>

		<summary type="html">&lt;p&gt;Welchr: &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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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.7+] (do &#039;&#039;&#039;not&#039;&#039;&#039; download the 3.0 branch!) &lt;br /&gt;
*[http://www.r-project.org/ R 3.0+]. Note that if using R 3.1, you must install LocusZoom 1.3 (previous versions will fail.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK]&lt;br /&gt;
*[http://samtools.sourceforge.net/ tabix], downloaded with samtools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.3&#039;&#039;&#039;, released on June 20th, 2014.  &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. 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;
== 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;
== Changes in Version 1.3 == &lt;br /&gt;
&lt;br /&gt;
New features: &lt;br /&gt;
&lt;br /&gt;
* Database and GWAS catalog files updated for hg19&lt;br /&gt;
* [[#Plotting BED tracks| Adding BED tracks]]&lt;br /&gt;
* [[#Updating the existing locuszoom database(s)| Update locuszoom&#039;s database without waiting for a release]]&lt;br /&gt;
* [[#Specify gene table (refFlat, GENCODE, etc.) | Use different gene information tables + GENCODE support]]&lt;br /&gt;
* [[#EPACTS formatted file|Support for tabix indexed EPACTS files]]&lt;br /&gt;
* [[#Reading from STDIN| Read data from STDIN]]&lt;br /&gt;
* [[#Plotting options| New plotting options for color, significance lines]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Provide multiple chromosome separated VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&lt;br /&gt;
&lt;br /&gt;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Install tabix ===&lt;br /&gt;
&lt;br /&gt;
Tabix is used to quickly extract regions from bgzipped and tabix-indexed files. It is used in LocusZoom to extract regions from VCF files when calculating LD, and for extracting from EPACTS result files. &lt;br /&gt;
&lt;br /&gt;
It can be downloaded from the sourceforge site [http://samtools.sourceforge.net/ here] or directly to the download site [http://sourceforge.net/projects/samtools/files/ here].&lt;br /&gt;
&lt;br /&gt;
=== Step 6: 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 and hg19&#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;
***dbmeister.py (script for creating custom user databases)&lt;br /&gt;
***lzupdate.py (script for creating an updated copy of the provided locuszoom database)&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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#00CC33&amp;quot;&amp;gt;&#039;&#039;&#039;Note&#039;&#039;&#039;&amp;lt;/span&amp;gt;: LocusZoom (as of 1.3) will now use the tabix index for the EPACTS file if it exists and if tabix is intalled on your system. This results in much faster loading of EPACTS files and should absolutely be used if possible. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;Warning&#039;&#039;&#039;&amp;lt;/span&amp;gt;: The &amp;quot;test&amp;quot; version of EPACTS changed the format of the output. To make LZ work, you&#039;ll also need to add &amp;lt;code&amp;gt;--epacts-beg-col BEG&amp;lt;/code&amp;gt; to your command line.&lt;br /&gt;
&lt;br /&gt;
==== Reading from STDIN ====&lt;br /&gt;
&lt;br /&gt;
If you have a quick way of pulling out regions from your association results to plot (such as with tabix), you can pass the data directly to locuszoom on STDIN by specifying the file as &amp;quot;-&amp;quot;. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tabix -h my_file.gz 1:1-10000 | locuszoom --metal - --refgene TCF7L2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In version 1.3, if you have VCF files separated out by chromosome, you can create a JSON file mapping chromosome name --&amp;gt; VCF file, and provide the JSON file to --ld-vcf. For example, the JSON file could look like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;X&amp;quot;: &amp;quot;/path/to/X.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;Y&amp;quot;: &amp;quot;/path/to/Y.vcf.gz&amp;quot;,&lt;br /&gt;
  &amp;quot;MT&amp;quot;: &amp;quot;/path/to/MT.vcf.gz&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then pass it directly using &amp;lt;code&amp;gt;locuszoom --ld-vcf my_vcfs.json&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole-cat_significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&lt;br /&gt;
&lt;br /&gt;
=== Plotting BED tracks ===&lt;br /&gt;
&lt;br /&gt;
You can supply locuszoom with a BED file, and tracks available will be added to the plot. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:Bed_tracks.png]]&lt;br /&gt;
&lt;br /&gt;
Use the --bed-tracks option, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --bed-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BED file should have 4 columns: the first 3 for chr/start/end, and the 4th column for the label of the track. &lt;br /&gt;
&lt;br /&gt;
=== Specify gene table (refFlat, GENCODE, etc.) ===&lt;br /&gt;
&lt;br /&gt;
You can now specify a different gene information table to use. LocusZoom provides both refFlat and GENCODE. refFlat is the default. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
locuszoom --gene-table gencode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;. 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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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 -log10 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;
New/fixed options in 1.3: &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;
| colorCol=NULL&lt;br /&gt;
| Specify the name of a column in association results file denoting the color each marker should be. This disables coloring by LD. &lt;br /&gt;
|-&lt;br /&gt;
| signifLine=NULL&lt;br /&gt;
| Specify (in p-value scale) where to place a horizontal significance line. Can have multiple lines, e.g. signifLine=&amp;quot;5e-08,1e-10&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineColor=NULL&lt;br /&gt;
| Specify color of each significance line, e.g. signifLineColor=&amp;quot;red,blue&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| signifLineWidth=NULL&lt;br /&gt;
| Specify the line width for each significance line, e.g. signifLineWidth=&amp;quot;2,3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| showIso=F&lt;br /&gt;
| Show genes as isoforms, rather than collapsed into one canonical transcript. To enable use showIso=T&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options: &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;
=== 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 --build hg18 --source hapmap&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 custom SQLite database  ===&lt;br /&gt;
&lt;br /&gt;
As a starting point, we provide SQLite databases based on UCSC human genome &#039;&#039;&#039;build hg18 and hg19&#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;
=== Updating the existing locuszoom database(s) ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom now comes with a database updating script &amp;lt;code&amp;gt;bin/lzupdate.py&amp;lt;/code&amp;gt;. This script can download the necessary data from UCSC, NCBI, NGHRI, and GENCODE to create an up-to-date database file. The script performs the following actions: &lt;br /&gt;
&lt;br /&gt;
# Download latest SNP table from UCSC for the given build&lt;br /&gt;
# Reformat SNP table for insertion into sqlite database&lt;br /&gt;
# Download latest refFlat from UCSC for the given build&lt;br /&gt;
# Reformat refFlat for insertion into sqlite database&lt;br /&gt;
# (optional) Download GENCODE annotation file from GENCODE FTP site&lt;br /&gt;
# Download RsMergeArch from NCBI&lt;br /&gt;
# Write formatted translation table for old rsIDs to latest (from RsMergeArch)&lt;br /&gt;
# Create a SNP set file (for indicating rug of markers at top of plot for different genotyping arrays)&lt;br /&gt;
# Download the latest NHGRI GWAS catalog&lt;br /&gt;
# Format catalog for use with locuszoom&lt;br /&gt;
# Call &amp;lt;code&amp;gt;bin/dbmeister.py&amp;lt;/code&amp;gt; to insert everything above (except the GWAS catalog file, which remains a separate file)&lt;br /&gt;
&lt;br /&gt;
An example of running the script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bin/lzupdate.py --build hg19 --gencode 19 --gwas-cat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script will NOT overwrite the existing locuszoom database, since you should likely back it up first (under data/database/*.db). After running the script you should have both a new locuszoom.db file, and a gwas catalog file. You can then either overwrite the locuszoom database after backing it up, or you could place them in a different location and modify the conf file accordingly. The script will provide instructions after running for how to do this. &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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=File:Bed_tracks.png&amp;diff=11070</id>
		<title>File:Bed tracks.png</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=File:Bed_tracks.png&amp;diff=11070"/>
		<updated>2014-06-23T18:28:34Z</updated>

		<summary type="html">&lt;p&gt;Welchr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=10529</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=10529"/>
		<updated>2014-06-11T19:21:50Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* GWAS catalog variants */&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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 9th, 2013. &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. 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;
== 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;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;Warning&#039;&#039;&#039;&amp;lt;/span&amp;gt;: The &amp;quot;test&amp;quot; version of EPACTS changed the format of the output. To make LZ work, you&#039;ll also need to add &amp;lt;code&amp;gt;--epacts-beg-col BEG&amp;lt;/code&amp;gt; to your command line.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole-cat_significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;. 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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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 -log10 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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=9562</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=9562"/>
		<updated>2014-03-09T22:14:23Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* EPACTS formatted 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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 9th, 2013. &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. 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;
== 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;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;Warning&#039;&#039;&#039;&amp;lt;/span&amp;gt;: The &amp;quot;test&amp;quot; version of EPACTS changed the format of the output. To make LZ work, you&#039;ll also need to add &amp;lt;code&amp;gt;--epacts-beg-col BEG&amp;lt;/code&amp;gt; to your command line.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole_cat-significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;. 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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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 -log10 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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=9561</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=9561"/>
		<updated>2014-03-09T22:13:32Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Plotting LD with additional reference SNPs */&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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 9th, 2013. &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. 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;
== 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;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;Warning&#039;&#039;&#039;&amp;lt;/span&amp;gt;: The &amp;quot;test&amp;quot; version of EPACTS changed the format of the output. To make LZ work, you&#039;ll also need to add --epacts-beg-col BEG to your command line.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole_cat-significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;. 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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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 -log10 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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=9560</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=9560"/>
		<updated>2014-03-09T22:10:34Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* EPACTS formatted 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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 9th, 2013. &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. 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;
== 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;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;Warning&#039;&#039;&#039;&amp;lt;/span&amp;gt;: The &amp;quot;test&amp;quot; version of EPACTS changed the format of the output. To make LZ work, you&#039;ll also need to add --epacts-beg-col BEG to your command line.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole_cat-significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;. 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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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 -log10 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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=9357</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=9357"/>
		<updated>2014-01-14T16:41:28Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* 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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 9th, 2013. &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. 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;
== 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;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole_cat-significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;. 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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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 -log10 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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=Ligate_Minimac&amp;diff=8620</id>
		<title>Ligate Minimac</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=Ligate_Minimac&amp;diff=8620"/>
		<updated>2013-09-10T19:06:39Z</updated>

		<summary type="html">&lt;p&gt;Welchr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A script to ligate together chunks created by minimac: &lt;br /&gt;
&lt;br /&gt;
[http://csg.sph.umich.edu/boehnke/ligate_minimac/ligate_minimac.py ligate_minimac.py]&lt;br /&gt;
&lt;br /&gt;
Usage instructions (can also run the script without arguments, or with -h): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ligate_minimac.py -o output_prefix &amp;lt;info files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script assumes the following:&lt;br /&gt;
&lt;br /&gt;
  1) You are attempting to merge only minimac chunks from the same chromosome&lt;br /&gt;
&lt;br /&gt;
  2) Dosage files and info files end in .dose (or .dose.gz) and .info (or .info.gz)&lt;br /&gt;
&lt;br /&gt;
      i.e. chr9.1.10000.info.gz and chr9.1.10000.dose.gz&lt;br /&gt;
&lt;br /&gt;
  3) Markers within info files are sorted by genomic position&lt;br /&gt;
&lt;br /&gt;
  4) Minimac chunks are disjoint, that is, their markers do not overlap&lt;br /&gt;
&lt;br /&gt;
You must also have the Unix tools join, cut, gzip/gunzip, tail, sort, and cut.&lt;br /&gt;
Additionally, the bash shell must be present on your system; you do not need to&lt;br /&gt;
be inside a bash shell to run the script, however.&lt;br /&gt;
&lt;br /&gt;
The script will not work under Windows.&lt;br /&gt;
&lt;br /&gt;
Only testing has been done with Python 2.7. Earlier versions of python should&lt;br /&gt;
work, but 2.6+ is probably best.&lt;br /&gt;
&lt;br /&gt;
This script makes heavy use of multiple concurrent processes piped together.&lt;br /&gt;
Therefore, you should likely only run 1 job at a time on the same machine.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  ./ligate_minimac.py -o my_merged_results chr9*info.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
  -h, --help         show this help message and exit&lt;br /&gt;
  -o OUT, --out=OUT  Output file prefix (files OUT.dose.gz and OUT.info.gz&lt;br /&gt;
                     will be created)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Contact [mailto:welchr@umich.edu welchr@umich.edu] for questions/issues.&lt;/div&gt;</summary>
		<author><name>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=Ligate_Minimac&amp;diff=8619</id>
		<title>Ligate Minimac</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=Ligate_Minimac&amp;diff=8619"/>
		<updated>2013-09-10T19:04:57Z</updated>

		<summary type="html">&lt;p&gt;Welchr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A script to ligate together chunks created by minimac: &lt;br /&gt;
&lt;br /&gt;
[http://csg.sph.umich.edu/boehnke/ligate_minimac/ligate_minimac.py ligate_minimac.py]&lt;br /&gt;
&lt;br /&gt;
Usage instructions (can also run the script without arguments, or with -h): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ligate_minimac.py -o output_prefix &amp;lt;info files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script assumes the following:&lt;br /&gt;
&lt;br /&gt;
  1) You are attempting to merge only minimac chunks from the same chromosome&lt;br /&gt;
&lt;br /&gt;
  2) Dosage files and info files end in .dose (or .dose.gz) and .info (or .info.gz)&lt;br /&gt;
&lt;br /&gt;
      i.e. chr9.1.10000.info.gz and chr9.1.10000.dose.gz&lt;br /&gt;
&lt;br /&gt;
  3) Markers within info files are sorted by genomic position&lt;br /&gt;
&lt;br /&gt;
  4) Minimac chunks are disjoint, that is, their markers do not overlap&lt;br /&gt;
&lt;br /&gt;
You must also have the Unix tools join, cut, gzip/gunzip, tail, sort, and cut.&lt;br /&gt;
Additionally, the bash shell must be present on your system; you do not need to&lt;br /&gt;
be inside a bash shell to run the script, however.&lt;br /&gt;
&lt;br /&gt;
The script will not work under Windows.&lt;br /&gt;
&lt;br /&gt;
Only testing has been done with Python 2.7. Earlier versions of python should&lt;br /&gt;
work, but 2.6+ is probably best.&lt;br /&gt;
&lt;br /&gt;
This script makes heavy use of multiple concurrent processes piped together.&lt;br /&gt;
Therefore, you should likely only run 1 job at a time on the same machine.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  ./ligate_minimac.py -o my_merged_results chr9*info.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
  -h, --help         show this help message and exit&lt;br /&gt;
  -o OUT, --out=OUT  Output file prefix (files OUT.dose.gz and OUT.info.gz&lt;br /&gt;
                     will be created)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Contact welchr@umich.edu for questions/issues.&lt;/div&gt;</summary>
		<author><name>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=Ligate_Minimac&amp;diff=8616</id>
		<title>Ligate Minimac</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=Ligate_Minimac&amp;diff=8616"/>
		<updated>2013-09-10T19:02:24Z</updated>

		<summary type="html">&lt;p&gt;Welchr: Created page with &amp;quot;A script to ligate together chunks created by minimac:   [http://csg.sph.umich.edu/boehnke/ligate_minimac/ligate_minimac.py ligate_minimac.py]  Usage instructions (can also ru...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A script to ligate together chunks created by minimac: &lt;br /&gt;
&lt;br /&gt;
[http://csg.sph.umich.edu/boehnke/ligate_minimac/ligate_minimac.py ligate_minimac.py]&lt;br /&gt;
&lt;br /&gt;
Usage instructions (can also run the script without arguments, or with -h): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ligate_minimac.py -o output_prefix &amp;lt;info files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script assumes the following:&lt;br /&gt;
&lt;br /&gt;
  1) You are attempting to merge only minimac chunks from the same chromosome&lt;br /&gt;
&lt;br /&gt;
  2) Dosage files and info files end in .dose (or .dose.gz) and .info (or .info.gz)&lt;br /&gt;
&lt;br /&gt;
      i.e. chr9.1.10000.info.gz and chr9.1.10000.dose.gz&lt;br /&gt;
&lt;br /&gt;
  3) Markers within info files are sorted by genomic position&lt;br /&gt;
&lt;br /&gt;
  4) Minimac chunks are disjoint, that is, their markers do not overlap&lt;br /&gt;
&lt;br /&gt;
You must also have the Unix tools join, cut, gzip/gunzip, tail, sort, and cut.&lt;br /&gt;
Additionally, the bash shell must be present on your system; you do not need to&lt;br /&gt;
be inside a bash shell to run the script, however.&lt;br /&gt;
&lt;br /&gt;
The script will not work under Windows.&lt;br /&gt;
&lt;br /&gt;
Only testing has been done with Python 2.7. Earlier versions of python should&lt;br /&gt;
work, but 2.6+ is probably best.&lt;br /&gt;
&lt;br /&gt;
This script makes heavy use of multiple concurrent processes piped together.&lt;br /&gt;
Therefore, you should likely only run 1 job at a time on the same machine.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  ./ligate_minimac.py -o my_merged_results chr9*info.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
  -h, --help         show this help message and exit&lt;br /&gt;
  -o OUT, --out=OUT  Output file prefix (files OUT.dose.gz and OUT.info.gz&lt;br /&gt;
                     will be created)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7337</id>
		<title>LocusZoom Standalone 1.2</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7337"/>
		<updated>2013-05-09T20:31:10Z</updated>

		<summary type="html">&lt;p&gt;Welchr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[LocusZoom_Standalone|See LocusZoom Standalone]]&lt;/div&gt;</summary>
		<author><name>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7336</id>
		<title>LocusZoom Standalone 1.2</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7336"/>
		<updated>2013-05-09T20:30:55Z</updated>

		<summary type="html">&lt;p&gt;Welchr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[LocusZoom_Standalone]]&lt;/div&gt;</summary>
		<author><name>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7335</id>
		<title>LocusZoom Standalone 1.2</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7335"/>
		<updated>2013-05-09T20:30:41Z</updated>

		<summary type="html">&lt;p&gt;Welchr: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=7334</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=7334"/>
		<updated>2013-05-09T20:29:26Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* 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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 9th, 2013. &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. 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;
== 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;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole_cat-significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone&amp;diff=7333</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=7333"/>
		<updated>2013-05-09T20:29:08Z</updated>

		<summary type="html">&lt;p&gt;Welchr: &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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 10th, 2013. &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. 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;
== 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;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole_cat-significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7332</id>
		<title>LocusZoom Standalone 1.2</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7332"/>
		<updated>2013-05-09T18:37:30Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* GWAS catalog variants */&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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 10th, 2013. &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. 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;
== 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;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole_cat-significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7331</id>
		<title>LocusZoom Standalone 1.2</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7331"/>
		<updated>2013-05-09T18:37:14Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* GWAS catalog variants */&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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 10th, 2013. &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. 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;
== 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;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --gwas-cat whole_cat-significant-only --build hg19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7330</id>
		<title>LocusZoom Standalone 1.2</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7330"/>
		<updated>2013-05-09T18:36:54Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* GWAS catalog variants */&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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 10th, 2013. &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. 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;
== 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;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
lzdev --gwas-cat whole_cat-significant-only --build hg19 ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7329</id>
		<title>LocusZoom Standalone 1.2</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7329"/>
		<updated>2013-05-09T18:36:41Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Plotting LD with additional reference SNPs */&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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 10th, 2013. &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. 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;
== 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;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
lzdev --gwas-cat whole_cat-significant-only --build hg19 ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7328</id>
		<title>LocusZoom Standalone 1.2</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7328"/>
		<updated>2013-05-09T18:36:08Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Supply VCF files for calculating 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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 10th, 2013. &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. 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;
== 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;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a [http://samtools.sourceforge.net/tabix.shtml tabix] index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
lzdev --gwas-cat whole_cat-significant-only --build hg19 ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7327</id>
		<title>LocusZoom Standalone 1.2</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7327"/>
		<updated>2013-05-09T18:30:07Z</updated>

		<summary type="html">&lt;p&gt;Welchr: &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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 10th, 2013. &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. 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;
== 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;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
* [[#Supply VCF files for calculating LD|Supply VCF files for calculating LD]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a tabix index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
lzdev --gwas-cat whole_cat-significant-only --build hg19 ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7326</id>
		<title>LocusZoom Standalone 1.2</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7326"/>
		<updated>2013-05-09T18:29:38Z</updated>

		<summary type="html">&lt;p&gt;Welchr: &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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 10th, 2013. &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. 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;
== 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;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
* [[#Plotting LD with additional reference SNPs|Plotting LD with additional reference SNPs]]&lt;br /&gt;
* [[#Labeling multiple SNPs|Labeling multiple SNPs]]&lt;br /&gt;
* [[#Fine-mapping credible sets|Fine-mapping credible sets]]&lt;br /&gt;
* [[#GWAS catalog variants|GWAS catalog variants]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a tabix index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
lzdev --gwas-cat whole_cat-significant-only --build hg19 ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7325</id>
		<title>LocusZoom Standalone 1.2</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7325"/>
		<updated>2013-05-09T18:27:34Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Changes in Version 1.2 */&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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 10th, 2013. &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. 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;
== 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;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file|Loading EPACTS results]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a tabix index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
lzdev --gwas-cat whole_cat-significant-only --build hg19 ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7324</id>
		<title>LocusZoom Standalone 1.2</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7324"/>
		<updated>2013-05-09T18:27:07Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Changes in Version 1.2 */&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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 10th, 2013. &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. 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;
== 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;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[EPACTS formatted file]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site.&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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a tabix index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
lzdev --gwas-cat whole_cat-significant-only --build hg19 ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7323</id>
		<title>LocusZoom Standalone 1.2</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7323"/>
		<updated>2013-05-09T18:26:49Z</updated>

		<summary type="html">&lt;p&gt;Welchr: &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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 10th, 2013. &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. 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;
== 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;
== Changes in Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
A number of new features have been added for this version. See the following sections for more info: &lt;br /&gt;
&lt;br /&gt;
* [[#EPACTS formatted file]]&lt;br /&gt;
&lt;br /&gt;
The full changelog is available on the [https://statgen.sph.umich.edu/locuszoom/download/ download] site. &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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a tabix index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
lzdev --gwas-cat whole_cat-significant-only --build hg19 ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7322</id>
		<title>LocusZoom Standalone 1.2</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7322"/>
		<updated>2013-05-09T18:23:32Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Changing m2zfast.conf settings */&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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 10th, 2013. &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. 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;
== 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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a tabix index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
lzdev --gwas-cat whole_cat-significant-only --build hg19 ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &lt;br /&gt;
|-&lt;br /&gt;
| RSCRIPT_PATH&lt;br /&gt;
| Path to the Rscript binary. Defaults to &amp;quot;Rscript&amp;quot;, which searches for Rscript&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
| GWAS_CATS&lt;br /&gt;
| Contains a &amp;quot;tree&amp;quot; which maps genome build and the name of a GWAS catalog to the actual file containing the GWAS hits. &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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7321</id>
		<title>LocusZoom Standalone 1.2</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7321"/>
		<updated>2013-05-09T18:21:30Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* 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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 10th, 2013. &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. 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;
== 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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a tabix index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
lzdev --gwas-cat whole_cat-significant-only --build hg19 ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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;
| --ld-vcf&lt;br /&gt;
| Use a VCF file to calculate LD between SNPs. This can be a VCF file with an entire genome of SNPs and does not have to be subsetted to your region. The VCF file must also have a tabix index file. For calculating D&#039;, the VCF must be phased. &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. To disable, use --snpset NULL. &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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
&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>Welchr</name></author>
	</entry>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7320</id>
		<title>LocusZoom Standalone 1.2</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=LocusZoom_Standalone_1.2&amp;diff=7320"/>
		<updated>2013-05-09T18:07:19Z</updated>

		<summary type="html">&lt;p&gt;Welchr: /* Labeling multiple SNPs */&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;
To be notified of future changes to LocusZoom, you can join our [http://groups.google.com/group/locuszoom Google Group]. &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;
&lt;br /&gt;
&lt;br /&gt;
The following software is optional but recommended: &lt;br /&gt;
&lt;br /&gt;
*[[New Fugue|new_fugue]], a program for computing LD, written by Goncalo Abecasis.&lt;br /&gt;
*[http://pngu.mgh.harvard.edu/~purcell/plink/ PLINK], written by Shaun Purcell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following R packages are optional but recommended: &lt;br /&gt;
*[http://cran.r-project.org/web/packages/gridExtra/index.html gridExtra] (used for creating summary tables of GWAS hits / fine-mapping SNPs as additional pages in the PDF)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the latest stable LocusZoom package, see our [https://statgen.sph.umich.edu/locuszoom/download/ download] page. The current version is &#039;&#039;&#039;1.2&#039;&#039;&#039;, released on May 10th, 2013. &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. 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;
== 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 &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&#039;&#039;&#039;*not*&#039;&#039;&#039;&amp;lt;/span&amp;gt; the 3.x 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 LD calculation software (optional) ===&lt;br /&gt;
&lt;br /&gt;
* If you wish to calculate from hg18 sources (hapmap, earlier releases of 1000G): install &#039;&#039;&#039;new_fugue&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you wish to calculate from hg19 sources (latest 1000G): install &#039;&#039;&#039;PLINK&#039;&#039;&#039; (see below.) &lt;br /&gt;
* If you plan to supply your own LD files per region, or calculate LD directly from VCF files: install nothing! See options for --ld and --ld-vcf. &lt;br /&gt;
&lt;br /&gt;
==== 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;
==== PLINK ====&lt;br /&gt;
&lt;br /&gt;
PLINK is now used to calculate LD for all future LD sources / populations that we may add. The program new_fugue (above) is used to calculate LD from older sources (such as hapmap) and older builds (such as hg18) where LD files are sufficiently small. &lt;br /&gt;
&lt;br /&gt;
You can download PLINK and find instructions for installing it [http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml here].&lt;br /&gt;
&lt;br /&gt;
=== Step 5: 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 and hg19&#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]&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 use 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;
For GWAS hits: &lt;br /&gt;
*We use the NHGRI GWAS catalog, available at [http://www.genome.gov/gwastudies/ genome.gov]&lt;br /&gt;
&lt;br /&gt;
== Input  ==&lt;br /&gt;
&lt;br /&gt;
=== Association results file ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom requires an association results file similar in formatting to what METAL or EPACTS provides. &lt;br /&gt;
&lt;br /&gt;
==== METAL formatted file ====&lt;br /&gt;
&lt;br /&gt;
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;
==== EPACTS formatted file ====&lt;br /&gt;
&lt;br /&gt;
The file can come directly from [[EPACTS]], or simply be formatted similarly to the following: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | #CHROM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | BEGIN&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | END&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MARKER_ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | NS&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | CALLRATE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | MAF&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | PVALUE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | SCORE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | N.CTRL&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CASE&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | AF.CTRL&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15903 || 15903 || 1:15903_G/GC || 2657 || 3892.2 || 1 || 0.26757 || 0.36771 || 0.90077 || 1326 || 1331 || 1.4688 || 1.4609&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 19190 || 19191 || 1:19190_GC/G || 2657 || 823.65 || 1 || 0.155 || 0.67173 || 0.42378 || 1326 || 1331 || 0.3115 || 0.30849&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 20316 || 20317 || 1:20316_GA/G || 2657 || 1005.3 || 1 || 0.18917 || 0.50804 || 0.66189 || 1326 || 1331 || 0.38062 || 0.37607&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30967 || 30970 || 1:30967_CCCA/C || 2657 || 435.35 || 1 || 0.081925 || 0.08848 || -1.7035 || 1326 || 1331 || 0.16007 || 0.16762&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 51972 || 51975 || 1:51972_GGAC/G || 2657 || 207.8 || 1 || 0.039104 || 0.51638 || -0.64893 || 1326 || 1331 || 0.077187 || 0.079226&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 53138 || 53140 || 1:53138_TAA/T || 2657 || 216.2 || 1 || 0.040685 || 0.55679 || 0.58762 || 1326 || 1331 || 0.083145 || 0.079602&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 54421 || 54421 || 1:54421_A/G || 2657 || 179.45 || 1 || 0.033769 || 0.73592 || 0.33726 || 1326 || 1331 || 0.068213 || 0.066867&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66221 || 66221 || 1:66221_A/AT || 2657 || 664.45 || 1 || 0.12504 || 0.48676 || 0.69547 || 1326 || 1331 || 0.25366 || 0.24651&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 66222 || 66223 || 1:66222_TA/T || 2657 || 470.3 || 1 || 0.088502 || 0.64258 || 0.4641 || 1326 || 1331 || 0.17941 || 0.17461&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The chrom, start, end, marker ID, and p-value columns must all be present. The file must be tab-delimited. &lt;br /&gt;
&lt;br /&gt;
To load this file, use --epacts.&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;
&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;
&lt;br /&gt;
*A reference SNP and gene: &lt;br /&gt;
&amp;lt;pre&amp;gt; --refsnp &amp;amp;lt;your snp&amp;amp;gt; --refgene &amp;amp;lt;your gene&amp;amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will use the reference gene as the plotting boundaries. You can extend the boundaries by also including --flank. &lt;br /&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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Release &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR--build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| March 2012&lt;br /&gt;
| hg19&lt;br /&gt;
| AMR&lt;br /&gt;
| --pop AMR --build hg19 --source 1000G_March2012&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| ASN&lt;br /&gt;
| --pop ASN --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| AFR&lt;br /&gt;
| --pop AFR&amp;amp;nbsp;--build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| Nov 2010&lt;br /&gt;
| hg19&lt;br /&gt;
| EUR&lt;br /&gt;
| --pop EUR --build hg19 --source 1000G_Nov2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| June 2010 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_June2010&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI &lt;br /&gt;
| --pop YRI --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|-&lt;br /&gt;
| August 2009 &lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source 1000G_Aug2009&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;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;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Build &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | Population &lt;br /&gt;
! align=&amp;quot;left&amp;quot; scope=&amp;quot;col&amp;quot; | LocusZoom Arguments&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| CEU &lt;br /&gt;
| --pop CEU --build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| YRI&lt;br /&gt;
| --pop YRI--build hg18 --source hapmap&lt;br /&gt;
|-&lt;br /&gt;
| hg18 &lt;br /&gt;
| JPT+CHB &lt;br /&gt;
| --pop JPT+CHB --build hg18 --source hapmap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Batch mode  ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom provides a batch mode for generating plots for a large number of regions: &lt;br /&gt;
&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;
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 dprime column can be all missing if it is not known. Rsquare must be present, and must be valid data. &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;
=== Supply VCF files for calculating LD ===&lt;br /&gt;
&lt;br /&gt;
You can give LocusZoom a VCF file directly to use for calculating LD: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option takes the place of having to supply per-region pre-calculated LD (--ld) or having to specify --pop and --source for calculating LD from genotype files supplied by LZ. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF6600&amp;quot;&amp;gt;&#039;&#039;&#039;Warning: &#039;&#039;&#039;&amp;lt;/span&amp;gt; The VCF file must also have a tabix index located in the same directory. For the above example, the tabix index &amp;quot;my_genotypes.vcf.gz.tbi&amp;quot; must exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also calculate D&#039; from phased VCF files: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --ld-vcf my_genotypes.vcf.gz --ld-measure dprime ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default measure is &amp;quot;rsquared&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Optional Input ==&lt;br /&gt;
&lt;br /&gt;
=== Plotting LD with additional reference SNPs ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can now show LD with multiple SNPs in a region (for example, you might want to show LD with a number of SNPs from a conditional analysis.) &lt;br /&gt;
&lt;br /&gt;
You give LocusZoom the usual reference SNP (used for centering the plot and calculating the region) but an additional set of lead/reference SNPs as well. &lt;br /&gt;
&lt;br /&gt;
For all other SNPs not in the &amp;quot;lead SNP set&amp;quot; of { reference SNP, additional reference SNPs }, LZ will find which of the lead SNPs it is in highest LD with, and color it to match that lead SNP. The extent of LD with the lead SNP is shown by a gradient of color. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom --metal &amp;lt;DIAGRAM T2D results&amp;gt; --refsnp &amp;quot;rs231362&amp;quot; --add-refsnps &amp;quot;rs163184&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate the following plot: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz cond only.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available for changing the style of these types of plots: &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;
| condLdColors=&amp;quot;gray60,#E41A1C,#377EB8,#4DAF4A,#984EA3,#FF7F00,#A65628,#F781BF&amp;quot;&lt;br /&gt;
| First color is missing LD color, the rest are used as needed for each additional lead SNP&lt;br /&gt;
|- &lt;br /&gt;
| drawMarkerNames = T&lt;br /&gt;
| Display marker names (or not) above lead SNPs&lt;br /&gt;
|-&lt;br /&gt;
| condLdLow=NULL&lt;br /&gt;
| Used to set all SNPs with LD in the lowest bin to the same color, for example condLdLow=&amp;quot;gray70&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| condRefsnpPch=23&lt;br /&gt;
| Symbol for each lead SNP, defaults to diamond&lt;br /&gt;
|-&lt;br /&gt;
| condPch=&#039;4,16,17,15,25,8,7,13,12,9,10&#039;&lt;br /&gt;
| Plotting symbols for groups of SNPs in LD with additional refsnps, make sure they don&#039;t overlap with condRefsnpPch above&lt;br /&gt;
|- &lt;br /&gt;
| ldCuts = &amp;quot;0,.2,.4,.6,.8,1&amp;quot;&lt;br /&gt;
| Bins for LD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GWAS catalog variants ===&lt;br /&gt;
&lt;br /&gt;
You can add known GWAS variants to your plots with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
lzdev --gwas-cat whole_cat-significant-only --build hg19 ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas cat.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently the only catalog is the NHGRI GWAS catalog from [http://www.genome.gov/gwastudies/ genome.gov].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available GWAS catalogs for build hg19:&lt;br /&gt;
&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
|           Option           |                          Description                           |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
| whole-cat_significant-only | The entire GWAS catalog, filtered to SNPs with p-value &amp;lt; 5E-08 |&lt;br /&gt;
+----------------------------+----------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, a summary of each GWAS catalog variant in your region is listed later in the PDF: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz gwas summary.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Fine-mapping credible sets ===&lt;br /&gt;
&lt;br /&gt;
LocusZoom can add an additional track to the plot showing results from a fine-mapping analysis. These are typically SNPs within the 95% credible set (see [http://www.nature.com/ng/journal/v44/n12/full/ng.2435.html this paper] for an example.)&lt;br /&gt;
&lt;br /&gt;
To add this fine-mapping track, you supply (as a plotting option) the fine-mapping set of credible SNPs as a file: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... fineMap=&amp;quot;my_finemapping_results.txt&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fine-mapping results file should be a tab-delimited file with each fine-mapping SNP (for example, all those fine-mapping SNPs in the 95% credible set), a descriptive label (EUR/AMR/AFR/etc.), and a color: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable 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;
! scope=&amp;quot;col&amp;quot; | pp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55931115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55920115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55940115 || 0.88 || AMR || red&lt;br /&gt;
|-&lt;br /&gt;
| rs1 || 18 || 55930115 || 0.88 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs2 || 18 || 55940115 || 0.02 || EUR || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56000000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56022000 || 0.03 || AFR || green&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56100000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs3 || 18 || 56150000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56160000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
| rs4 || 18 || 56180000 || 0.03 || ASN || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
LocusZoom will extract from the file only those SNPs falling within the region to be plotted, so you can provide all of your fine-mapping results in a single file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The generated plot will have a track showing the fine-mapping SNPs: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap.png|900px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the R package &#039;&#039;&#039;gridExtra&#039;&#039;&#039; is installed, the PDF will also have a summary of each fine-mapping SNP: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz finemap summary.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Labeling multiple SNPs ===&lt;br /&gt;
&lt;br /&gt;
You can specify a file controlling the labels for either the reference SNP, or any other arbitrary SNP within the region. For example: &lt;br /&gt;
&lt;br /&gt;
[[File:New lz denote markers.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Use the --denote-markers-file &amp;lt;file&amp;gt; argument to do this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
locuszoom ... --denote-markers-file &amp;lt;your file&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file looks like: &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | snp&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | string&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; align=&amp;quot;left&amp;quot; | color&lt;br /&gt;
|-&lt;br /&gt;
| rs231362 || GWAS || blue&lt;br /&gt;
|-&lt;br /&gt;
| rs163184 || Conditional || purple&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It must be tab-delimited and the columns must have a header and be named as such.&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;
| --epacts&lt;br /&gt;
| Provide a results file generated by [[EPACTS]] instead of a --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. To disable, use --snpset NULL. &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;
=== 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 --build hg18 --source hapmap&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;
| DEFAULT_BUILD &lt;br /&gt;
| Default build to use for finding SNP&amp;amp;nbsp;positions, and calculating LD. This is used to index SQLITE_DB, as well as LD_DB.&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_POP&lt;br /&gt;
| Default population to use for computing LD. &lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SOURCE&lt;br /&gt;
| Default source for computing LD. &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;
| PLINK_PATH&lt;br /&gt;
| Path to the PLINK binary. Defaults to &amp;quot;plink&amp;quot;, which searches for PLINK&amp;amp;nbsp;on your path. If it is not on your path, specify the full path here. &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;
&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>Welchr</name></author>
	</entry>
</feed>