mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
113 lines
3.9 KiB
XML
113 lines
3.9 KiB
XML
<tool id="maf_stats1" name="MAF Coverage Stats" version="1.0.1">
|
|
<description>Alignment coverage information</description>
|
|
<macros>
|
|
<import>macros.xml</import>
|
|
</macros>
|
|
<command>
|
|
python '$__tool_directory__/maf_stats.py' $maf_source_type.maf_source
|
|
#if $maf_source_type.maf_source == "user":
|
|
'$input2'
|
|
#else:
|
|
'$maf_source_type.mafType'
|
|
#end if
|
|
'$input1' '$out_file1' $dbkey ${input1.metadata.chromCol} ${input1.metadata.startCol} ${input1.metadata.endCol} $summary '${GALAXY_DATA_INDEX_DIR}'
|
|
#if $maf_source_type.maf_source == "user":
|
|
'$input2.metadata.maf_index'
|
|
#end if
|
|
</command>
|
|
<inputs>
|
|
<param format="interval" name="input1" label="Interval File" type="data">
|
|
<validator type="unspecified_build" />
|
|
</param>
|
|
<conditional name="maf_source_type">
|
|
<param name="maf_source" type="select" label="MAF Source">
|
|
<option value="cached" selected="true">Locally Cached Alignments</option>
|
|
<option value="user">Alignments in Your History</option>
|
|
</param>
|
|
<when value="user">
|
|
<param format="maf" name="input2" label="MAF File" type="data">
|
|
<options>
|
|
<filter type="data_meta" ref="input1" key="dbkey" />
|
|
</options>
|
|
<validator type="dataset_ok_validator" />
|
|
</param>
|
|
</when>
|
|
<when value="cached">
|
|
<param name="mafType" type="select" label="MAF Type">
|
|
<options from_file="maf_index.loc">
|
|
<column name="name" index="0"/>
|
|
<column name="value" index="1"/>
|
|
<column name="dbkey" index="2"/>
|
|
<filter type="data_meta" ref="input1" key="dbkey" column="2" multiple="True" separator=","/>
|
|
<validator type="no_options" message="No alignments are available for the build associated with the selected interval file"/>
|
|
</options>
|
|
</param>
|
|
</when>
|
|
</conditional>
|
|
<param name="summary" type="select" label="Type of Output">
|
|
<option value="false" selected="true">Coverage by Region</option>
|
|
<option value="true">Summarize Coverage</option>
|
|
</param>
|
|
</inputs>
|
|
<outputs>
|
|
<data format="interval" name="out_file1" metadata_source="input1">
|
|
<change_format>
|
|
<when input="summary" value="true" format="tabular" />
|
|
</change_format>
|
|
</data>
|
|
</outputs>
|
|
<tests>
|
|
<test>
|
|
<param name="input1" value="1.bed" dbkey="hg17" ftype="bed"/>
|
|
<param name="maf_source" value="cached"/>
|
|
<param name="mafType" value="8_WAY_MULTIZ_hg17"/>
|
|
<output name="out_file1" file="maf_stats_interval_out.dat"/>
|
|
<param name="summary" value="false"/>
|
|
</test>
|
|
<test>
|
|
<param name="input1" value="1.bed" dbkey="hg17" ftype="bed"/>
|
|
<param name="maf_source" value="cached"/>
|
|
<param name="mafType" value="8_WAY_MULTIZ_hg17"/>
|
|
<output name="out_file1" file="maf_stats_summary_out.dat"/>
|
|
<param name="summary" value="true"/>
|
|
</test>
|
|
</tests>
|
|
<help>
|
|
**What it does**
|
|
|
|
This tool takes a MAF file and an interval file and relates coverage information by interval for each species.
|
|
If a column does not exist in the reference genome, it is not included in the output.
|
|
|
|
Consider the interval: "chrX 1000 1100 myInterval"
|
|
Let's suppose we want to do stats on three way alignments for H, M, and R. The result look like this:
|
|
|
|
chrX 1000 1100 myInterval H XXX YYY
|
|
|
|
chrX 1000 1100 myInterval M XXX YYY
|
|
|
|
chrX 1000 1100 myInterval R XXX YYY
|
|
|
|
|
|
where XXX and YYY are:
|
|
|
|
XXX = number of nucleotides
|
|
|
|
YYY = number of gaps
|
|
|
|
----
|
|
|
|
Alternatively, you can request only summary information for a set of intervals:
|
|
|
|
======== =========== ========
|
|
#species nucleotides coverage
|
|
======== =========== ========
|
|
hg18 30639 0.2372
|
|
rheMac2 7524 0.0582
|
|
panTro2 30390 0.2353
|
|
======== =========== ========
|
|
|
|
where **coverage** is the number of nucleotides divided by the total length of the provided intervals.
|
|
</help>
|
|
<expand macro="citations" />
|
|
</tool>
|