view baredsc_combine_2d.xml @ 0:239193b96d72 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/baredsc commit dad42d788f7407976a67ed50cc886ebe79740e32
author iuc
date Mon, 02 Oct 2023 13:25:42 +0000
parents
children ae969fdb8442
line wrap: on
line source

<tool id="baredsc_combine_2d" name="Combine multiple 2D Models" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01" license="MIT">
    <description>from baredSC</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="edam_topics"/>
    <edam_operations>
        <edam_operation>operation_2495</edam_operation>
        <edam_operation>operation_3463</edam_operation>
    </edam_operations>
    <xrefs>
        <xref type="bio.tools">baredsc</xref>
    </xrefs>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
    ## Create symlinks
    #for $i, $output in enumerate($MCMC.outputs):
        ln -s '$output' '${i}.npz' &&
    #end for
    
    combineMultipleModels_2d
    ## Required inputs:
    @REQUIRED_INPUTS_2D@

    ## Filter cells
    @FILTER_CELLS@

    @COMBINE_OUTPUTS@
    ## MCMC
    @MCMC_2D@
    ## Plots
    @PLOTS@
    @PRETTYBINS_SPLITY_COLORSCALE_2D@
    ## Advanced
    @ADVANCED_COMMON_X@
    @ADVANCED_COMMON_COMPLEMENT_2D@
    ## Outputs
    --figure baredSC.$plots.image_file_format &&
    mkdir output &&
    @ORDER_OUTPUTS_2D@
    ]]></command>
    <inputs>
        <expand macro="macro_input_counts"/>
        <expand macro="macro_two_genes"/>
        <expand macro="macro_filter_cells"/>
        <section name="MCMC" title="MCMC parameters">
            <expand macro="combine_outputs" d="2" />
            <expand macro="macro_MCMC_params_common_axis" axis="x" />
            <expand macro="macro_MCMC_params_common_axis" axis="y" />
            <expand macro="macro_scale_seed"/>
        </section>
        <section name="plots" title="Customize plots">
            <expand macro="macro_plots"/>
            <expand macro="macro_prettybins_axis" axis="x"/>
            <expand macro="macro_prettybins_axis" axis="y"/>
            <expand macro="macro_colorscale"/>
            <expand macro="macro_splity"/>
        </section>
        <section name="advanced" title="Advanced parameters" expanded="false">
            <expand macro="macro_advanced_common_axis" axis="x" default_osamppdf="4"/>
            <expand macro="macro_advanced_common_axis" axis="y" default_osamppdf="4"/>
            <expand macro="macro_advanced_evidence"/>
            <expand macro="macro_scaleprior"/>
        </section>
    </inputs>
    <outputs>
        <data format="tabular" name="pdf2d" label="${tool.name} on $getVar('input_counts.input', 'input_counts.inputAnnData') for ${geneXColName} and ${geneYColName}: mean PDF in matrix format" from_work_dir="output/baredSC_pdf2d.txt"/>
        <data format="tabular" name="pdf2d_flat" label="${tool.name} on $getVar('input_counts.input', 'input_counts.inputAnnData') for ${geneXColName} and ${geneYColName}: PDF with error bar, one bin per line" from_work_dir="output/baredSC_pdf2d_flat.txt">
            <actions>
                <action name="column_names" type="metadata" default="x,y,low,mean,high,median" />
            </actions>
        </data>
        <data format="png" name="plot" label="${tool.name} on $getVar('input_counts.input', 'input_counts.inputAnnData') for ${geneXColName} and ${geneYColName}: plot" from_work_dir="baredSC">
            <change_format>
                <when input="plots.image_file_format" value="png" format="png" />
                <when input="plots.image_file_format" value="svg" format="svg" />
                <when input="plots.image_file_format" value="pdf" format="pdf" />
            </change_format>
        </data>
        <collection type="list" name="other_outputs" label="${tool.name} on $getVar('input_counts.input', 'input_counts.inputAnnData') for ${geneXColName} and ${geneYColName}: plots and txt">
            <discover_datasets pattern="baredSC_(?P&lt;identifier_0&gt;\S+)\.(?P&lt;ext&gt;.*)"/>
        </collection>
    </outputs>
    <tests>
        <!-- First test -->
        <test>
            <conditional name="input_counts">
                <param name="filetype" value="tabular"/>
                <param name="input" value="nih3t3_generated_2d_2.txt"/>
            </conditional>
            <param name="geneXColName" value="0.5_0_0_0.5_x"/>
            <param name="geneYColName" value="0.5_0_0_0.5_y"/>
            <section name="MCMC">
                <param name="outputs" value="2d_small_1gauss.npz,2d_small_2gauss.npz"/>
                <param name="nx" value="10"/>
                <param name="ny" value="12"/>
            </section>
            <section name="plots">
                <param name="prettyBinsx" value="20"/>
                <param name="prettyBinsy" value="20"/>
            </section>
            <output name="pdf2d" ftype="tabular">
                <assert_contents>
                    <has_n_lines n="21"/>
                </assert_contents>
            </output>
            <output name="pdf2d_flat" ftype="tabular">
                <assert_contents>
                    <has_text_matching expression="x\s+y\s+low\s+mean\s+high\s+median"/>
                    <has_n_lines n="401"/>
                </assert_contents>
            </output>
            <output name="plot" ftype="png">
                <assert_contents>
                    <has_size value="37414" delta="3000"/>
                </assert_contents>
            </output>
            <output_collection name="other_outputs" count="3" type="list">
                <element name="corr" ftype="txt">
                    <assert_contents>
                        <has_n_lines n="2"/>
                        <has_line_matching expression="mean\tmedian\tlow\thigh"/>
                        <has_text_matching expression="0\.9[0-9]+\s+0\.9[0-9]+\s+0\.8[0-9]+\s+0\.9[0-9]+"/>
                    </assert_contents>
                </element>
                <element name="individuals" ftype="png">
                    <assert_contents>
                        <has_size value="56721" delta="5000"/>
                    </assert_contents>
                </element>
                <element name="median" ftype="png">
                    <assert_contents>
                        <has_size value="37412" delta="4000"/>
                    </assert_contents>
                </element>
            </output_collection>
        </test>
    </tests>
    <expand macro="helpcitations"/>
</tool>