view phyloseq_plot_bar.xml @ 2:0aacbbcd86eb draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit d905841a8c8eff6a2006492ef52b31f969e8206a
author iuc
date Tue, 07 Jan 2025 17:58:06 +0000
parents ad81e112f4d9
children d0fa6a43c838
line wrap: on
line source

<tool id="phyloseq_plot_bar" name="Phyloseq: Bar Chart" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
  <description>Generate bar charts from a phyloseq object</description>
  <macros>
    <import>macros.xml</import>
  </macros>
  <expand macro="bio_tools"/>
  <expand macro="requirements"/>
  <command detect_errors="exit_code"><![CDATA[
Rscript '${__tool_directory__}/phyloseq_plot_bar.R'
--input '$input'
--x '$x'
--fill '$fill'
--facet '${facet}'
--output '$output'
  ]]></command>
  <inputs>
    <expand macro="phyloseq_input"/>
    <param name="x" type="text" label="X-axis variable" help="Variable for the x-axis (e.g., Sample, Phylum)" />
    <param name="fill" type="text" label="Fill variable" help="Variable to color the bars (e.g., Genus, Order)" />
    <param name="facet" type="text" optional="true" label="Facet by variable" help="Optional: Variable to facet the chart by (e.g., SampleType)" />
  </inputs>
  <outputs>
    <data name="output" format="pdf" label="Bar Chart (PDF)" />
  </outputs>
   <tests>
    <!-- Test 1: Default parameters -->
    <test>
        <param name="input" value="output.phyloseq" ftype="phyloseq"/>
        <param name="x" value="Property"/>
        <param name="fill" value="Number"/>
        <param name="facet" value="Property"/>
        <output name="output" ftype="pdf">
            <assert_contents>
                <has_text text="%PDF"/>
                <has_text text="%%EOF"/>
            </assert_contents>
        </output>
    </test>
    <!-- Test 2: Valid parameters without facet -->
    <test>
        <param name="input" value="output.phyloseq" ftype="phyloseq"/>
        <param name="x" value="Property"/>
        <param name="fill" value="Number"/>
        <param name="facet" value=""/>
        <output name="output" ftype="pdf">
            <assert_contents>
                <has_text text="%PDF"/>
                <has_text text="%%EOF"/>
            </assert_contents>
        </output>
    </test>
</tests>

  <help>
    **Description**

    This tool generates bar charts from a phyloseq object using the `plot_bar` function.

    **Inputs**

    - **Input**: A phyloseq object in RDS format.
    - **X-axis variable**: The variable to use for the x-axis (e.g., Sample, Phylum).
    - **Fill variable**: (Optional) The variable to use for the bar fill colors (e.g., Genus, Order).
    - **Facet by variable**: (Optional) A variable to facet the bar chart (e.g., SampleType).

    **Outputs**

    - A PDF file containing the bar chart.

    **Usage Notes**

    Ensure that the input file is a valid phyloseq object in RDS format.
  </help>
  <expand macro="citations"/>
</tool>