Commit 86e664f6 authored by AITE Meziane's avatar AITE Meziane

doc update

parent c75ae6b7
*.pyc
docs/_build/*
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: f1cc9de1bc336221d43377323b2d7bbc
tags: 645f666f9bcd5a90fca523b33c5a78b7
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Overview: module code &mdash; padmet-utils documentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<script src="../_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="../index.html" class="icon icon-home"> padmet-utils
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../api_docs/wiki.main.html">Wiki</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">padmet-utils</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html">Docs</a> &raquo;</li>
<li>Overview: module code</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>All modules for which code is available</h1>
<ul><li><a href="scripts/connection/aspGenerator.html">scripts.connection.aspGenerator</a></li>
<li><a href="scripts/connection/enhanced_meneco_output.html">scripts.connection.enhanced_meneco_output</a></li>
<li><a href="scripts/connection/enhanced_sgs_output.html">scripts.connection.enhanced_sgs_output</a></li>
<li><a href="scripts/connection/extract_rxn_with_gene_assoc.html">scripts.connection.extract_rxn_with_gene_assoc</a></li>
<li><a href="scripts/connection/gbk_to_faa.html">scripts.connection.gbk_to_faa</a></li>
<li><a href="scripts/connection/gene_to_targets.html">scripts.connection.gene_to_targets</a></li>
<li><a href="scripts/connection/padmet_to_asp.html">scripts.connection.padmet_to_asp</a></li>
<li><a href="scripts/connection/padmet_to_matrix.html">scripts.connection.padmet_to_matrix</a></li>
<li><a href="scripts/connection/padmet_to_padmet.html">scripts.connection.padmet_to_padmet</a></li>
<li><a href="scripts/connection/padmet_to_tsv.html">scripts.connection.padmet_to_tsv</a></li>
<li><a href="scripts/connection/pgdb_to_padmet.html">scripts.connection.pgdb_to_padmet</a></li>
<li><a href="scripts/connection/post_pantograph_gbr.html">scripts.connection.post_pantograph_gbr</a></li>
<li><a href="scripts/connection/pre_pantograph.html">scripts.connection.pre_pantograph</a></li>
<li><a href="scripts/connection/sbmlGenerator.html">scripts.connection.sbmlGenerator</a></li>
<li><a href="scripts/connection/sbml_to_gene_assoc.html">scripts.connection.sbml_to_gene_assoc</a></li>
<li><a href="scripts/connection/sbml_to_padmet.html">scripts.connection.sbml_to_padmet</a></li>
<li><a href="scripts/connection/wikiGenerator.html">scripts.connection.wikiGenerator</a></li>
<li><a href="scripts/connection/wikiGenerator_multi.html">scripts.connection.wikiGenerator_multi</a></li>
<li><a href="scripts/exploration/compare_padmet.html">scripts.exploration.compare_padmet</a></li>
<li><a href="scripts/exploration/compare_sbml_padmet.html">scripts.exploration.compare_sbml_padmet</a></li>
<li><a href="scripts/exploration/convert_sbml_db.html">scripts.exploration.convert_sbml_db</a></li>
<li><a href="scripts/exploration/get_pwy_from_rxn.html">scripts.exploration.get_pwy_from_rxn</a></li>
<li><a href="scripts/exploration/padmet_stats.html">scripts.exploration.padmet_stats</a></li>
<li><a href="scripts/exploration/report_network.html">scripts.exploration.report_network</a></li>
<li><a href="scripts/exploration/visu_path.html">scripts.exploration.visu_path</a></li>
<li><a href="scripts/exploration/visu_path_new.html">scripts.exploration.visu_path_new</a></li>
<li><a href="scripts/exploration/visu_path_update.html">scripts.exploration.visu_path_update</a></li>
<li><a href="scripts/management/manual_curation.html">scripts.management.manual_curation</a></li>
<li><a href="scripts/management/padmet_compart.html">scripts.management.padmet_compart</a></li>
<li><a href="scripts/management/padmet_medium.html">scripts.management.padmet_medium</a></li>
</ul>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2019, Meziane AITE
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>scripts.connection.extract_rxn_with_gene_assoc &mdash; padmet-utils documentation</title>
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<script src="../../../_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="../../../index.html" class="icon icon-home"> padmet-utils
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../api_docs/wiki.main.html">Wiki</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../index.html">padmet-utils</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../index.html">Docs</a> &raquo;</li>
<li><a href="../../index.html">Module code</a> &raquo;</li>
<li>scripts.connection.extract_rxn_with_gene_assoc</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for scripts.connection.extract_rxn_with_gene_assoc</h1><div class="highlight"><pre>
<span></span><span class="c1"># -*- coding: utf-8 -*-</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd">This file is part of padmet-utils.</span>
<span class="sd">padmet-utils is free software: you can redistribute it and/or modify</span>
<span class="sd">it under the terms of the GNU General Public License as published by</span>
<span class="sd">the Free Software Foundation, either version 3 of the License, or</span>
<span class="sd">(at your option) any later version.</span>
<span class="sd">padmet-utils is distributed in the hope that it will be useful,</span>
<span class="sd">but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<span class="sd">MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
<span class="sd">GNU General Public License for more details.</span>
<span class="sd">You should have received a copy of the GNU General Public License</span>
<span class="sd">along with padmet-utils. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<span class="sd">@author: Meziane AITE, meziane.aite@inria.fr</span>
<span class="sd">Description:</span>
<span class="sd">From a given sbml file, create a sbml with only the reactions associated to a gene.</span>
<span class="sd">Need for a reaction, in section &#39;note&#39;, &#39;GENE_ASSOCIATION&#39;: ....</span>
<span class="sd">usage:</span>
<span class="sd"> extract_rxn_with_gene_assoc.py --sbml=FILE --output=FILE [-v]</span>
<span class="sd">options:</span>
<span class="sd"> -h --help Show help.</span>
<span class="sd"> --sbml=FILE pathname to the sbml file</span>
<span class="sd"> --output=FILE pathname to the sbml output (with only rxn with genes assoc)</span>
<span class="sd"> -v print info</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">libsbml</span>
<span class="kn">from</span> <span class="nn">padmet.utils.sbmlPlugin</span> <span class="k">import</span> <span class="n">parseNotes</span>
<span class="kn">import</span> <span class="nn">docopt</span>
<div class="viewcode-block" id="main"><a class="viewcode-back" href="../../../api_docs/script.connection.html#scripts.connection.extract_rxn_with_gene_assoc.main">[docs]</a><span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
<span class="n">args</span> <span class="o">=</span> <span class="n">docopt</span><span class="o">.</span><span class="n">docopt</span><span class="p">(</span><span class="vm">__doc__</span><span class="p">)</span>
<span class="n">sbml_file</span> <span class="o">=</span> <span class="n">args</span><span class="p">[</span><span class="s2">&quot;--sbml&quot;</span><span class="p">]</span>
<span class="n">output</span> <span class="o">=</span> <span class="n">args</span><span class="p">[</span><span class="s2">&quot;--output&quot;</span><span class="p">]</span>
<span class="n">reader</span> <span class="o">=</span> <span class="n">libsbml</span><span class="o">.</span><span class="n">SBMLReader</span><span class="p">()</span>
<span class="n">document</span> <span class="o">=</span> <span class="n">reader</span><span class="o">.</span><span class="n">readSBML</span><span class="p">(</span><span class="n">sbml_file</span><span class="p">)</span>
<span class="n">model</span> <span class="o">=</span> <span class="n">document</span><span class="o">.</span><span class="n">getModel</span><span class="p">()</span>
<span class="n">listOfReactions</span> <span class="o">=</span> <span class="n">model</span><span class="o">.</span><span class="n">getListOfReactions</span><span class="p">()</span>
<span class="n">reactions_to_remove</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">reaction</span> <span class="ow">in</span> <span class="n">listOfReactions</span><span class="p">:</span>
<span class="k">if</span> <span class="s2">&quot;GENE_ASSOCIATION&quot;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="nb">list</span><span class="p">(</span><span class="n">parseNotes</span><span class="p">(</span><span class="n">reaction</span><span class="p">)</span><span class="o">.</span><span class="n">keys</span><span class="p">()):</span>
<span class="n">reactions_to_remove</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">reaction</span><span class="o">.</span><span class="n">getId</span><span class="p">())</span>
<span class="k">for</span> <span class="n">rId</span> <span class="ow">in</span> <span class="n">reactions_to_remove</span><span class="p">:</span>
<span class="n">listOfReactions</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="n">rId</span><span class="p">)</span>
<span class="n">libsbml</span><span class="o">.</span><span class="n">writeSBMLToFile</span><span class="p">(</span><span class="n">document</span><span class="p">,</span> <span class="n">output</span><span class="p">)</span></div>
<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span>
<span class="n">main</span><span class="p">()</span>
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2019, Meziane AITE
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
<script type="text/javascript" src="../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../_static/doctools.js"></script>
<script type="text/javascript" src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>scripts.connection.padmet_to_asp &mdash; padmet-utils documentation</title>
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<script src="../../../_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="../../../index.html" class="icon icon-home"> padmet-utils
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../api_docs/wiki.main.html">Wiki</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../index.html">padmet-utils</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../index.html">Docs</a> &raquo;</li>
<li><a href="../../index.html">Module code</a> &raquo;</li>
<li>scripts.connection.padmet_to_asp</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for scripts.connection.padmet_to_asp</h1><div class="highlight"><pre>
<span></span><span class="c1"># -*- coding: utf-8 -*-</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd">This file is part of padmet-utils.</span>
<span class="sd">padmet-utils is free software: you can redistribute it and/or modify</span>
<span class="sd">it under the terms of the GNU General Public License as published by</span>
<span class="sd">the Free Software Foundation, either version 3 of the License, or</span>
<span class="sd">(at your option) any later version.</span>