view build/tools/SbmlSetPathwaysFromFile/SbmlSetPathwaysFromFile.xml @ 7:1436e9cde9c9 draft

planemo upload for repository https://forgemia.inra.fr/metexplore/met4j-galaxy commit 1d31a48bf8328b7a3ad9910971d24b9f453459c5
author metexplore
date Tue, 04 Jul 2023 10:21:26 +0000
parents 7a6f2380fc1d
children 1274e2a62479
line wrap: on
line source

<?xml version="1.0" encoding="UTF-8"?>
<tool id="met4j_SbmlSetPathwaysFromFile" name="SbmlSetPathwaysFromFile" version="1.4.0">
  <description>Set pathway to reactions in a network from a tabulated file containing the reaction ids and the pathways</description>
  <xrefs>
    <xref type="bio.tools">met4j</xref>
  </xrefs>
  <requirements>
    <container type="singularity">oras://registry.forgemia.inra.fr/metexplore/met4j/met4j-singularity:1.4.0</container>
  </requirements>
  <command detect_errors="exit_code"><![CDATA[sh /usr/bin/met4j.sh attributes.SbmlSetPathwaysFromFile#if str($colp) != 'nan':
 -cp "$colp"
#end if
#if str($sep):
 -sep "$sep"
#end if
#if str($colid) != 'nan':
 -ci "$colid"
#end if
 $p
#if str($nSkip):
 -n "$nSkip"
#end if
 -sbml "$sbml"
#if str($tab) != 'None':
 -tab "$tab"
#end if
#if str($c):
 -c "$c"
#end if
 -out "$out"
]]></command>
  <inputs>
    <param argument="-cp" label="[2] number of the column where are the pathways" name="colp" optional="true" type="integer" value="2"/>
    <param argument="-sep" label="[|] Separator of pathways in the tabulated file" name="sep" optional="true" type="text" value="|">
      <sanitizer invalid_char="_">
        <valid initial="string.printable"/>
      </sanitizer>
    </param>
    <param argument="-ci" label="[1] number of the column where are the reaction ids" name="colid" optional="true" type="integer" value="1"/>
    <param argument="-p" checked="false" falsevalue="" label="[deactivated] To match the objects in the sbml file, adds the prefix R_ to reactions" name="p" truevalue="-p" type="boolean" value="false"/>
    <param argument="-n" label="[0] Number of lines to skip at the beginning of the tabulated file" name="nSkip" optional="true" type="text" value="0">
      <sanitizer invalid_char="_">
        <valid initial="string.printable"/>
      </sanitizer>
    </param>
    <param argument="-sbml" format="sbml" label="Original sbml file" name="sbml" optional="false" type="data" value=""/>
    <param argument="-tab" format="tsv" label="Tabulated file" name="tab" optional="true" type="data" value=""/>
    <param argument="-c" label="[#] Comment String in the tabulated file. The lines beginning by this string won't be read" name="c" optional="true" type="text" value="#">
      <sanitizer invalid_char="_">
        <valid initial="string.printable"/>
      </sanitizer>
    </param>
  </inputs>
  <outputs>
    <data format="sbml" name="out"/>
  </outputs>
  <tests>
    <test>
      <param name="sbml" value="toy_model.xml"/>
      <param name="tab" value="pathways.tsv"/>
      <output ftype="sbml" name="out">
      <assert_contents>
        <is_valid_xml/>
        <has_line_matching expression=".*groups:id=.*" n="3"/>
        <has_line_matching expression=".*groups:id=.p1.*" n="1"/>
        <has_line_matching expression=".*groups:id=.p2.*" n="1"/>
        <has_line_matching expression=".*groups:id=.p3.*" n="1"/>
      </assert_contents>
    </output>
    </test>
    <test>
      <param name="sbml" value="toy_model.xml"/>
      <param name="tab" value="pathwaysOtherSep.tsv"/>
      <param name="sep" value=" + "/>
      <output ftype="sbml" name="out">
      <assert_contents>
        <is_valid_xml/>
        <has_line_matching expression=".*groups:id=.*" n="3"/>
        <has_line_matching expression=".*groups:id=.p1.*" n="1"/>
        <has_line_matching expression=".*groups:id=.p2.*" n="1"/>
        <has_line_matching expression=".*groups:id=.p3.*" n="1"/>
      </assert_contents>
    </output>
    </test>
  </tests>
  <help><![CDATA[Set pathway to reactions in a network from a tabulated file containing the reaction ids and the pathways
The ids must correspond between the tabulated file and the SBML file.
If prefix R_ is present in the ids in the SBML file and not in the tabulated file, use the -p option.
Pathways will be written in the SBML file in two ways:- as reaction note (e.g. <p>SUBSYSTEM: purine_biosynthesis</p>)- as SBML group:
<groups:group groups:id="purine_biosynthesis" groups:kind="classification" groups:name="purine_biosynthesis">
 <groups:listOfMembers>
  <groups:member groups:idRef="R_GLUPRT"/>
  <groups:member groups:idRef="R_RNDR1b"/>
...
]]></help>
  <citations/>
</tool>