PageRenderTime 37ms CodeModel.GetById 26ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/tools/new_operations/cluster.xml

https://bitbucket.org/cistrome/cistrome-harvard/
XML | 96 lines | 80 code | 16 blank | 0 comment | 0 complexity | aa8759cee31b4e6941c49154b908e983 MD5 | raw file
 1<tool id="gops_cluster_1" name="Cluster">
 2  <description>the intervals of a dataset</description>
 3  <trackster_conf/>
 4  <command interpreter="python">gops_cluster.py $input1 $output -1 ${input1.metadata.chromCol},${input1.metadata.startCol},${input1.metadata.endCol},${input1.metadata.strandCol} -d $distance -m $minregions -o $returntype</command>
 5  <inputs>
 6    <param format="interval" name="input1" type="data">
 7      <label>Cluster intervals of</label>
 8    </param>
 9    <param name="distance" size="5" type="integer" value="1" help="(bp)">
10      <label>max distance between intervals</label>
11    </param>
12    <param name="minregions" size="5" type="integer" value="2">
13      <label>min number of intervals per cluster</label>
14    </param>
15	<param name="returntype" type="select" label="Return type">
16		<option value="1">Merge clusters into single intervals</option>
17		<option value="2">Find cluster intervals; preserve comments and order</option>
18		<option value="3">Find cluster intervals; output grouped by clusters</option>
19		<option value="4">Find the smallest interval in each cluster</option>
20		<option value="5">Find the largest interval in each cluster</option>
21	</param>
22   </inputs>
23  <outputs>
24    <data format="input" name="output" metadata_source="input1" />
25  </outputs>
26  <code file="operation_filter.py">
27    <hook exec_after_process="exec_after_cluster" />
28  </code>
29  <tests>
30    <test>
31      <param name="input1" value="5.bed" />
32      <param name="distance" value="1" />
33      <param name="minregions" value="2" />
34      <param name="returntype" value="1" />
35      <output name="output" file="gops-cluster-1.bed" />     
36    </test>
37    <test>
38      <param name="input1" value="gops_cluster_bigint.bed" />
39      <param name="distance" value="1" />
40      <param name="minregions" value="2" />
41      <param name="returntype" value="1" />
42      <output name="output" file="gops-cluster-1.bed" />     
43    </test>
44    <test>
45      <param name="input1" value="5.bed" />
46      <param name="distance" value="1" />
47      <param name="minregions" value="2" />
48      <param name="returntype" value="2" />
49      <output name="output" file="gops-cluster-2.bed" />     
50    </test>    
51    <test>
52      <param name="input1" value="5.bed" />
53      <param name="distance" value="1" />
54      <param name="minregions" value="2" />
55      <param name="returntype" value="3" />
56      <output name="output" file="gops-cluster-3.bed" />     
57    </test>
58  </tests>
59  <help>
60
61.. class:: infomark
62
63**TIP:** If your dataset does not appear in the pulldown menu, it means that it is not in interval format. Use "edit attributes" to set chromosome, start, end, and strand columns.
64
65-----
66
67**Screencasts!**
68
69See Galaxy Interval Operation Screencasts_ (right click to open this link in another window).
70
71.. _Screencasts: http://wiki.g2.bx.psu.edu/Learn/Interval%20Operations
72
73-----
74
75**Syntax**
76
77- **Maximum distance** is greatest distance in base pairs allowed between intervals that will be considered &quot;clustered&quot;.  **Negative** values for distance are allowed, and are useful for clustering intervals that overlap.
78- **Minimum intervals per cluster** allow a threshold to be set on the minimum number of intervals to be considered a cluster.  Any area with less than this minimum will not be included in the output.
79- **Merge clusters into single intervals** outputs intervals that span the entire cluster.
80- **Find cluster intervals; preserve comments and order** filters out non-cluster intervals while maintaining the original ordering and comments in the file.
81- **Find cluster intervals; output grouped by clusters** filters out non-cluster intervals, but outputs the cluster intervals so that they are grouped together. Comments and original ordering in the file are lost.
82
83-----
84
85**Examples**
86
87Find Clusters:
88
89.. image:: ${static_path}/operation_icons/gops_clusterFind.gif
90
91Merge Clusters:
92
93.. image:: ${static_path}/operation_icons/gops_clusterMerge.gif
94
95</help>
96</tool>