view build/tools/Sbml2Graph/Sbml2Graph.xml @ 9:0976a6257300 draft

planemo upload for repository https://forgemia.inra.fr/metexplore/met4j-galaxy commit 05db35f63cadb9d56dafff594a3507c59cd85273
author metexplore
date Fri, 31 Jan 2025 18:28:53 +0000
parents 1274e2a62479
children 6a112eaf8f38
line wrap: on
line source

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<tool id="met4j_Sbml2Graph" name="Sbml2Graph" version="develop">
  <description>Create a graph representation of a SBML file content, and export it in graph file format.</description>
  <xrefs>
    <xref type="bio.tools">met4j</xref>
  </xrefs>
  <requirements>
    <container type="singularity">oras://registry.forgemia.inra.fr/metexplore/met4j/met4j-singularity:develop</container>
  </requirements>
  <command detect_errors="exit_code"><![CDATA[sh /usr/bin/met4j.sh convert.Sbml2Graph -i "$inputPath"
 $bipartite
 $compound
 $reaction
#if str($format):
 -f "$format"
#end if
 -o "$output"
]]></command>
  <inputs>
    <param argument="-i" format="sbml" label="input SBML file" name="inputPath" optional="false" type="data" value=""/>
    <param argument="-b" checked="false" falsevalue="" label="create bipartite graph" name="bipartite" truevalue="-b" type="boolean" value="false"/>
    <param argument="-c" checked="true" falsevalue="" label="create compound graph" name="compound" truevalue="-c" type="boolean" value="true"/>
    <param argument="-r" checked="false" falsevalue="" label="create reaction graph" name="reaction" truevalue="-r" type="boolean" value="false"/>
    <param argument="-f" label="Format of the exported graphTabulated edge list by default (source id &#9; edge type &#9; target id). Other options include GML, JsonGraph, and tabulated node list (label &#9; node id &#9; node type)." name="format" optional="true" type="select" value="tab">
      <option value="gml">gml</option>
      <option selected="true" value="tab">tab</option>
      <option value="nodeList">nodeList</option>
      <option value="json">json</option>
      <option value="matrix">matrix</option>
    </param>
  </inputs>
  <outputs>
    <data format="txt" name="output"/>
  </outputs>
  <tests>
    <test>
                        
      
      
      <param name="inputPath" value="toy_model.xml"/>
                        
      
      
      <param name="format" value="gml"/>
                        
      
      
      <output name="output">
                                
        
        
        <assert_contents>
                                        
          
          
          <has_line_matching expression=".*node.*" n="8"/>
                                        
          
          
          <has_line_matching expression=".*edge.*" n="9"/>
                                      
        
        
        </assert_contents>
                              
      
      
      </output>
                      
    
    
    </test>
    <test>
                        
      
      
      <param name="inputPath" value="toy_model.xml"/>
                        
      
      
      <param name="bipartite" value="true"/>
                        
      
      
      <param name="compound" value="false"/>
                        
      
      
      <param name="format" value="gml"/>
                        
      
      
      <output name="output">
                                
        
        
        <assert_contents>
                                        
          
          
          <has_line_matching expression=".*node.*" n="15"/>
                                        
          
          
          <has_line_matching expression=".*edge.*" n="17"/>
                                      
        
        
        </assert_contents>
                              
      
      
      </output>
                      
    
    
    </test>
    <test>
                        
      
      
      <param name="inputPath" value="toy_model.xml"/>
                        
      
      
      <param name="reaction" value="true"/>
                        
      
      
      <param name="compound" value="false"/>
                        
      
      
      <param name="format" value="gml"/>
                        
      
      
      <output name="output">
                                
        
        
        <assert_contents>
                                                                     
          
          
          
          <has_line_matching expression=".*node.*" n="7"/>
                                        
          
          
          <has_line_matching expression=".*edge.*" n="8"/>
                                    
        
        
        
        </assert_contents>
                                  
      
      
      
      </output>
                   
    
    
    </test>
  </tests>
  <help><![CDATA[Create a graph representation of a SBML file content, and export it in graph file format.
The graph can be either a compound graph, a reaction graph or a bipartite graph, and can be exported in gml or tabulated file format.]]></help>
  <citations>
    <citation type="doi">10.1109/tcbb.2008.79</citation>
  </citations>
</tool>