Mercurial > repos > iuc > pretext_snapshot
changeset 0:02b21260faf4 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pretext commit 16b63814cb85eff8e8f2486c99bb4d187d43e2fe"
author | iuc |
---|---|
date | Mon, 05 Apr 2021 17:27:18 +0000 |
parents | |
children | 7a5eaa19e92f |
files | pretext_snapshot.xml test-data/fullmap1.jpg test-data/fullmap2.bmp test-data/map.pretext test-data/snapshot1.jpg test-data/snapshot2.jpg test-data/snapshot3.jpg |
diffstat | 7 files changed, 190 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pretext_snapshot.xml Mon Apr 05 17:27:18 2021 +0000 @@ -0,0 +1,190 @@ +<tool id="pretext_snapshot" name="Pretext Snapshot" version="@WRAPPER_VERSION@+@VERSION_SUFFIX@" profile="20.01"> + <macros> + <token name="@WRAPPER_VERSION@">0.0.3</token> + <token name="@VERSION_SUFFIX@">galaxy0</token> + </macros> + <requirements> + <requirement type="package" version="@WRAPPER_VERSION@">pretextsnapshot</requirement> + <requirement type="package" version="1.601">rename</requirement> + </requirements> + <version_command>PretextSnapshot --version</version_command> + <command detect_errors="exit_code"><![CDATA[ + PretextSnapshot -m $input + -f $formats.outformat + #if $formats.outformat == 'jpeg': + --jpegQuality $formats.jpegQuality + #end if + -r $resolution + -c $colormap + --sequences '$sequences' + --minTexels $mintexels + #if $grid.showGrid == 'yes': + --gridSize $grid.gridsize + --gridColour $grid.gridcolor + #else: + --gridSize 0 + #end if + '${sequencenames}' + -o output + --prefix pretext_snapshot + #if $formats.outformat == 'jpeg': + && find ./output/* | rename -s .jpeg .jpg + #end if + ]]></command> + <inputs> + <param name="input" type="data" argument="--map" format="pretext" label="Input Pretext map file"/> + <conditional name="formats"> + <param name="outformat" argument="-f" type="select" label="Output image format" help="Format of output image"> + <option value="png" selected="true"/> + <option value="bmp"/> + <option value="jpeg"/> + </param> + <when value="png"/> + <when value="bmp"/> + <when value="jpeg"> + <param name="jpegQuality" argument="--jpegQuality" type="integer" label="JPEG quality factor" value="80" min="0" max="100" help="An integer between 1 and 100, default 80. Larger values result in increased image quality and file size."/> + </when> + </conditional> + <param name="resolution" argument="-r" type="integer" label="Output image resolution" min="1" value="1000" help="Image resolution, a positive integer, default 1080. For non-square images this will be the resolution of the longest dimension."/> + <param name="colormap" argument='-c' type="integer" label="Color Map" value="5" min="0" max="30" help="Color map based on list available in the help section"/> + <param name="sequences" argument="--sequences" type="text" label="Sequence specification string" value="=full, =all" help="Each entry, except for '=all', corresponds to one output image. More information available in the help section."> + <sanitizer invalid_char=""> + <valid initial="string.ascii_letters,string.digits"> + <add value="="/> + <add value="_"/> + <add value=" "/> + <add value=","/> + <add value="["/> + <add value="]"/> + <add value="{"/> + <add value="}"/> + <add value="#"/> + <add value="<"/> + <add value=">"/> + </valid> + </sanitizer> + </param> + <param name="mintexels" argument="--minTexels" type="integer" min="1" label="Min Texels" value="64" help="Minimum map texels per image (along a single dimension), a positive integer, Output images over too small a range that violate this minimum will not be created."/> + <conditional name="grid"> + <param name="showGrid" label="Show grid?" type="boolean" truevalue="yes" falsevalue="no"/> + <when value="yes"> + <param name="gridsize" argument="--gridSize" type="integer" label="Grid size" value="1" min="1" help="Width in pixels of the sequence separation grid, a non-negative integer. Set to 0 to not overlay a grid."/> + <param name="gridcolor" argument="--gridColour" type="text" label="Grid color" value="black" help="Colour of the sequence separation grid. Either, one of: 'black'(default), 'white', 'red', 'green', 'blue', 'yellow', 'cyan' or 'magenta'. Or, a sRGBA 32-bit hex code in RRGGBBAA format, e.g. 'ff00ff80' (magenta at half-occupancy)."/> + </when> + <when value="no"/> + </conditional> + <param name="sequencenames" argument="--printSequenceNames" type="boolean" label="Print Sequence names" truevalue="--printSequenceNames" falsevalue="" help="Print list of all individual suequeces names on the map, in order of appearance."/> + </inputs> + <outputs> + <collection name="pretext_snap_out" type="list" label="${tool.name} on ${on_string}"> + <discover_datasets directory="output" pattern="__name_and_ext__" /> + </collection> + </outputs> + <tests> + <test expect_num_outputs="1"> + <param name="input" value="map.pretext"/> + <conditional name="formats"> + <param name="outformat" value="jpeg"/> + <param name="jpegquality" value="80"/> + </conditional> + <param name="resolution" value="900"/> + <param name="colormap" value="1"/> + <param name="sequences" value="=full, =all"/> + <param name="mintexels" value="30"/> + <conditional name="grid"> + <param name="showGrid" value="yes"/> + <param name="gridsize" value="2"/> + <param name="gridcolor" value="red"/> + </conditional> + <param name="sequencenames" value="--printSequenceNames"/> + <output_collection name="pretext_snap_out" count="4"> + <element name="pretext_snapshotFullMap" ftype="jpg" file="fullmap1.jpg"/> + <element name="pretext_snapshotref_0" ftype="jpg" file="snapshot1.jpg"/> + <element name="pretext_snapshotref_1" ftype="jpg" file="snapshot2.jpg"/> + <element name="pretext_snapshotref_2" ftype="jpg" file="snapshot3.jpg"/> + </output_collection> + </test> + <test expect_num_outputs="1"> + <param name="input" value="map.pretext"/> + <conditional name="formats"> + <param name="outformat" value="bmp"/> + </conditional> + <param name="resolution" value="700"/> + <param name="colormap" value="5"/> + <param name="sequences" value="=full"/> + <param name="mintexels" value="60"/> + <output_collection name="pretext_snap_out" count="1"> + <element name="pretext_snapshotFullMap" ftype="bmp" file="fullmap2.bmp"/> + </output_collection> + </test> + </tests> + <help><![CDATA[ + **Color map:** + + +---------------------------------------+-------------------------------+-------------------------------+ + |0. Inferno |11. Blue 4 |22. Orange 2 | + +---------------------------------------+-------------------------------+-------------------------------+ + |1. Black Body |12. Blue-Orange Divergent |23. Orange-Green-Blue-Gray | + +---------------------------------------+-------------------------------+-------------------------------+ + |2. Kindlmann |13. Brown 1 |24. Purple 1 | + +---------------------------------------+-------------------------------+-------------------------------+ + |3. Extended Kindlmann |14. Brown 2 |25. Purple 2 | + +---------------------------------------+-------------------------------+-------------------------------+ + |4. Three Wave Yellow-Grey-Blue |15. Brown 3 |26. Red 1 | + +---------------------------------------+-------------------------------+-------------------------------+ + |5. Three Wave Blue-Green-Yellow |16. Green 1 |27. Red 2 | + +---------------------------------------+-------------------------------+-------------------------------+ + |6. Four Wave Grey-Red-Green |17. Green 2 |28. Red 3 | + +---------------------------------------+-------------------------------+-------------------------------+ + |7. Five Wave Yellow-Brown-Blue |18. Green 3 |29. Yellow 1 | + +---------------------------------------+-------------------------------+-------------------------------+ + |8. Blue 1 |19. Green 4 |30. Yellow 2 | + +---------------------------------------+-------------------------------+-------------------------------+ + |9. Blue 2 |20. Mellow Rainbow | | + +---------------------------------------+-------------------------------+-------------------------------+ + |10. Blue 3 |21. Orange 1 | | + +---------------------------------------+-------------------------------+-------------------------------+ + + + **Sequence strings:** + + * --sequences "=full" + + * Creates a single image of the full contact map. + + * --sequences "=full, =all" + + * Creates an image of the full contact map, plus an image of each sequence. + + * --sequences "seq_0" + + * Creates a single image of the sequence named "seq_0" + + * --sequences "seq_0, seq_1 > seq_2" + + * Creates an image of seq_0, and an image from the start of seq_1 to the end of seq_2 + + * --sequences "seq_0[1000000] > seq_3" + + * Creates an image starting 1Mbp into seq_0, ending at the end of seq_3 + + * --sequences "{seq_0, seq_1}" + + * Create an single image of the off-diagonal region between seq_0 and seq_1, + * i.e. the inter-sequence map of seq_0 and seq_1. + + * --sequences "{seq_2[2000000] > seq_4[1000000] , seq_0[3000000] > seq_1[4000000]} , seq_0 > seq_10" + + * Creates two images. The first is the off-diagonal region between 2Mbp into seq_2 and 1Mbp into seq_4 along the x-dimension, and 3Mbp into seq_0 and 4Mbp into seq_1 along the y-dimension. + * The second image is the diagonal region between the start of seq_0 and the end of seq_10. + + ]]></help> + <citations> + <citation type="bibtex"> + @misc{Harry_et_al, + Author={Harry, E}, + title={Paired REad TEXTure Snapshot: Command line image generator for Pretext contact maps.}, + url = {https://github.com/wtsi-hpag/PretextSnapshot},} + </citation> + </citations> +</tool> \ No newline at end of file