comparison maf_stats.xml @ 0:5a92f4c476b5 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/interval2maf/ commit f7b04f8c6edca90b1e9bc867a1569996aec76d7a"
author iuc
date Thu, 13 Aug 2020 09:30:47 -0400
parents
children 0c84cce7b030
comparison
equal deleted inserted replaced
-1:000000000000 0:5a92f4c476b5
1 <tool id="maf_stats1" name="MAF Coverage Stats" version="1.0.1">
2 <description>Alignment coverage information</description>
3 <command>
4 <![CDATA[
5 #if $maf_source_type.maf_source == 'cached'
6 #set $tab = '\t'
7 echo '$maf_source_type.mafType.fields.name${tab}$maf_source_type.mafType.fields.value${tab}$maf_source_type.mafType.fields.indexed_for${tab}$maf_source_type.mafType.fields.exists_in_maf${tab}$maf_source_type.mafType.fields.path' >> ./maf_index.loc &&
8 #end if
9 python '$__tool_directory__/maf_stats.py' $maf_source_type.maf_source
10 #if $maf_source_type.maf_source == 'user':
11 '$input2'
12 #else:
13 $maf_source_type.mafType.fields.value
14 #end if
15 '$input1' '$out_file1' $dbkey ${input1.metadata.chromCol} ${input1.metadata.startCol} ${input1.metadata.endCol} $summary '.'
16 #if $maf_source_type.maf_source == 'user':
17 '$input2.metadata.maf_index'
18 #end if
19 ]]>
20 </command>
21 <inputs>
22 <param format="interval" name="input1" label="Interval File" type="data">
23 <validator type="unspecified_build" />
24 </param>
25 <conditional name="maf_source_type">
26 <param name="maf_source" type="select" label="MAF Source">
27 <option value="cached" selected="true">Locally Cached Alignments</option>
28 <option value="user">Alignments in Your History</option>
29 </param>
30 <when value="user">
31 <param format="maf" name="input2" label="Choose alignments" type="data">
32 <options>
33 <filter type="data_meta" ref="input1" key="dbkey" />
34 </options>
35 <validator type="dataset_ok_validator" />
36 </param>
37 <param name="species" type="select" display="checkboxes" multiple="true" label="Choose species" help="Select species to be included in the final alignment">
38 <options>
39 <filter type="data_meta" ref="input2" key="species" />
40 </options>
41 </param>
42 </when>
43 <when value="cached">
44 <param name="mafType" type="select" label="Choose alignments">
45 <options from_data_table="maf_indexes">
46 <column name="name" index="0"/>
47 <column name="value" index="1"/>
48 <column name="indexed_for" index="2"/>
49 <column name="exists_in_maf" index="3" />
50 <column name="path" index="4" />
51 <filter type="data_meta" ref="input1" key="dbkey" column="2" multiple="True" separator=","/>
52 <validator type="no_options" message="No alignments are available for the build associated with the selected interval file"/>
53 </options>
54 </param>
55 <param name="species" type="select" display="checkboxes" multiple="true" label="Choose species" help="Select species to be included in the final alignment">
56 <options from_data_table="maf_indexes">
57 <column name="value" index="3"/>
58 <filter type="multiple_splitter" column="3" separator=","/>
59 </options>
60 </param>
61 </when>
62 </conditional>
63 <param name="summary" type="select" label="Type of Output">
64 <option value="false" selected="true">Coverage by Region</option>
65 <option value="true">Summarize Coverage</option>
66 </param>
67 </inputs>
68 <outputs>
69 <data format="interval" name="out_file1" metadata_source="input1">
70 <change_format>
71 <when input="summary" value="true" format="tabular" />
72 </change_format>
73 </data>
74 </outputs>
75 <tests>
76 <test>
77 <param name="input1" value="maf_stats-in1.bed" dbkey="hg38" ftype="bed"/>
78 <param name="maf_source" value="cached"/>
79 <param name="mafType" value="TEST"/>
80 <output name="out_file1" file="maf_stats-out1.dat"/>
81 <param name="summary" value="false"/>
82 </test>
83 <test>
84 <param name="input1" value="maf_stats-in2.bed" dbkey="hg38" ftype="bed"/>
85 <param name="maf_source" value="cached"/>
86 <param name="mafType" value="TEST"/>
87 <output name="out_file1" file="maf_stats-out2.dat"/>
88 <param name="summary" value="true"/>
89 </test>
90 </tests>
91 <help>
92 **What it does**
93
94 This tool takes a MAF file and an interval file and relates coverage information by interval for each species.
95 If a column does not exist in the reference genome, it is not included in the output.
96
97 Consider the interval: "chrX 1000 1100 myInterval"
98 Let's suppose we want to do stats on three way alignments for H, M, and R. The result look like this:
99
100 chrX 1000 1100 myInterval H XXX YYY
101
102 chrX 1000 1100 myInterval M XXX YYY
103
104 chrX 1000 1100 myInterval R XXX YYY
105
106
107 where XXX and YYY are:
108
109 XXX = number of nucleotides
110
111 YYY = number of gaps
112
113 ----
114
115 Alternatively, you can request only summary information for a set of intervals:
116
117 ======== =========== ========
118 #species nucleotides coverage
119 ======== =========== ========
120 hg18 30639 0.2372
121 rheMac2 7524 0.0582
122 panTro2 30390 0.2353
123 ======== =========== ========
124
125 where **coverage** is the number of nucleotides divided by the total length of the provided intervals.
126 </help>
127 <citations>
128 <citation type="doi">10.1093/bioinformatics/btr398</citation>
129 </citations>
130 </tool>