annotate tools/maf/maf_stats.xml @ 2:c2a356708570

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:45:42 -0500
parents 9071e359b9a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 <tool id="maf_stats1" name="MAF Coverage Stats" version="1.0.1">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description>Alignment coverage information</description>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 <command interpreter="python">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 maf_stats.py
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 #if $maf_source_type.maf_source == "user":
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 $maf_source_type.maf_source $input2 $input1 $out_file1 $dbkey ${input1.metadata.chromCol} ${input1.metadata.startCol} ${input1.metadata.endCol} $summary
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 #else:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 $maf_source_type.maf_source $maf_source_type.mafType $input1 $out_file1 $dbkey ${input1.metadata.chromCol} ${input1.metadata.startCol} ${input1.metadata.endCol} $summary
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 #end if
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 ${GALAXY_DATA_INDEX_DIR}
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 #if $maf_source_type.maf_source == "user":
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 $input2.metadata.maf_index
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 #end if
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 </command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 <param format="interval" name="input1" label="Interval File" type="data">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 <validator type="unspecified_build" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 <conditional name="maf_source_type">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 <param name="maf_source" type="select" label="MAF Source">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 <option value="cached" selected="true">Locally Cached Alignments</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 <option value="user">Alignments in Your History</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 <when value="user">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 <param format="maf" name="input2" label="MAF File" type="data">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 <options>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 <filter type="data_meta" ref="input1" key="dbkey" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 </options>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 <validator type="dataset_ok_validator" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 <when value="cached">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33 <param name="mafType" type="select" label="MAF Type">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 <options from_file="maf_index.loc">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 <column name="name" index="0"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 <column name="value" index="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 <column name="dbkey" index="2"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 <filter type="data_meta" ref="input1" key="dbkey" column="2" multiple="True" separator=","/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39 <validator type="no_options" message="No alignments are available for the build associated with the selected interval file"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 </options>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 </conditional>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44 <param name="summary" type="select" label="Type of Output">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 <option value="false" selected="true">Coverage by Region</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 <option value="true">Summarize Coverage</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 <data format="interval" name="out_file1" metadata_source="input1">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51 <change_format>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52 <when input="summary" value="true" format="tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53 </change_format>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 </data>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 <requirements>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57 <requirement type="python-module">numpy</requirement>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 </requirements>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59 <tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61 <param name="input1" value="1.bed" dbkey="hg17" format="bed"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62 <param name="maf_source" value="cached"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63 <param name="mafType" value="8_WAY_MULTIZ_hg17"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64 <output name="out_file1" file="maf_stats_interval_out.dat"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 <param name="summary" value="false"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68 <param name="input1" value="1.bed" dbkey="hg17" format="bed"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69 <param name="maf_source" value="cached"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70 <param name="mafType" value="8_WAY_MULTIZ_hg17"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71 <output name="out_file1" file="maf_stats_summary_out.dat"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72 <param name="summary" value="true"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74 </tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77 **What it does**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79 This tool takes a MAF file and an interval file and relates coverage information by interval for each species.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
80 If a column does not exist in the reference genome, it is not included in the output.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
81
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
82 Consider the interval: "chrX 1000 1100 myInterval"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
83 Let's suppose we want to do stats on three way alignments for H, M, and R. The result look like this:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
84
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
85 chrX 1000 1100 myInterval H XXX YYY
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
86
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
87 chrX 1000 1100 myInterval M XXX YYY
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
88
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
89 chrX 1000 1100 myInterval R XXX YYY
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
90
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
91
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
92 where XXX and YYY are:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
93
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
94 XXX = number of nucleotides
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
95
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
96 YYY = number of gaps
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
97
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
98 ----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
99
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
100 Alternatively, you can request only summary information for a set of intervals:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
101
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
102 ======== =========== ========
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
103 #species nucleotides coverage
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
104 ======== =========== ========
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
105 hg18 30639 0.2372
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
106 rheMac2 7524 0.0582
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
107 panTro2 30390 0.2353
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
108 ======== =========== ========
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
109
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
110 where **coverage** is the number of nucleotides divided by the total length of the provided intervals.
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 **Citation**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
115
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
116 If you use this tool, please cite `Blankenberg D, Taylor J, Nekrutenko A; The Galaxy Team. Making whole genome multiple alignments usable for biologists. Bioinformatics. 2011 Sep 1;27(17):2426-2428. &lt;http://www.ncbi.nlm.nih.gov/pubmed/21775304&gt;`_
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
117
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
118
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
119 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
120 </tool>