Mercurial > repos > yating-l > twobit_to_cytoband_340
changeset 0:4686151c96ad draft default tip
planemo upload commit c1f0c5ceaac87b6b1db12160a8f5b287635db61b
author | yating-l |
---|---|
date | Mon, 10 Jul 2017 12:47:53 -0400 |
parents | |
children | |
files | test-data/contigs.2bit test-data/contigs_cytoband.bed tool_dependencies.xml twobit_to_cytoband.xml ucsc_macros.xml |
diffstat | 5 files changed, 97 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/contigs_cytoband.bed Mon Jul 10 12:47:53 2017 -0400 @@ -0,0 +1,2 @@ +contig10 0 43013 contig10 gneg +contig12 0 56019 contig12 gneg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Mon Jul 10 12:47:53 2017 -0400 @@ -0,0 +1,6 @@ +<?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> +</tool_dependency>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/twobit_to_cytoband.xml Mon Jul 10 12:47:53 2017 -0400 @@ -0,0 +1,45 @@ +<?xml version="1.0"?> +<tool id="twobit_to_cytoband" name="twoBitToCytoband" version="1.0"> + <description>Creates a cytoband file from a twoBit file</description> + + <macros> + <import>ucsc_macros.xml</import> + </macros> + + <expand macro="requirements_twobit" /> + + <command detect_errors="exit_code"> +<![CDATA[ + twoBitInfo "${twobit_input}" stdout | + sort -k 1,1 -k 2,2n | + awk 'BEGIN { OFS="\t" } { print $1, 0, $2, $1, "gneg" }' > "${bed_output}" +]]> + </command> + + <expand macro="environment_LC_COLLATE" /> + + <inputs> + <param name="twobit_input" type="data" format="twobit" label="twoBit input file" /> + </inputs> + <outputs> + <data name="bed_output" format="bed" /> + </outputs> + <tests> + <test> + <!-- Test create Cytoband bed file from a twoBit file --> + <param name="twobit_input" value="contigs.2bit" ftype="twobit" /> + <output name="bed_output" file="contigs_cytoband.bed" /> + </test> + </tests> + <help> +<![CDATA[ +**What it does** + +This tool creates a `Cytoband file <http://genomewiki.ucsc.edu/index.php/Assembly_Hubs#Cytoband_Track>`_ +from a twoBit file to enable quicker navigation of individual scaffolds +in the UCSC Genome Browser. + + ]]></help> + + <expand macro="citations" /> +</tool>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ucsc_macros.xml Mon Jul 10 12:47:53 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>