/tools/maf/maf_stats.xml
https://bitbucket.org/cistrome/cistrome-harvard/ · XML · 120 lines · 101 code · 19 blank · 0 comment · 0 complexity · 11f74ad86fd3e25dc5f1528600714397 MD5 · raw file
- <tool id="maf_stats1" name="MAF Coverage Stats" version="1.0.1">
- <description>Alignment coverage information</description>
- <command interpreter="python">
- maf_stats.py
- #if $maf_source_type.maf_source == "user":
- $maf_source_type.maf_source $input2 $input1 $out_file1 $dbkey ${input1.metadata.chromCol} ${input1.metadata.startCol} ${input1.metadata.endCol} $summary
- #else:
- $maf_source_type.maf_source $maf_source_type.mafType $input1 $out_file1 $dbkey ${input1.metadata.chromCol} ${input1.metadata.startCol} ${input1.metadata.endCol} $summary
- #end if
- ${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>
- <requirements>
- <requirement type="python-module">numpy</requirement>
- </requirements>
- <tests>
- <test>
- <param name="input1" value="1.bed" dbkey="hg17" format="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" format="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.
-
- ------
-
- **Citation**
-
- 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. <http://www.ncbi.nlm.nih.gov/pubmed/21775304>`_
-
-
- </help>
- </tool>