Mercurial > repos > iuc > bedops_sortbed
changeset 0:baeee32175e8 draft default tip
planemo upload for repository https://bedops.readthedocs.io/ commit e64b305e1ef7a6aa06a654f29701d7b43337c0ca
author | iuc |
---|---|
date | Tue, 08 Aug 2023 10:28:16 +0000 |
parents | |
children | |
files | sort-bed.xml test-data/sorted_duplicates.bed test-data/sorted_simpled.bed test-data/sorted_unique.bed test-data/unsorted.bed |
diffstat | 5 files changed, 78 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sort-bed.xml Tue Aug 08 10:28:16 2023 +0000 @@ -0,0 +1,66 @@ +<tool id="bedops-sort-bed" name="bedops sort-bed" version="@TOOL_VERSION@" profile="22.01"> + <macros> + <token name="@TOOL_VERSION@">2.4.41</token> + </macros> + <requirements> + <requirement type="package" version="@TOOL_VERSION@">bedops</requirement> + </requirements> + <command><![CDATA[ +sort-bed +--max-mem "\${GALAXY_MEMORY_MB:-1024}M" +--tmpdir "\${_GALAXY_JOB_TMP_DIR:-.}" +$unique +$duplicates +#for file in $inputs: + '$file' +#end for +> '$output' + ]]></command> + <inputs> + <param name="inputs" type="data" format="bed" multiple="true"/> + <param argument="--unique" type="boolean" truevalue="--unique" falsevalue="" label="Output only unique elements?"/> + <param argument="--duplicates" type="boolean" truevalue="--duplicates" falsevalue="" label="Output only duplicate elements?"/> + </inputs> + <outputs> + <data name="output" format_source="inputs" label="$tool.name: sorted output"/> + </outputs> + <tests> + <test> + <param name="inputs" value="unsorted.bed" ftype="bed"/> + <output name="output" value="sorted_simpled.bed"/> + </test> + <test> + <param name="inputs" value="unsorted.bed" ftype="bed"/> + <param name="unique" value="true"/> + <output name="output" value="sorted_unique.bed"/> + </test> + <test> + <param name="inputs" value="unsorted.bed" ftype="bed"/> + <param name="duplicates" value="true"/> + <output name="output" value="sorted_duplicates.bed"/> + </test> + </tests> + <help><![CDATA[ +What this tool does +=================== + +The sort-bed utility sorts BED files of any size, even larger than system memory. BED files that are in lexicographic-chromosome order allow BEDOPS utilities to work efficiently with data from any species without software modifications. Further, sorted files can be traversed very quickly. + +Sorted BED order is defined first by lexicographic chromosome order, then ascending integer start coordinate order, and finally by ascending integer end coordinate order. To make the sort order unambiguous, a lexicographical sort is applied on fourth and subsequent columns, where present in the input BED dataset. + + +Input +===== + +The sort-bed utility requires one or more three-column BED file(s). Support for common headers (such as UCSC BED track headers) is included, although headers will be stripped from the output. + + +Output +====== + +Sort order is defined by a lexicographical sort on chromosome name, a numerical sort on start coordinates, a numerical sort on stop coordinates where there are start matches, and finally a lexicographical sort on the remainder of the BED element (if additional columns are present). Additional options may be specified to print only unique or duplicate elements. + ]]></help> + <citations> + <citation type="doi">https://doi.org/10.1093/bioinformatics/bts277</citation> + </citations> +</tool>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/sorted_duplicates.bed Tue Aug 08 10:28:16 2023 +0000 @@ -0,0 +1,1 @@ +dummy_chr 1 100 0 0 99 0.0000000
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/sorted_simpled.bed Tue Aug 08 10:28:16 2023 +0000 @@ -0,0 +1,4 @@ +dummy_chr 1 100 0 0 99 0.0000000 +dummy_chr 1 100 0 0 99 0.0000000 +dummy_chr 1000 1000000 2 152 999000 0.0001522 +super_dummy_chr 1 100 0 0 99 0.0000000