annotate tools/mytools/alignr.xml @ 0:9071e359b9a3

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:37:19 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 <tool id="alignr" name="align">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description>two interval sets</description>
9071e359b9a3 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
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 #if $inputb_source_type.inputb_select == "user":
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 -b "$inputb"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 #else:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 -b "${inputb_source_type.selectedb.fields.value}"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 #end if
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 #if $inputa_format.inputa_select == "BAM":
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 -f BAM
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 #end if
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 </command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 <conditional name="inputa_format">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 <param name="inputa_select" type="select" label="Select your first input format" >
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 <option value="BED" selected="true">BED-like (chrNum start end ...) </option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 <option value="BAM"> BAM</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 <when value="BED">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 <param name="inputa" type="data" format="interval" label="Input file for the first interval set (-a)"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 <when value="BAM">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 <param name="inputa" type="data" format="bam" label="Input file for the first interval set (-a)"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 </conditional>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 <conditional name="inputb_source_type">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 <param name="inputb_select" type="select" label="Input source for the second interval set">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 <option value="mm9ucsc" selected="true">mm9 ucsc knownGene annotations</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 <option value="mm9refseq">mm9 refseq gene annotations</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 <option value="mm9ensembl">mm9 ensembl gene annotations</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31 <option value="hg18ucsc" >hg18 ucsc knownGene annotations</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 <option value="hg18refseq">hg18 refseq gene annotations</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33 <option value="hg18ensembl">hg18 ensembl gene annotations</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 <option value="user">Dataset in Your History</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 <when value="user">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 <param name="inputb" type="data" format="interval" label="Input file for the second interval set (-b)" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39 <when value="mm9ucsc">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 <param name="selectedb" type="select" label="Input for the second interval set (-b)" >
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 <options from_file="aligndb-mm9-knownGene.loc">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42 <column name="name" index="0"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 <column name="value" index="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44 </options>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47 <when value="mm9refseq">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 <param name="selectedb" type="select" label="Input for the second interval set (-b)" >
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49 <options from_file="aligndb-mm9-refGene.loc">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 <column name="name" index="0"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51 <column name="value" index="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52 </options>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55 <when value="mm9ensembl">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 <param name="selectedb" type="select" label="Input for the second interval set (-b)" >
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57 <options from_file="aligndb-mm9-ensGene.loc">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 <column name="name" index="0"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59 <column name="value" index="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60 </options>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63 <when value="hg18ucsc">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64 <param name="selectedb" type="select" label="Input for the second interval set (-b)" >
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 <options from_file="aligndb-hg18-knownGene.loc">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 <column name="name" index="0"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 <column name="value" index="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68 </options>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71 <when value="hg18refseq">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72 <param name="selectedb" type="select" label="Input for the second interval set (-b)" >
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73 <options from_file="aligndb-hg18-refGene.loc">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74 <column name="name" index="0"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75 <column name="value" index="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76 </options>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79 <when value="hg18ensembl">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
80 <param name="selectedb" type="select" label="Input for the second interval set (-b)" >
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
81 <options from_file="aligndb-hg18-ensGene.loc">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
82 <column name="name" index="0"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
83 <column name="value" index="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
84 </options>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
85 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
86 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
87
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
88 </conditional>
9071e359b9a3 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)"/>
9071e359b9a3 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)"/>
9071e359b9a3 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"/>
9071e359b9a3 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"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
93 <param name="outputlabel" size="80" type="text" label="Output label" value="test"/>
9071e359b9a3 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)"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
95
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
96 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
97 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
98 <data format="tabular" name="output_data" label="${outputlabel} (data)"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
99 <data format="pdf" name="output_plot" label="${outputlabel} (plot)"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
100 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
101 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
102
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
103 **What it does**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
104
9071e359b9a3 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:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
106
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
107 - check read distribution around TSS/poly A site/splice site/motif site/miRNA target site
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
108 - check relative position/overlap of two lists of ChIP-seq peaks
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
109
9071e359b9a3 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.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
111
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
112 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
113
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
114 **Annotated features**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
115
9071e359b9a3 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.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
117
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
118 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
119
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
120 **Usage**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
121
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
122 -h, --help show this help message and exit
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
123 -a INPUTA (required) input file A, BED-like (first 3 columns: chr, start, end) or BAM format. The
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
124 script computes the depth of coverage of features in file
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
125 A across the features in file B
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
126 -b INPUTB (required) input file B, BED format or MACS peak file.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
127 Requires an unique name for each line in column 4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
128 -m inputB is a MACS peak file.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
129 -f AFORMAT Format of input file A. Can be BED (default) or BAM
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
130 -w WINDOW Generate new inputB by making a window of 2 x WINDOW bp
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
131 (in total) flanking the center of each input feature
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
132 -n NBINS number of bins. Features in B are binned, and the coverage
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
133 is computed for each bin. Default is 100
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
134 -s enforce strandness: require overlapping on the same
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
135 strand. Default is off
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
136 -p load existed intersectBed outputfile
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
137 -q suppress output on screen
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
138 -o OUTPUTPROFILE (optional) output profile name.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
139 -v PLOTFILE (optional) plot file name
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
140 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
141 </tool>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
142