Mercurial > repos > yating-l > hg_gc_percent_340
changeset 0:c440273bd845 draft default tip
planemo upload commit 7624082bc86d63e7a63cc72a75287b7b7408678d-dirty
author | yating-l |
---|---|
date | Mon, 10 Jul 2017 12:43:51 -0400 |
parents | |
children | |
files | README.md hg_gc_percent.xml test-data/contig12_gc5Base.bw test-data/contigs.unmasked.2bit test-data/contigs_gc100Base_10overlap.bw test-data/contigs_gc5Base.bw tool_dependencies.xml ucsc_macros.xml |
diffstat | 8 files changed, 161 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.md Mon Jul 10 12:43:51 2017 -0400 @@ -0,0 +1,9 @@ +hgGcPercent +------------ + +This is a Galaxy Wrapper to calculate GC percentages of a twobit file. + +Reference +========= + +[Browser Track Construction on GC Percent](http://genomewiki.ucsc.edu/index.php/Browser_Track_Construction#GC_Percent)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hg_gc_percent.xml Mon Jul 10 12:43:51 2017 -0400 @@ -0,0 +1,96 @@ +<?xml version="1.0"?> +<tool id="hg_gc_percent" name="hgGcPercent" version="1.0"> + <description>Calculates GC percentages of a twoBit file</description> + + <macros> + <import>ucsc_macros.xml</import> + </macros> + + <expand macro="requirements_twobit"> + <requirement type="package" version="340">ucsc_gcpercent</requirement> + <requirement type="package" version="340">ucsc_bigwig</requirement> + </expand> + + <command detect_errors="exit_code"> +<![CDATA[ + ## This tool generates a bigWig file instead of a gzip wiggle file in order + ## to facilitate testing. Support for comparing gzip files will be added to + ## Galaxy in 17.05: https://github.com/galaxyproject/galaxy/pull/3550 + + twoBitInfo "${twobit_input}" "${twobit_input}.chromInfo" && + + hgGcPercent -doGaps -noDots -verbose=0 -wigOut + -win=${window_size} + -overlap=${overlap} + -file=stdout + + #if str($region_type.region_type_selector) == "chrom": + -chr="${region_type.chrom_name}" + #end if + + db_placeholder "${twobit_input}" | + + wigToBigWig stdin "${twobit_input}.chromInfo" "${bw_output}" +]]> + </command> + <inputs> + <param name="twobit_input" type="data" format="twobit" label="twoBit input file" /> + + <param name="window_size" type="integer" min="1" value="5" + label="Window size" + help="Size of the sliding window for calculating GC percentages (-win)" /> + + <param name="overlap" type="integer" min="0" value="0" + label="Overlap size" + help="Size of overlap for the sliding window (-overlap)" /> + + <conditional name="region_type"> + <param name="region_type_selector" type="select" + label="Choose the analysis region"> + <option value="all" selected="true">All scaffolds</option> + <option value="chrom">Chromosome</option> + </param> + + <when value="all"></when> + + <when value="chrom"> + <param name="chrom_name" type="text" label="Sequence name" + help="Process only this sequence in the twoBit file" /> + </when> + </conditional> + </inputs> + <outputs> + <data name="bw_output" format="bigwig" /> + </outputs> + <tests> + <test> + <!-- Test hgGcPercent with default settings --> + <param name="twobit_input" value="contigs.unmasked.2bit" ftype="twobit" /> + <output name="bw_output" file="contigs_gc5Base.bw" /> + </test> + <test> + <!-- Test hgGcPercent with custom window and overlap --> + <param name="twobit_input" value="contigs.unmasked.2bit" ftype="twobit" /> + <param name="window_size" value="100" /> + <param name="overlap" value="10" /> + <output name="bw_output" file="contigs_gc100Base_10overlap.bw" /> + </test> + <test> + <!-- Test hgGcPercent with only one chromosome --> + <param name="twobit_input" value="contigs.unmasked.2bit" ftype="twobit" /> + <param name="region_type_selector" value="chrom" /> + <param name="chrom_name" value="contig12" /> + <output name="bw_output" file="contig12_gc5Base.bw" /> + </test> + </tests> + <help> +<![CDATA[ +**What it does** + +hgGcPercent uses a sliding window to calculate the GC percentages +of a genome assembly. + + ]]></help> + + <expand macro="citations" /> +</tool>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Mon Jul 10 12:43:51 2017 -0400 @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<tool_dependency> + <package name="ucsc_twobit" version="340"> + <repository changeset_revision="f03dc0347e70" name="package_ucsc_twobit_340" owner="yating-l" toolshed="https://toolshed.g2.bx.psu.edu" /> + </package> + <package name="ucsc_gcpercent" version="340"> + <repository changeset_revision="dd6a70b36193" name="package_ucsc_gcpercent_340" owner="yating-l" toolshed="https://toolshed.g2.bx.psu.edu" /> + </package> + <package name="ucsc_bigwig" version="340"> + <repository changeset_revision="5ba6d8812c60" name="package_ucsc_bigwig_340" owner="yating-l" toolshed="https://toolshed.g2.bx.psu.edu" /> + </package> +</tool_dependency>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ucsc_macros.xml Mon Jul 10 12:43:51 2017 -0400 @@ -0,0 +1,44 @@ +<macros> + <xml name="requirements_twobit"> + <requirements> + <requirement type="package" version="340">ucsc_twobit</requirement> + <yield /> + </requirements> + </xml> + <xml name="environment_LC_COLLATE"> + <environment_variables> + <!-- Sort uppercase letters before lowercase (required by UCSC tools) --> + <environment_variable name="LC_COLLATE">C</environment_variable> + <yield /> + </environment_variables> + </xml> + <xml name="citations"> + <citations> + <citation type="bibtex"> + @article{Kent01062002, +author = {Kent, W. James and Sugnet, Charles W. and Furey, Terrence S. and Roskin, Krishna M. and Pringle, Tom H. and Zahler, Alan M. and Haussler, and David}, +title = {The Human Genome Browser at UCSC}, +volume = {12}, +number = {6}, +pages = {996-1006}, +year = {2002}, +doi = {10.1101/gr.229102}, +URL = {http://genome.cshlp.org/content/12/6/996.abstract}, +eprint = {http://genome.cshlp.org/content/12/6/996.full.pdf+html}, +journal = {Genome Research} +} + </citation> + <yield /> + </citations> + </xml> + + <token name="@OPTIONAL_PARAM_FUNC@"> +<![CDATA[ + #def optional_param($_flag, $_flag_value, $_sep="=") + #if str($_flag_value) and str($_flag_value).strip(): + ${_flag}${_sep}${_flag_value} + #end if + #end def +]]> + </token> +</macros>