view tools/attributes/SbmlSetGprsFromFile/SbmlSetGprsFromFile.xml @ 1:9b162ee6ff8e draft

planemo upload for repository https://forgemia.inra.fr/metexplore/met4j-galaxy commit 12798951d21c3b2b13514b38148b2848cb422c95
author metexplore
date Mon, 27 Jun 2022 13:41:08 +0000
parents dcd16521b969
children e69a78624877
line wrap: on
line source

<?xml version="1.0" encoding="UTF-8"?>
<tool id="met4j_SbmlSetGprsFromFile" name="SbmlSetGprsFromFile" version="0.12.0">
  <description>Create a new SBML file from an original sbml file and a tabulated file containing reaction ids and Gene association written in a cobra way</description>
  <xrefs>
    <xref type="bio.tools">met4j</xref>
  </xrefs>
  <requirements>
    <container type="singularity">oras://registry.forgemia.inra.fr/metexplore/met4j/met4j-singularity:0.12.0</container>
  </requirements>
  <command detect_errors="exit_code"><![CDATA[sh /usr/bin/met4j.sh attributes.SbmlSetGprsFromFile#if str($colgpr) != 'nan':
 -cgpr "$colgpr"
#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="-cgpr" label="[2] number of the column where are the gprs" name="colgpr" optional="true" type="integer" value="2"/>
    <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="gpr.tsv"/>
      <output ftype="sbml" name="out">
        <assert_contents>
          <is_valid_xml/>
          <has_line_matching expression=".*fbc:id=.G1.*" n="1"/>
          <has_line_matching expression=".*fbc:id=.G2.*" n="1"/>
          <has_line_matching expression=".*fbc:id=.G3.*" n="1"/>
          <has_line_matching expression=".*fbc:id=.G4.*" n="1"/>
          <has_line_matching expression=".*fbc:geneProductRef fbc:geneProduct=.G1.*" n="1"/>
          <has_line_matching expression=".*fbc:geneProductRef fbc:geneProduct=.G2.*" n="1"/>
          <has_line_matching expression=".*fbc:geneProductRef fbc:geneProduct=.G3.*" n="1"/>
          <has_line_matching expression=".*fbc:geneProductRef fbc:geneProduct=.G4.*" n="1"/>
          <has_line_matching expression=".*fbc:and.*" n="2"/>
        </assert_contents>
      </output>
    </test>
  </tests>
  <help><![CDATA[Create a new SBML file from an original sbml file and a tabulated file containing reaction ids and Gene association written in a cobra way
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.
GPR must be written in a cobra way in the tabulated file as described in Schellenberger et al 2011 Nature Protocols 6(9):1290-307
(The GPR will be written in the SBML file in two locations:
- in the reaction notes <p>GENE_ASSOCIATION: ( XC_0401 ) OR ( XC_3282 )</p>
- as fbc gene product association :<fbc:geneProductAssociation>
 <fbc:or>
  <fbc:geneProductRef fbc:geneProduct="XC_3282"/>
  <fbc:geneProductRef fbc:geneProduct="XC_0401"/>
 </fbc:or>
</fbc:geneProductAssociation>
]]></help>
  <citations/>
</tool>