annotate alignr.xml @ 4:e0b0c3b5514c

Uploaded
author xuebing
date Tue, 20 Mar 2012 15:20:17 -0400
parents b11a21c704ec
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
1 <tool id="alignr" name="align">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
2 <description>two interval sets</description>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
3 <command interpreter="python"> alignr.py -a $inputa -w $windowsize -n $nbins -o $output_data -v $output_plot $stranded -q -l $outputlabel --ylim=$ylim --span $span
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
4 #if $inputb_source_type.inputb_select == "user":
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
5 -b "$inputb"
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
6 #else:
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
7 -b "${inputb_source_type.selectedb.fields.value}"
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
8 #end if
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
9 #if $inputa_format.inputa_select == "BAM":
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
10 -f BAM
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
11 #end if
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
12 </command>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
13 <inputs>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
14 <conditional name="inputa_format">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
15 <param name="inputa_select" type="select" label="Select your first input format" >
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
16 <option value="BED" selected="true">BED-like (chrNum start end ...) </option>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
17 <option value="BAM"> BAM</option>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
18 </param>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
19 <when value="BED">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
20 <param name="inputa" type="data" format="interval" label="Input file for the first interval set (-a)"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
21 </when>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
22 <when value="BAM">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
23 <param name="inputa" type="data" format="bam" label="Input file for the first interval set (-a)"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
24 </when>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
25 </conditional>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
26 <conditional name="inputb_source_type">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
27 <param name="inputb_select" type="select" label="Input source for the second interval set">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
28 <option value="mm9ucsc" selected="true">mm9 ucsc knownGene annotations</option>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
29 <option value="mm9refseq">mm9 refseq gene annotations</option>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
30 <option value="mm9ensembl">mm9 ensembl gene annotations</option>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
31 <option value="hg18ucsc" >hg18 ucsc knownGene annotations</option>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
32 <option value="hg18refseq">hg18 refseq gene annotations</option>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
33 <option value="hg18ensembl">hg18 ensembl gene annotations</option>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
34 <option value="user">Dataset in Your History</option>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
35 </param>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
36 <when value="user">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
37 <param name="inputb" type="data" format="interval" label="Input file for the second interval set (-b)" />
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
38 </when>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
39 <when value="mm9ucsc">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
40 <param name="selectedb" type="select" label="Input for the second interval set (-b)" >
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
41 <options from_file="aligndb-mm9-knownGene.loc">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
42 <column name="name" index="0"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
43 <column name="value" index="1"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
44 </options>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
45 </param>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
46 </when>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
47 <when value="mm9refseq">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
48 <param name="selectedb" type="select" label="Input for the second interval set (-b)" >
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
49 <options from_file="aligndb-mm9-refGene.loc">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
50 <column name="name" index="0"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
51 <column name="value" index="1"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
52 </options>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
53 </param>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
54 </when>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
55 <when value="mm9ensembl">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
56 <param name="selectedb" type="select" label="Input for the second interval set (-b)" >
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
57 <options from_file="aligndb-mm9-ensGene.loc">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
58 <column name="name" index="0"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
59 <column name="value" index="1"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
60 </options>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
61 </param>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
62 </when>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
63 <when value="hg18ucsc">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
64 <param name="selectedb" type="select" label="Input for the second interval set (-b)" >
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
65 <options from_file="aligndb-hg18-knownGene.loc">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
66 <column name="name" index="0"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
67 <column name="value" index="1"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
68 </options>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
69 </param>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
70 </when>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
71 <when value="hg18refseq">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
72 <param name="selectedb" type="select" label="Input for the second interval set (-b)" >
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
73 <options from_file="aligndb-hg18-refGene.loc">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
74 <column name="name" index="0"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
75 <column name="value" index="1"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
76 </options>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
77 </param>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
78 </when>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
79 <when value="hg18ensembl">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
80 <param name="selectedb" type="select" label="Input for the second interval set (-b)" >
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
81 <options from_file="aligndb-hg18-ensGene.loc">
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
82 <column name="name" index="0"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
83 <column name="value" index="1"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
84 </options>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
85 </param>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
86 </when>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
87
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
88 </conditional>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
89 <param name="windowsize" size="10" type="integer" value="0" label="Change input 2 interval size (-w)" help="will create new intervals of w bp flanking the original center. set to 0 will not change input interval size)"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
90 <param name="nbins" size="10" type="integer" value="100" label="Number of bins dividing intervals in input 2(-n)"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
91 <param name="span" size="10" type="float" value="0.1" label="loess span: smoothing parameter" help="value less then 0.1 disables smoothing"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
92 <param name="stranded" label="Check if require overlap on the same strand (-s)" type="boolean" truevalue="-s" falsevalue="" checked="False"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
93 <param name="outputlabel" size="80" type="text" label="Output label" value="test"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
94 <param name="ylim" size="10" type="text" label="set ylim of the plot" value="min,max" help="e.g. 0,1 (default is the min and max of the signal)"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
95
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
96 </inputs>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
97 <outputs>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
98 <data format="tabular" name="output_data" label="${outputlabel} (data)"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
99 <data format="pdf" name="output_plot" label="${outputlabel} (plot)"/>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
100 </outputs>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
101 <help>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
102
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
103 **What it does**
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
104
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
105 This tool aligns two sets of intervals, finds overlaps, calculates and plots the coverage of the first set across the second set. Applications include:
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
106
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
107 - check read distribution around TSS/poly A site/splice site/motif site/miRNA target site
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
108 - check relative position/overlap of two lists of ChIP-seq peaks
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
109
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
110 Two output files are generated. One is the coverage/profile for each interval in input 2. The first two columns are interval ID and the total number of overlapping intervals from input 1. Column 3 to column nbins+2 are coverage at each bin. The other file is an PDF file plotting the average coverage of each bin. To modify the visualization, please downlaod the coverage file and make your own plots.
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
111
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
112 -----
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
113
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
114 **Annotated features**
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
115
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
116 Currently supports mouse genome build mm9 and human hg18. Each interval spans 1000bp upstream and 1000bp downstream of a feature such as TSS. Features with overlapping exons in the intronic/intergenic part of the 2000bp interval are removed.
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
117
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
118 -----
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
119
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
120 **Usage**
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
121
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
122 -h, --help show this help message and exit
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
123 -a INPUTA (required) input file A, BED-like (first 3 columns: chr, start, end) or BAM format. The
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
124 script computes the depth of coverage of features in file
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
125 A across the features in file B
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
126 -b INPUTB (required) input file B, BED format or MACS peak file.
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
127 Requires an unique name for each line in column 4
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
128 -m inputB is a MACS peak file.
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
129 -f AFORMAT Format of input file A. Can be BED (default) or BAM
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
130 -w WINDOW Generate new inputB by making a window of 2 x WINDOW bp
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
131 (in total) flanking the center of each input feature
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
132 -n NBINS number of bins. Features in B are binned, and the coverage
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
133 is computed for each bin. Default is 100
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
134 -s enforce strandness: require overlapping on the same
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
135 strand. Default is off
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
136 -p load existed intersectBed outputfile
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
137 -q suppress output on screen
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
138 -o OUTPUTPROFILE (optional) output profile name.
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
139 -v PLOTFILE (optional) plot file name
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
140 </help>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
141 </tool>
b11a21c704ec Uploaded
xuebing
parents:
diff changeset
142