annotate README.md @ 21:2c909bfdd090 draft

Uploaded
author jeremyjliu
date Wed, 12 Nov 2014 15:25:44 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
21
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
1 # Region-Motif-Compare Tools
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
2 Version 1.1 Released 2014
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
3 Park Laboratory
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
4 Center for Biomedical Informatics
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
5 Harvard University
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
6
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
7 Contact
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
8 Jeremy Liu (jeremy.liu@yale.edu)
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
9 Nils Gehlenborg (nils@hms.harvard.edu)
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
10
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
11 ## Overview
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
12 ### Structure
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
13 The tool suite consists of:
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
14
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
15 1. Two Rscripts: region_motif_compare.r and region_motif_intersect.r
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
16 2. Two Xml Files: region_motif_compare.xml and region_motif_intersect.xml
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
17 3. Motif Database Directory: region_motif_db
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
18 4. Dependency Library Directory: region_motif_lib
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
19 5. Galaxy Workflows: Files with suffix ".ga" that can be imported into the local
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
20 Galaxy instance after installation of the tool.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
21
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
22 ### Description
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
23 1. **region_motif_intersect.r** (1 bed -> 1 tsv):
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
24 Takes one bed file of regions as input. Then it calculates
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
25 the number of intersections of the regions and the motifs. region_motifs_intersect.r
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
26 outputs a tab separated values (tsv) file of motif names and intersection counts.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
27 **Important Note:** region_motif_intersect.r makes no assumptions about the nature
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
28 of the input regions. For example, if overlapping regions are inputted, motifs that
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
29 intersect the overlap will be double counted. Thus, it is recommended that regions
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
30 be merged before using this tool, using the merge tool in the Galaxy toolshed.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
31
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
32 2. **region_motif_compare.r** (2 tsv -> 2 tsv & 1 png):
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
33 Takes as input two tsv files of motifs / regions intersection
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
34 counts. These generally originate from running region_motif_intersect.r on two sets
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
35 of different regions with the same query motif database. Based on the counts,
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
36 region_motif_compare.r then determines the enrichment (or depletion) of certain
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
37 motifs across the two regions. This is done by a correcting for the size and gc
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
38 content of the region, and applying a Poisson test to the counts.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
39 Then, region_motif_compare.r outputs the most significant enriched or depleted
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
40 motifs as a tsv. In addition, the tool outputs a diagnostic plot containing
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
41 graphical representations of the motif counts, gc correction curves, and significant
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
42 motifs that distinguish the two regions (selected via p value).
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
43
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
44 3. **region_motif_db**: Contains motif positions as compressed, indexed tabix files.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
45
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
46 4. **region_motif_lib**: Contains dependencies (i.e. plotting.r) for region_motif_compare.r
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
47
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
48 ## Installation
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
49 Directions for installing the region-motif-compare tools into a personal computer
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
50 and a local Galaxy instance.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
51
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
52 1. Follow the online directions to install a local instance of Galaxy (getgalaxy.org).
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
53 Optionally, follow the directions to install Refinery (refinery-platform.readthedocs.org)
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
54
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
55 2. Clone the github repository to your local computer
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
56 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
57 git clone https://github.com/parklab/refinery-galaxy-tools.git
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
58 cd refinery-galaxy-tools/region-motif-compare
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
59 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
60
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
61 3. Make a directory for the tools in Galaxy instance. This serves as a category
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
62 for the tool in the tools sidebar. You can also place the tools in an existing
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
63 or alternatively named directory, but remember to update tool_conf.xml to reflect this.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
64 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
65 cd ~/galaxy-dist/tools/
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
66 mkdir my_tools
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
67 cd my_tools
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
68 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
69
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
70 4. Copy over ".r" and ".xml" files, as well as `region_motif_db` and `region_motif_lib`
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
71 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
72 cd refinery-galaxy-tools/region-motif-compare
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
73 cp *.r ~/galaxy-dist/tools/my_tools
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
74 cp *.xml ~/galaxy-dist/tools/my_tools
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
75 cp -r region_motif_db ~/galaxy-dist/tools/my_tools
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
76 cp -r region_motif_lib ~/galaxy-dist/tools/my_tools
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
77 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
78
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
79 5. Edit `~/galaxy-dist/tool_conf.xml` to reflect the addition of the new tools.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
80 Add the following lines within the `<toolbox>` tags. If in Step 3 you copied
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
81 the tools to a different directory than `my_tools`, edit the code snippet
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
82 to reflect the correct path name.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
83 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
84 <section id="mTools" name="My Tools">
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
85 <tool file="my_tools/region_motif_intersect.xml" />
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
86 <tool file="my_tools/region_motif_compare.xml" />
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
87 </section>
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
88 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
89
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
90 6. Download the motif databases and place them into `region_motif_db`
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
91 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
92 cd ~/galaxy-dist/tools/my_tools/region_motif_db
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
93 wget ????/pouya_motifs.bed.bgz
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
94 wget ????/pouya_motifs.bed.bgz.tbi
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
95 wget ????/jaspar_jolma_motifs.bed.bgz
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
96 wget ????/jaspar_jolma_motifs.bed.bgz.tbi
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
97 wget ????/mm9_motifs.bed.bgz
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
98 wget ????/mm9_motifs.bed.bgz.tbi
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
99 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
100
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
101 7. Install the Bioconductor R package Rsamtools for dealing with tabix files
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
102 ```
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
103 $ R
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
104 > source("http://bioconductor.org/biocLite.R")
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
105 > biocLite("Rsamtools")
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
106 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
107
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
108 8. If in Step 3 you copied the tools to an existing directory or an alternatively
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
109 named directory, you must edit the following file paths.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
110 In `region_motif_intersect.r` and `region_motif_compare.r` edit `commonDir`:
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
111 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
112 # Replace this line
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
113 commonDir = concat(workingDir, "/tools/my_tools")
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
114 # With this edited line
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
115 commonDir = concat(workingDir, "<relative_path_from_galaxy_root>/<tool_directory>")
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
116 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
117 In addition, edit `region_motif_intersect.xml` and `region_motif_compare.xml` to
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
118 reflect the path of the tools relative to the galaxy root directory.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
119 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
120 <command interpreter="bash">
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
121 /usr/bin/R --slave --vanilla -f $GALAXY_ROOT_DIR/<path_to_tools>/region_motif_intersect.r --args $GALAXY_ROOT_DIR $db_type $in_bed $out_tab
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
122 </command>
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
123 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
124 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
125 <command interpreter="bash">
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
126 /usr/bin/R --slave --vanilla -f $GALAXY_ROOT_DIR/<path_to_tools>/region_motif_compare.r --args $GALAXY_ROOT_DIR $db_type $in_tab_1 $in_tab_2 $out_enriched $out_depleted $out_plots
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
127 </command>
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
128 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
129
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
130 ## Running the Tools
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
131 ### Running from Galaxy
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
132 1. To run the tools as workflows, import the .ga workflows included in the github
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
133 via the Galaxy workflow user interface. Then, upload and select two input BED files.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
134
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
135 2. To run the tools individually, select the tool from the tools toolbar, provide
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
136 a BED file (Region Motif Intersect) or two tsv files (Region Motif Compare), and
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
137 select a query database from the dropdown menu.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
138
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
139 ### Running from Refinery
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
140 1. Import the .ga workflows into a local Galaxy instance. These workflows have
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
141 already been annotated for Refinery.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
142
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
143 2. Add the local Galaxy instance to the Refinery installation.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
144 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
145 python manage.py create_workflowengine <instance_id> "<group_name>"
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
146 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
147
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
148 3. Import the Galaxy workflows into Refinery.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
149 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
150 python manage.py import_workflows
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
151 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
152 4. Run the tools from the Refinery user interface.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
153
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
154 ### Running as Command Line Tools
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
155 You can also run the tools from the command line, an example of which is shown below.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
156 More information is found in the headers of the r source files.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
157 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
158 cd ~/galaxy-dist/tools/my_tools
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
159 R --slave --vanilla -f region_motif_intersect.r --args ~/galaxy-dist p <path_to_bed_file> <path_to_output_tsv>
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
160 R --slave --vanilla -f region_motif_compare.r --args ~/galaxy-dist p <path_to_region1_counts> <path_to_region2_counts> <enriched_motifs_output_tsv> <depleted_motifs_output_tsv> <plots_png>
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
161 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
162
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
163 ## Interpreting Results
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
164 ### Motif Database and Result Notation
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
165 TF motif positions for hg19 and mm9 were curated from three databases:
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
166 ENCODE TF motif database "Pouya" (http://compbio.mit.edu/encode-motifs/)
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
167 JASPAR database "Jaspar" (http://jaspar.genereg.net/)
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
168 DNA binding specificities of human transciption factors "Jolma" (http://www.ncbi.nlm.nih.gov/pubmed/23332764)
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
169
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
170 For ENCODE TF motifs, the genomic locations were taken straight from the database.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
171 In addition, position weight matrices (pwms) were obtained by averaging the
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
172 sites in the genome for a motif. These are labeled with "\_8mer\_".
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
173 Fake motifs were also generated, by shuffling the pwms of actual motifs and
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
174 mapping to the genome and are labeled with "_8mer_C".
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
175
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
176 For JASPAR and Jolma motifs, mast was run to determine genomic locations from the
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
177 provided pwms. The motif alignmment thresholds were set to the top 5k, 20k, 100k, and
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
178 250k sites and the redundant maps removed with the top 30k sites have the same score.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
179 These are labeled with "_t5000" and likewise.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
180
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
181
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
182 ## Motif Tabix File Creation
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
183 Starting with a BED file of motif positions (minimal chr, start, end), follow
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
184 below to generate a tabix file that can be placed in `region_motif_db` and
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
185 used by the tools.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
186
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
187 1. Download Tabix (http://sourceforge.net/projects/samtools/files/tabix/) and install.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
188 Add `tabix` and `bgzip` binaries to your file path.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
189 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
190 tar -xvjf tabix-0.2.6.tar.bz2
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
191 cd tabix-0.2.6
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
192 make
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
193 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
194
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
195 2. Construct bgzip files and index files.
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
196 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
197 cd ~/galaxy-dist/tools/my_tools/region_motif/db
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
198 (grep ^"#" jaspar_motifs.bed; grep -v ^"#" jaspar_motifs.bed | sort -k1,1 -k2,2n) | bgzip > jaspa_motifs.bed.bgz
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
199 tabix -p bed jaspar_motifs.bed.bgz # this generates jaspar_motifs.bed.bgz.tbi
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
200 ````
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
201
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
202 3. Add the path to `jaspar_motifs.bed.bgz` to the selection options for the variable
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
203 `motifDB` in `region_motif_intersect.r` and `region_motif_compare.r`. To enable
2c909bfdd090 Uploaded
jeremyjliu
parents:
diff changeset
204 the new database in Galaxy, you will have to edit the xml files for both tools.