view tomo_setup.xml @ 11:ec7c3e84d611 draft

"planemo upload for repository https://github.com/rolfverberg/galaxytools commit 6d01e142af3a0daad7ab37d4ff02d0f1797057a7"
author rv43
date Fri, 08 Apr 2022 16:39:07 +0000
parents 845270a96464
children 4eba03628711
line wrap: on
line source

<tool id="tomo_setup" name="Tomo Setup" version="0.1.1" python_template_version="3.9">
    <description>Preprocess tomography images</description>
    <macros>
        <import>tomo_macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[
        cp '$inputfiles' inputfiles.txt &&
        $__tool_directory__/tomo_setup.py
        -i inputfiles.txt
        -c '$config'
        --theta_range '$thetas.theta_start $thetas.theta_end $thetas.num_thetas'
        --dark 'dark_field.png'
        --bright 'bright_field.png'
        --tomo 'tomo.png'
        --detectorbounds 'detectorbounds.png'
        --output_data 'output.npz'
        --output_config 'output_config.yaml'
        -l '$log'
#for $s in $tomo_sets# ${s.offset} ${s.num} #end for
    ]]></command>
    <configfiles>
         <configfile name="inputfiles"><![CDATA[#slurp
#for $s in $tomo_sets
#for $input in $s.inputs
#echo str($input) + '\t' + $input.element_identifier #
#end for
#end for
]]></configfile>
    </configfiles>
    <inputs>
        <expand macro="common_inputs"/>
        <section name="thetas" title="Tomography angles">
            <param name="theta_start" type="float" min="0.0" max="360.0" value="0.0" label="Lower bound"/>
            <param name="theta_end" type="float" min="0.0" max="360.0" value="0.0" label="Upper bound"/>
            <param name="num_thetas" type="integer" min="1" value="1" label="Number of angles"/>
        </section>
        <repeat name='tomo_sets' title="Tomography image sets">
            <param name="inputs" type="data_collection" label="Image file collection"/>
            <param name="offset" type="integer" min="0" value="0" label="Image index offset"/>
            <param name="num" type="integer" min="1" value="1" label="Number of images"/>
        </repeat>
    </inputs>
    <outputs>
        <expand macro="common_outputs"/>
        <data name="inputfiles" format="txt" label="Input files" from_work_dir="inputfiles.txt" hidden="true"/>
        <data name="dark_field" format="png" label="Dark field" from_work_dir="dark_field.png"/>
        <data name="bright_field" format="png" label="Bright field" from_work_dir="bright_field.png"/>
        <data name="tomo" format="png" label="First tomography image" from_work_dir="tomo.png"/>
        <data name="detectorbounds" format="png" label="Detector bounds" from_work_dir="detectorbounds.png"/>
        <data name="output_data" format="npz" label="Preprocessed tomography data" from_work_dir="output_data.npz"/>
    </outputs>
    <help><![CDATA[
        Preprocess tomography images.
    ]]></help>
    <expand macro="citations"/>
</tool>