comparison tools/maf/maf_stats.xml @ 0:9071e359b9a3

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