view hexrd_fit_grains.xml @ 10:a35bda7ed678 draft default tip

"planemo upload for repository https://github.com/ximg-chess/galaxytools/tree/master/tools/hexrd commit 082120888ad38a8e84b32834c698c374db6f0b0c-dirty"
author ximgchess
date Thu, 07 Jul 2022 01:53:44 +0000
parents baba452d0613
children
line wrap: on
line source

<tool id="hexrd_fit_grains" name="HEXRD fit-grains" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" python_template_version="3.5">
    <description>Extracts G vectors, grain position and strain</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[
        cp '$config_yml' $config &&
        cp '$config_yml' config.yml &&
        ## symlink input files
        @FIT_GRAIN_LINKS@
        hexrd fit-grains config.yml -f &&
        cp analysis/*.log '$log' && 
        @CONVERT2TAB@ 
        && for i in analysis/*/spots*.out; do dest=`echo \${i\#*/} | tr '/' '_'`; mv \${i} analysis/\$dest; done
    ]]></command>
    <configfiles>
        <configfile name="config_yml"><![CDATA[@FIT_GRAINS_YML@
]]></configfile>
    </configfiles>
    <inputs>
        <expand macro="fit_grains_config"/>
    </inputs>
    <outputs>
        <data name="config" format="yaml" label="${tool.name} on ${on_string}: ${active_material}_config.yml"/>
        <data name="log" format="txt" label="${tool.name} on ${on_string}:fit_grains_analysis_${active_material}.log"/>
        <data name="grains" format="tabular" label="${tool.name} on ${on_string}: grains.out" from_work_dir="analysis/grains.out" />
        <collection name="spots" type="list" label="${tool.name} on ${on_string}:spots">
            <discover_datasets pattern="(?P&lt;designation&gt;.+_spots.+\.out)" ext="tabular" directory="analysis"/>
        </collection>
    </outputs>
    <tests>
        <!-- Test-1 single_GE -->
        <test>
            <param name="analysis_name" value="ruby"/>
            <param name="inputs" ftype="hexrd.images.npz" value="single_GE/RUBY_0000-fc_GE.npz,single_GE/RUBY_0001-fc_GE.npz,single_GE/RUBY_0002-fc_GE.npz,single_GE/RUBY_0003-fc_GE.npz,single_GE/RUBY_0004-fc_GE.npz,single_GE/RUBY_0005-fc_GE.npz"/>
            <conditional name="detector">
                <param name="panel_assignment" value="infer_from_name"/>
            </conditional>
            <param name="instrument" ftype="hexrd.yml" value="single_GE/ge_detector.yml"/>
            <param name="material" ftype="hexrd.materials.h5" value="single_GE/materials.h5"/>
            <param name="active_material" value="ruby"/>
            <param name="dmin" value="0.7"/>
            <param name="tth_width" value="0.2"/>
            <param name="min_sfac_ratio" value="0.05"/>
            <param name="ome_map" ftype="hexrd.eta_ome.npz" value="single_GE/analysis_ruby_eta-ome_maps.npz"/>
            <param name="accepted_orientations" ftype="hexrd.accepted_orientations" value="single_GE/accepted_orientations_analysis_ruby.dat"/>
            <param name="grains_estimate" ftype="tabular" value="single_GE/grains_estimate.out"/>
            <param name="do_fit" value="true"/>
            <param name="npdiv" value="2"/>
            <param name="threshold" value="25"/>
            <section name="tolerance">
                <repeat name="tolerance_lists">
                    <param name="tth" value="0.25"/>
                    <param name="eta" value="3.0"/>
                    <param name="omega" value="2.0"/>
                </repeat>
                <repeat name="tolerance_lists">
                    <param name="tth" value="0.20"/>
                    <param name="eta" value="2.0"/>
                    <param name="omega" value="1.0"/>
                </repeat>
                <param name="refit" value="1,1"/>
                <param name="tth_max" value="14.25"/>
            </section>
            <output name="grains">
                <assert_contents>
                    <has_text text="6.69" />
                </assert_contents>
            </output>
        </test>
        <!-- Test-2 multiruby_dexelas -->
        <test>
            <param name="analysis_name" value="ruby"/>
            <param name="inputs" ftype="hexrd.images.npz" value="multiruby_dexelas/mruby-0129_000004_ff1_000012-cachefile.npz,multiruby_dexelas/mruby-0129_000004_ff2_000012-cachefile.npz"/>
            <conditional name="detector">
                <param name="panel_assignment" value="infer_from_name"/>
            </conditional>
            <param name="instrument" ftype="hexrd.yml" value="multiruby_dexelas/dexelas_id3a_20200130.yml"/>
            <param name="material" ftype="hexrd.materials.h5" value="multiruby_dexelas/materials.h5"/>
            <param name="active_material" value="ruby"/>
            <param name="dmin" value="0.7"/>
            <param name="tth_width" value="0.2"/>
            <param name="min_sfac_ratio" value="0.05"/>
            <param name="ome_map" ftype="hexrd.eta_ome.npz" value="multiruby_dexelas/mruby_monolithic_eta-ome_maps.npz"/>
            <param name="accepted_orientations" ftype="hexrd.accepted_orientations" value="multiruby_dexelas/accepted_orientations_analysis_ruby.dat"/>
            <param name="grains_estimate" ftype="tabular" value="multiruby_dexelas/grains_estimate.out"/>
            <param name="do_fit" value="true"/>
            <param name="npdiv" value="4"/>
            <param name="threshold" value="25"/>
            <section name="tolerance">
                <repeat name="tolerance_lists">
                    <param name="tth" value="0.25"/>
                    <param name="eta" value="3.0"/>
                    <param name="omega" value="2.0"/>
                </repeat>
                <repeat name="tolerance_lists">
                    <param name="tth" value="0.20"/>
                    <param name="eta" value="2.0"/>
                    <param name="omega" value="1.0"/>
                </repeat>
                <param name="refit" value="3,1"/>
                <param name="tth_max" value="true"/>
            </section>
            <output name="grains">
                <assert_contents>
                    <has_text text="0.98" />
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
**HEXRD fit-grains**
@HEXRD_HELP@
@FIT_GRAIN_INPUTS_HELP@
@FIT_GRAINS_OUTPUTS_HELP@
    ]]></help>
    <expand macro="citations" />
</tool>