view ipapy2_map_isotope_patterns.xml @ 0:774152f21f29 draft default tip

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ipapy2 commit 64b61ff2823b4f54868c0ab7a4c0dc49eaf2979a
author recetox
date Fri, 16 May 2025 08:01:00 +0000
parents
children
line wrap: on
line source

<tool id="ipapy2_map_isotope_patterns" name="ipaPy2 map isotope patterns" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@">
    <description>detect isotopes in clusters</description>
    <macros>
        <import>macros.xml</import>
    </macros>

    <expand macro="requirements"/>

    <command detect_errors="exit_code"><![CDATA[
        python3 '${__tool_directory__}/ipapy2_map_isotope_patterns.py'
        --input_dataset '${clustered_MS1_intensities}' '${clustered_MS1_intensities.ext}'
        --isoDiff ${isoDiff}
        --ppm ${ppm}
        --ionisation ${ionisation}
        --isotope_ratio ${isotope_ratio}
        --output_dataset '${mapped_isotope_patterns}' '${mapped_isotope_patterns.ext}'
    ]]></command>
    <inputs>
        <param label="IPA dataframe" name="clustered_MS1_intensities" type="data" format="csv,tsv,tabular,parquet" help="A csv file of clustered MS1 intensities."/>
        <expand macro="ionisation"/>
        <section name="isotope" title="isotope settings">
            <param name="isoDiff" type="float" value="1">
                <label>isotope difference</label>
                <help>Difference between isotopes of charge 1.</help>
            </param>
            <expand macro="ppm"/>
            <param name="isotope_ratio" type="float" min="0" max="100" value="1">
                <label>isotope ratio</label>
                <help>mininum intensity ratio expressed (Default value 1%). 
				Only isotopes with intensity higher than MinIsoRatio% of the main isotope are considered</help>
            </param>
        </section>
    </inputs>
    <outputs>
        <data label="${tool.name} on ${on_string}" name="mapped_isotope_patterns" format_source="clustered_MS1_intensities"/>
    </outputs>
    <tests>
        <test>
            <param name="clustered_MS1_intensities" value="clustered_MS1_intensities.csv"/>
            <output name="mapped_isotope_patterns">
                <assert_contents>
                    <has_n_columns n="8" sep=","/>
                    <has_n_lines n="50" delta="5"/>
                    <has_line line="ids,rel.ids,mzs,RTs,Int,relationship,isotope pattern,charge"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[

.. _ipapy2_map_isotope_patterns:

==================================
ipaPy2 Map Isotope Patterns Tool
==================================

**Tool Description**

This tool detects and annotates isotope patterns in clustered MS1 intensities. It is designed to process output from feature clustering tools and identify isotopic relationships within each cluster, providing key information for downstream annotation and quantification.

How it works
------------

- The tool examines clusters of MS1 features and searches for isotopic peaks based on user-defined mass difference (`isotope difference`), intensity ratio (`isotope ratio`), and mass accuracy (`ppm`).
- Only isotopes with intensity higher than the specified minimum ratio (default 1%) of the main isotope are considered.
- The ionisation mode is also taken into account for accurate isotope detection.

Inputs
------

1. **IPA dataframe**  
   A file (CSV, TSV, Parquet, or Tabular) containing clustered MS1 intensities. Each row should represent a detected feature with its associated cluster.

2. **Isotope settings**  
   - **isotope difference**: The expected mass difference between isotopes of charge 1 (default: 1).
   - **ppm**: Mass tolerance in parts per million for matching isotopic peaks.
   - **isotope ratio**: Minimum intensity ratio (in %) for considering a peak as an isotope (default: 1%).

3. **Ionisation mode**  
   Specify the ionisation mode (e.g., positive or negative) relevant for your experiment.

Outputs
-------

- **mapped_isotope_patterns**  
  A table with annotated isotope patterns for each cluster. The output includes columns such as:

  - `ids`
  - `rel.ids`
  - `mzs`
  - `RTs`
  - `Int`
  - `relationship`
  - `isotope pattern`
  - `charge`

Example
-------

Suppose you have a file `clustered_MS1_intensities.csv` with clustered MS1 features. You can use this tool to detect isotope patterns as follows:

.. code-block::

    clustered_MS1_intensities.csv

Set the isotope difference, ppm, and isotope ratio as needed, then run the tool. The output will be a table with isotope pattern annotations for each cluster.

Notes
-----

- Ensure your input file is correctly formatted and contains the required columns.
- The tool supports multiple file formats (CSV, TSV, Parquet, Tabular) for flexibility.
- Adjust the isotope detection parameters to match your experimental setup for optimal results.

References
----------

- For more details on isotope pattern detection and the ipaPy2 workflow, refer to the ipaPy2 documentation or associated publications.

    ]]></help>
    <expand macro="citations"/>
</tool>