view marea_2/ras_to_bounds.xml @ 101:b9e7a3acc7de draft

Uploaded
author luca_milaz
date Sun, 21 Jul 2024 17:16:58 +0000
parents 19a6369bc4e3
children 7fda1a6e4645
line wrap: on
line source

<tool id="MaREA RAS to bounds" name="RAStoBounds" version="2.0.0">
    
    <macros>
        <import>marea_macros.xml</import>
    </macros>

	<requirements>
        <requirement type="package" version="1.24.4">numpy</requirement>
        <requirement type="package" version="2.0.3">pandas</requirement>
		<requirement type="package" version="0.29.0">cobra</requirement>
        <requirement type="package" version="5.2.2">lxml</requirement>
	</requirements>

    <command detect_errors="exit_code">
        <![CDATA[
      	python $__tool_directory__/ras_to_bounds.py
        --model_selector $cond_model.model_selector
        #if $cond_model.model_selector == 'Custom'
            --model $model
            --model_name $model.element_identifier
        #end if
        --medium_selector $cond_medium.medium_selector
        #if $cond_medium.medium_selector == 'Custom'
            --medium $medium
            --medium_name $medium.element_identifier
        #end if
        --ras_selector $cond_ras.ras_choice
        #if $cond_ras.ras_choice == 'yes'
        	--input_ras $input_ras
        #end if
        --out_log $log
        ]]>
    </command>
    <inputs>
        <conditional name="cond_model">
            <expand macro="options_ras_to_bounds_model"/>
            <when value="Custom">
                <param name="model" argument="--model" type="data" format="json, xml" label="Custom model" />
            </when>
        </conditional> 

        <conditional name="cond_ras">
			<param name="ras_choice" argument="--ras_choice" type="select" label="Do want to use RAS?">
                	<option value="yes" selected="true">Yes</option>
                	<option value="no">No</option>
        	</param>
            <when value="yes">
                <param name="input_ras" argument="--input_ras" multiple="false" type="data" format="tabular, csv, tsv" label="RAS matrix:" />
            </when>
        </conditional>  
        
        <conditional name="cond_medium">
            <expand macro="options_ras_to_bounds_medium"/>
            <when value="Custom">
                <param name="medium" argument="--medium" type="data" format="csv" label="Custom medium" />
            </when>
        </conditional> 

        <a href="<![CDATA[$__tool_directory__/]]>local/medium/medium.csv">See mediums compositions</a>

    </inputs>

    <outputs>
        <data format="txt" name="log" label="RAStoBounds - $name - Log" />
        
        <collection name="results" type="list" label="Ras to Bounds ($output_format)">
            <discover_datasets name = "collection" pattern="__name_and_ext__" directory="result"/>
        </collection>
    </outputs>

    <help>
    <![CDATA[
What it does
-------------

This tool generates two files containing reactions and rules respectively, starting from a custom model in JSON or XML format, that can be used as inputs for the RAS and RPS generator modules.

Accepted files:
    - A model: JSON or XML file reporting reactions and rules contained in the model.   


Output:
-------------

The tool generates:
    - rules: reporting the rules for each reaction in the custom model given. Format: csv or pickle.
    - reactions: reporting the reactions in the custom model given. Format: csv or pickle.
    - a log file (.txt).
    ]]>
    </help>
    <expand macro="citations" />
</tool>