Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:
env:
GALAXY_FORK: galaxyproject
GALAXY_BRANCH: release_25.0
GALAXY_BRANCH: release_26.0
MAX_CHUNKS: 40
jobs:
setup:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- '*'
env:
GALAXY_FORK: galaxyproject
GALAXY_BRANCH: release_25.0
GALAXY_BRANCH: release_26.0
MAX_CHUNKS: 4
MAX_FILE_SIZE: 1M
concurrency:
Expand Down
15 changes: 15 additions & 0 deletions tools/parse_image_metadata/.shed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
categories:
- Imaging

description: Parse image metadata as parameter values (width, height, number of channels, etc.)

long_description: |
This tool can be used in workflows to parse parameter values from image metadata.

name: parse_image_metadata

owner: imgteam
homepage_url: https://github.com/bmcv
remote_repository_url: https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/parse_image_metadata/

type: unrestricted
1 change: 1 addition & 0 deletions tools/parse_image_metadata/creators.xml
128 changes: 128 additions & 0 deletions tools/parse_image_metadata/parse_image_metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<tool name="Parse value from image metadata" id="param_image_metadata" version="0.1.0" tool_type="expression" profile="19.05">
<description/>
<macros>
<import>creators.xml</import>
</macros>
<creator>
<expand macro="creators/bmcv"/>
<expand macro="creators/kostrykin"/>
</creator>
<macros/>
<edam_operations>
<edam_operation>operation_3443</edam_operation>
</edam_operations>
<expression type="ecma5.1">
{
return {
'width': parseInt($job.input1.metadata.width),
'height': parseInt($job.input1.metadata.height),
'channels': parseInt($job.input1.metadata.channels),
'depth': parseInt($job.input1.metadata.depth),
'frames': parseInt($job.input1.metadata.frames)
};
}
</expression>
<inputs>
<param type="data" format="tiff,png" label="Input file containing parameter to parse out of" load_contents="0" name="input1"/>
</inputs>
<outputs>
<output type="integer" name="width" from="width"/>
<output type="integer" name="height" from="height"/>
<output type="integer" name="channels" from="channels"/>
<output type="integer" name="depth" from="depth"/>
<output type="integer" name="frames" from="frames"/>
</outputs>
<tests>
<test expect_num_outputs="5">
<param name="input1" value="input_yxc.png"/>
<output name="width">
<assert_contents>
<has_line line="265"/>
</assert_contents>
</output>
<output name="height">
<assert_contents>
<has_line line="530"/>
</assert_contents>
</output>
<output name="channels">
<assert_contents>
<has_line line="4"/>
</assert_contents>
</output>
<output name="depth">
<assert_contents>
<has_line line="0"/>
</assert_contents>
</output>
<output name="frames">
<assert_contents>
<has_line line="1"/>
</assert_contents>
</output>
</test>
<test expect_num_outputs="5">
<param name="input1" value="input_yxz.tiff"/>
<output name="width">
<assert_contents>
<has_line line="265"/>
</assert_contents>
</output>
<output name="height">
<assert_contents>
<has_line line="530"/>
</assert_contents>
</output>
<output name="channels">
<assert_contents>
<has_line line="0"/>
</assert_contents>
</output>
<output name="depth">
<assert_contents>
<has_line line="4"/>
</assert_contents>
</output>
<output name="frames">
<assert_contents>
<has_line line="0"/>
</assert_contents>
</output>
</test>
<test expect_num_outputs="5">
<param name="input1" value="input_yxt.tiff"/>
<output name="width">
<assert_contents>
<has_line line="265"/>
</assert_contents>
</output>
<output name="height">
<assert_contents>
<has_line line="530"/>
</assert_contents>
</output>
<output name="channels">
<assert_contents>
<has_line line="0"/>
</assert_contents>
</output>
<output name="depth">
<assert_contents>
<has_line line="0"/>
</assert_contents>
</output>
<output name="frames">
<assert_contents>
<has_line line="4"/>
</assert_contents>
</output>
</test>
</tests>
<help><![CDATA[

**Parse image metadata as parameter values.**

This tool can be used in workflows to parse parameter values from image metadata (e.g., width, height, etc.).

]]></help>
</tool>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading