Difference between revisions of "GREGOR"

From Genome Analysis Wiki
Jump to navigationJump to search
Line 22: Line 22:
 
   1. cd pathToYourCopy/FallInBed
 
   1. cd pathToYourCopy/FallInBed
 
   2. git pull
 
   2. git pull
 
== Download reference files ==
 
 
Through this link [http://www.sph.umich.edu/csg/jich/FallInBed/  FallInBed Download], you can download reference files.
 
  
 
== Build FallInBed ==
 
== Build FallInBed ==
Line 41: Line 37:
 
   tar xzvf FallInBed.ref.tar.gz
 
   tar xzvf FallInBed.ref.tar.gz
  
After unzip, copy all reference files to directory "./ref"
+
After unzip, you will get 47 reference files in the directory "./ref"
  
 
== Basic Usage Example ==
 
== Basic Usage Example ==
Line 87: Line 83:
 
   INDEX_SNP_FILE = /net/dumbo/home/jchen/prj/chiseq/codes/FallInBed_Binomial/example/example.index.snps.rsid.list.txt    ## e.g. /home/myid/data/FallInBed/example.snp.txt
 
   INDEX_SNP_FILE = /net/dumbo/home/jchen/prj/chiseq/codes/FallInBed_Binomial/example/example.index.snps.rsid.list.txt    ## e.g. /home/myid/data/FallInBed/example.snp.txt
 
   BED_FILE_INDEX = /net/dumbo/home/jchen/prj/chiseq/codes/FallInBed_Binomial/example/example.bed.file.index ## e.g. /home/myid/data/FallInBed/bedfiles.index
 
   BED_FILE_INDEX = /net/dumbo/home/jchen/prj/chiseq/codes/FallInBed_Binomial/example/example.bed.file.index ## e.g. /home/myid/data/FallInBed/bedfiles.index
 +
  REF_DIR = /net/dumbo/home/jchen/prj/chiseq/codes/FallInBed_Binomial/ref/ ## reference directory
 
   R2THRESHOLD = 0.7
 
   R2THRESHOLD = 0.7
 
   LDWINDOWSIZE = 1000000
 
   LDWINDOWSIZE = 1000000
Line 99: Line 96:
  
 
BED_FILE_INDEX: This file lists the datasets (e.g. BED files) to be used for enrichment analysis. Use complete paths to file locations and make sure positions are in hg19 format.
 
BED_FILE_INDEX: This file lists the datasets (e.g. BED files) to be used for enrichment analysis. Use complete paths to file locations and make sure positions are in hg19 format.
 +
 +
REF_DIR: Define reference file directory which you download at here.
  
 
R2THRESHOLD and LDWINDOWSIZE: These two parameters define the index SNP LD proxies by R2 threshold and LD window size.
 
R2THRESHOLD and LDWINDOWSIZE: These two parameters define the index SNP LD proxies by R2 threshold and LD window size.

Revision as of 16:29, 3 December 2013

FallInBed

FallInBed is a tool to test for global enrichment of trait-associated variants in experimentally annotated regulatory domains. Because all reference data are hg19, make sure your index SNP list and BED files are also in hg19 version.

Get FallInBed Source Codes

Download FallInBed

Through this link FallInBed Download, you can download a copy of FallInBed.

Using Git to Track the Current Version

You can create your won git clone(copy) using:

 git clone https://github.com/jinchen-umich/FallInBed.git

or

 git clone git://github.com/jinchen-umich/FallInBed.git

Either of these two commands creates a directory which called FallInBed in the current directory.

Update your copy

If you have already gotten your copy, using the following commands to update:

 1. cd pathToYourCopy/FallInBed
 2. git pull

Build FallInBed

To build FallInBed, copy the FallInBed package to the directory you want, and then run the following command:

 tar xzvf FallInBed.tar.gz

After unzip, you can find 3 directories in "FallInBed" (./example ./lib ./script).

Download reference files

Download the reference files from this link FallInBed Download, then un-package the file

 tar xzvf FallInBed.ref.tar.gz

After unzip, you will get 47 reference files in the directory "./ref"

Basic Usage Example

When you run

 perl FallInBed.pl

you will get some information about FallInBed


FallInBeds.pl : Functional annotation of trait-associated variants


This program tests for enrichment of an input list of trait-associated index SNPs ([chr:pos] format or rsID, hg19) in experimentally annotated regulatory domains (BED files).

Note: the index SNPs should be hg19 version. All maf and LD data are from 1000G EUR samples! (Release date : May 21, 2011)

Version : 1.1.0

Report Bug(s) : jich[at]umich[dot]edu


Usage : perl FallInBeds.pl --conf [conf.file]



The following command is a typical command line:

 perl FallInBed.pl --conf [conf.file]

Example configuration file can be found in example directory. Users have to modify the configurations before running.

Configuration File

The example configuration file below illustrate how to configure the FallInBed configuration file.

 ###############################################################################
 # CHIPSEQ ENRICHMENT CONFIGURATION FILE
 # This configuration file contains run-time configuration of
 # CHIP_SEQ ENRICHMENT
 ###############################################################################
 ## KEY ELEMENTS TO CONFIGURE : NEED TO MODIFY
 ###############################################################################
 INDEX_SNP_FILE = /net/dumbo/home/jchen/prj/chiseq/codes/FallInBed_Binomial/example/example.index.snps.rsid.list.txt    ## e.g. /home/myid/data/FallInBed/example.snp.txt
 BED_FILE_INDEX = /net/dumbo/home/jchen/prj/chiseq/codes/FallInBed_Binomial/example/example.bed.file.index ## e.g. /home/myid/data/FallInBed/bedfiles.index
 REF_DIR = /net/dumbo/home/jchen/prj/chiseq/codes/FallInBed_Binomial/ref/ ## reference directory
 R2THRESHOLD = 0.7
 LDWINDOWSIZE = 1000000
 OUT_DIR = /net/dumbo/home/jchen/prj/chiseq/codes/FallInBed_Binomial/example/example.rsid.20130808/ ## e.g. /home/myid/data/FallInBed/result/
 MIN_NEIGHBOR_NUM = 500
 BEDFILE_IS_SORTED = True
 MOSRUN = mosbatch -E/tmp -i -m2000 -j20,43,122,135,137,138,149,151,153,154,155,156,162,163 sh -c

In the config file, there are several parameters to adjust:

INDEX_SNP_FILE: This file contains a single column of trait-associated input SNPs, without a header. Variants can be listed in rsid or hg19 chr:pos format.

BED_FILE_INDEX: This file lists the datasets (e.g. BED files) to be used for enrichment analysis. Use complete paths to file locations and make sure positions are in hg19 format.

REF_DIR: Define reference file directory which you download at here.

R2THRESHOLD and LDWINDOWSIZE: These two parameters define the index SNP LD proxies by R2 threshold and LD window size.

OUT_DIR: All result files are saved to this folder, where the script will create multiple sub-directories. Index SNPs are in the folder "index_SNP"; Random SNPs are in the folder "random_SNP".

MIN_NEIGHBOR_NUM: Define neighbor number around index SNP. Script will find no less than this number around every index SNP.

BEDFILE_IS_SORTED: True or false, depending on whether the BED files listed in the index file are sorted.

Results Output

The file StatisticSummaryFile.txt in the output directory contains enrichment results with the following information:

Bed_File: The individual datasets used in the enrichment analysis

InBed_Index_SNP: Number of index SNPs or their LD proxies that overlaps regulatory regions in each dataset

Pvalue: P-value calculated assuming a sum of binomial distributions to represent the number of index SNPs (or LD proxies) that overlap a dataset compared to the expectation observed in the matched control sets

  • Note: SNPs that cannot be converted from rsID to chr:pos format are listed in the output file rsid.index.snp.txt. SNPs for which there are no LD proxies or no MAF data available are listed in the output file nonannoted.index.snp.txt.

Acknowledgements

FallInBed is the result of collaborative efforts by Cristen Willer, Jin Chen, Wei Zhou, Ellen Schmidt, He Zhang, and Goncalo Abecasis. Please email Cristen Willer [cristen@umich.edu] for any questions.