Commit 4bd1a452 authored by AITE Meziane's avatar AITE Meziane

Updating padmet-utils for padmet 3.0

parent c2cbee27
......@@ -20,8 +20,17 @@ along with padmet. If not, see <http://www.gnu.org/licenses/>.
Description:
This module contains functions to convert a padmet file to predicats for ASP
"""
from padmetSpec import PadmetSpec
from padmet.classes import PadmetSpec
__all__ = ['asp_synt', 'padmet_to_asp']
import docopt
def main():
args = docopt.docopt(__doc__)
padmet_file = args["--padmet"]
output = args["--output"]
verbose = args["-v"]
padmet_to_asp(padmet_file, output, verbose)
def asp_synt(pred, list_args):
"""
......@@ -250,4 +259,7 @@ def padmet_to_aspDE(padmet_file, output, seeds, targets, verbose = False):
@rtype: None
"""
padmet = PadmetSpec(padmet_file)
\ No newline at end of file
padmet = PadmetSpec(padmet_file)
if __name__ == "__main__":
main()
# -*- coding: utf-8 -*-
"""
This file is part of padmet-utils.
padmet-utils is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
padmet-utils is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with padmet-utils. If not, see <http://www.gnu.org/licenses/>.
@author: Meziane AITE, meziane.aite@inria.fr
Description:
Require internet access !
Allows to extract the bigg database from the API to create a padmet.
1./ Get all reactions universal id from http://bigg.ucsd.edu/api/v2/universal/reactions
2./ Using async_list, extract all the informations for each reactions (compounds, stochio, name ...)
3./ Need to use sleep time to avoid to lose the server access.
4./ Because the direction fo the reaction is not set by default in bigg.
We get all the models where the reaction is and the final direction will the one found
in more than 75%
5./ Also extract xrefs
usage:
biggAPI_to_padmet.py
options:
-h --help Show help.
--output=FILE pathname of the padmet file to create
--pwy_file=FILE add kegg pathways from this pathways file 'pwy_id, pwy_name, x, rxn_id'.
-v print info.
"""
import json
from padmet.classes import Relation
import docopt
import requests
import grequests
from padmet.classes import PadmetSpec
from datetime import datetime
from time import time
import ast
def main():
raw_to_padmet()
def raw_data():
url_bigg = 'http://bigg.ucsd.edu/api/v2/'
raw_data = requests.get(url_bigg + "universal/reactions").json()['results']
all_reactions_ids = [rxn_dict['bigg_id'] for rxn_dict in raw_data if not rxn_dict['bigg_id'].startswith("BIOMASS")]
print("%s reactions to extract" %(len(all_reactions_ids)))
with open("/home/maite/Documents/data/bigg/bigg_raw.txt", 'w') as f:
count = 0
for rxn_id in [i for i in all_reactions_ids if not i.startswith("BIOMASS")]:
count += 1
print(rxn_id)
f.write("reaction: %s, %s/%s\n" %(rxn_id, count, len(all_reactions_ids)))
rxn_response = requests.get(url_bigg + "universal/reactions/" +rxn_id)
rxn_dict = rxn_response.json()
rxn_metabolites = rxn_dict["metabolites"]
if len(rxn_metabolites) > 1:
json.dump(rxn_dict,f)
f.write("\n")
all_models_id = [i["bigg_id"] for i in rxn_dict["models_containing_reaction"]]
async_list = []
for model_id in all_models_id:
action_item = grequests.get(url_bigg + "models/"+ model_id +"/reactions/"+ rxn_id)
async_list.append(action_item)
models_responses = [r.json() for r in grequests.map(async_list)]
all_lower_bound = [i["results"][0]["lower_bound"] for i in models_responses]
ratio_not_rev = float(all_lower_bound.count(0))/float(len(all_lower_bound))
f.write("Reaction not reversible in %s/%s model(s)\n" %(all_lower_bound.count(0), len(all_lower_bound)))
if ratio_not_rev >= 0.75:
rxn_direction = "LEFT-TO-RIGHT"
else:
rxn_direction = "REVERSIBLE"
f.write(rxn_direction+"\n")
def raw_to_padmet():
verbose = True
now = datetime.now()
today_date = now.strftime("%Y-%m-%d")
#print(verbose,today_date,version, output, classes_file, compounds_file, proteins_file, reactions_file, enzrxns_file, pathways_file)
policyInArray = [['compound','has_name','name'], ['compound','has_xref','xref'], ['compound','has_suppData','suppData'],
['gene','has_name','name'], ['gene','has_xref','xref'], ['gene','has_suppData','suppData'], ['gene','codes_for','protein'],
['pathway','has_name','name'], ['pathway','has_xref','xref'], ['pathway','is_in_pathway','pathway'],
['protein','has_name','name'], ['protein','has_xref','xref'], ['protein','has_suppData','suppData'], ['protein','catalyses','reaction'],
['reaction','has_name','name'], ['reaction','has_xref','xref'], ['reaction','has_suppData','suppData'], ['reaction','has_reconstructionData','reconstructionData'], ['reaction','is_in_pathway','pathway'],
['reaction','consumes','class','STOICHIOMETRY','X','COMPARTMENT','Y'], ['reaction','produces','class','STOICHIOMETRY','X','COMPARTMENT','Y'],
['reaction','consumes','compound','STOICHIOMETRY','X','COMPARTMENT','Y'], ['reaction','produces','compound','STOICHIOMETRY','X','COMPARTMENT','Y'],
['reaction','consumes','protein','STOICHIOMETRY','X','COMPARTMENT','Y'], ['reaction','produces','protein','STOICHIOMETRY','X','COMPARTMENT','Y'],
['reaction','is_linked_to','gene','SOURCE:ASSIGNMENT','X:Y']]
dbNotes = {"PADMET":{"Creation":today_date, "version":"2.6"}, "DB_info":{"DB":"BIGG", "version":"2.0"}}
padmet = PadmetSpec()
if verbose: print("setting policy")
padmet.setPolicy(policyInArray)
if verbose: print("setting dbInfo")
padmet.setInfo(dbNotes)
list_of_relation = []
with open("/home/maite/Documents/data/bigg/bigg_raw.txt", "r") as f:
dataInArray = [line for line in f.read().splitlines() if not line.upper().startswith("REACTION")]
# while index < len(dataInArray):
index = 0
raw_data = []
while index < len(dataInArray):
line = dataInArray[index]
try:
rxn_dict = ast.literal_eval(line)
direction = dataInArray[index+1]
rxn_dict.update({"direction":direction})
raw_data.append(rxn_dict)
index += 2
except ValueError:
index +=1
count = 0
for rxn_dict in raw_data:
count += 1
print("%s/%s" %(count, len(raw_data)))
rxn_id = rxn_dict["bigg_id"]
if rxn_id not in padmet.dicOfNode.keys():
rxn_metabolites = rxn_dict["metabolites"]
rxn_name = rxn_dict["name"]
rxn_direction = rxn_dict["direction"]
padmet.createNode("reaction",rxn_id,{"COMMON-NAME":[rxn_name],"DIRECTION":[rxn_direction]})
rxn_xrefs = rxn_dict["database_links"]
xref_id = rxn_id+"_xrefs"
xref_node = padmet.createNode("xref", xref_id)
has_xref_rlt = Relation(rxn_id, "has_xref", xref_id)
list_of_relation.append(has_xref_rlt)
for db, k in rxn_xrefs.items():
_id = k[0]["id"]
if db in xref_node.misc.keys() and _id not in xref_node.misc[db]:
xref_node.misc[db].append(_id)
else:
xref_node.misc[db] = [_id]
for metabo_dict in rxn_metabolites:
metabo_id = metabo_dict["bigg_id"]
metabo_name = metabo_dict["name"]
metabo_compart = metabo_dict["compartment_bigg_id"]
metabo_stoich = metabo_dict["stoichiometry"]
try:
padmet.dicOfNode[metabo_id]
except KeyError:
padmet.createNode("compound",metabo_id,{"COMMON-NAME":[metabo_name]})
if metabo_stoich < 0:
consumes_rlt = Relation(rxn_id,"consumes",metabo_id,{"STOICHIOMETRY":[abs(metabo_stoich)],"COMPARTMENT":[metabo_compart]})
list_of_relation.append(consumes_rlt)
else:
produces_rlt = Relation(rxn_id,"produces",metabo_id,{"STOICHIOMETRY":[abs(metabo_stoich)],"COMPARTMENT":[metabo_compart]})
list_of_relation.append(produces_rlt)
else:
if verbose: print("%s already in padmet" %rxn_id)
continue
if verbose: print("Adding all relations")
count = 0
for rlt in list_of_relation:
count += 1
if verbose: print("relation %s/%s" %(count, len(list_of_relation)))
try:
padmet.dicOfRelationIn[rlt.id_in].append(rlt)
except KeyError:
padmet.dicOfRelationIn[rlt.id_in] = [rlt]
try:
padmet.dicOfRelationOut[rlt.id_out].append(rlt)
except KeyError:
padmet.dicOfRelationOut[rlt.id_out] = [rlt]
pwy_file = "/home/maite/Documents/data/bigg/bigg_kegg_pwy.txt"
add_kegg_pwy(pwy_file, padmet, verbose)
def add_kegg_pwy(pwy_file, padmetRef, verbose = False):
global list_of_relation
with open(pwy_file, 'r') as f:
for data in [line.split("\t") for line in f.read().splitlines()][1:]:
pwy_id, name, ec, rxn_id = data
try:
pwy_node = padmetRef.dicOfNode[pwy_id]
except KeyError:
pwy_node = padmetRef.createNode("pathway", pwy_id)
if name:
try:
pwy_node.misc["COMMON_NAME"].append(name)
except KeyError:
pwy_node.misc["COMMON_NAME"] = [name]
if rxn_id:
if rxn_id in padmetRef.dicOfNode.keys():
pwy_rlt = Relation(rxn_id,"is_in_pathway",pwy_id)
padmetRef._addRelation(pwy_rlt)
else:
if verbose: print("%s in pwy %s but not in padmet" %(rxn_id, pwy_id))
padmetRef.generateFile("/home/maite/Documents/data/bigg/bigg_v2.padmet")
if __name__ == "__main__":
main()
......@@ -36,9 +36,9 @@ options:
--pwy_file=FILE add kegg pathways from this pathways file 'pwy_id, pwy_name, x, rxn_id'.
-v print info.
"""
from padmet.node import Node
from padmet.relation import Relation
from padmet.padmetRef import PadmetRef
from padmet.classes import Node
from padmet.classes import Relation
from padmet.classes import PadmetRef
from datetime import datetime
from time import time
......
# -*- coding: utf-8 -*-
"""
This file is part of padmet-utils.
padmet-utils is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
padmet-utils is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with padmet-utils. If not, see <http://www.gnu.org/licenses/>.
@author: Meziane AITE, meziane.aite@inria.fr
Description:
Convert a list of compounds to an sbml file. Often in sbml, the compartment of the
compounds is concatenate to the id. If wanted, possible to add a compart each compounds with compart_name
If verbose, will also check if each compound is in a padmetRef and or a padmetSpec
In sbml: id = id encoded, name = original id
ex: id = cpd-a, id encoded = M_cpd__45__a_'value of compart_name'
if verbose True, will print if each compound was found in padmetRef and or padmetSpec
usage:
compounds_to_sbml.py --compounds=FILE --output=FILE [--padmetRef=FILE] [--padmetSpec=FILE] [-v]
option:
-h --help Show help.
--compounds=FILE the pathname to the file containing the compounds ids and the compart, line = cpd-id\tcompart.
--output=FILE pathname to the sbml output.
--padmetRef=FILE pathname of the padmet used as reference (ex: metacyc_18.5.padmet)
--padmetSpec=FILE pathname of the padmet corresponding to the species studied
-v print info and check if ids in padmetRef and or padmet
"""
from padmet.sbmlGenerator import compounds_to_sbml
import docopt
def main():
args = docopt.docopt(__doc__)
compounds = args["--compounds"]
padmetRef = args["--padmetRef"]
padmetSpec = args["--padmetSpec"]
output = args["--output"]
verbose = args["-v"]
compounds_to_sbml(compounds, output, padmetRef, padmetSpec, verbose = verbose)
if __name__ == "__main__":
main()
\ No newline at end of file
......@@ -38,8 +38,8 @@ options:
--output=FILE pathname to tsv output file
"""
from padmet.padmetRef import PadmetRef
from padmet.sbmlPlugin import convert_from_coded_id
from padmet.classes import PadmetRef
from padmet.utils.sbmlPlugin import convert_from_coded_id
import docopt
......
......@@ -31,7 +31,7 @@ options:
--mnx=FILE pathanme to metanetx file for reactions (reac_xref.tsv)
--output=FILE pathname to tsv output file
"""
from padmet.padmetRef import PadmetRef
from padmet.classes import PadmetRef
import csv
import re
import docopt
......
......@@ -31,7 +31,7 @@ options:
from cobra.io.sbml import create_cobra_model_from_sbml_file
from cobra import *
import docopt
from padmet.sbmlPlugin import convert_from_coded_id
from padmet.utils.sbmlPlugin import convert_from_coded_id
def main():
args = docopt.docopt(__doc__)
......
......@@ -30,15 +30,15 @@ options:
-v print info
"""
from libsbml import *
from padmet.sbmlPlugin import parseNotes
import libsbml
from padmet.utils.sbmlPlugin import parseNotes
import docopt
def main():
args = docopt.docopt(__doc__)
sbml_file = args["--sbml"]
output = args["--output"]
reader = SBMLReader()
reader = libsbml.SBMLReader()
document = reader.readSBML(sbml_file)
model = document.getModel()
listOfReactions = model.getListOfReactions()
......@@ -50,7 +50,7 @@ def main():
for rId in reactions_to_remove:
listOfReactions.remove(rId)
writeSBMLToFile(document, output)
libsbml.writeSBMLToFile(document, output)
if __name__ == "__main__":
main()
\ No newline at end of file
......@@ -31,7 +31,7 @@ option:
-v print info
"""
from padmet.padmetSpec import PadmetSpec
from padmet.classes import PadmetSpec
import docopt
def main():
......
......@@ -33,7 +33,6 @@ options:
--output=FILE pathname of the lp file
-v print info
"""
from padmet.aspGenerator import padmet_to_asp
import docopt
def main():
......
......@@ -31,7 +31,7 @@ option:
--output=FILE pathname to the output file, col: rxn, row: metabo, sep = "\t".
"""
import docopt
from padmet.padmetSpec import PadmetSpec
from padmet.classes import PadmetSpec
def main():
args = docopt.docopt(__doc__)
......
......@@ -29,8 +29,7 @@ options:
--output=FILE pathanme to the new padmet file, if none overwritte init_padmet
-v print info
"""
from padmet.padmetSpec import PadmetSpec
from padmet.padmetRef import PadmetRef
from padmet.classes import PadmetSpec, PadmetRef
from time import time
from datetime import datetime
import os
......
......@@ -53,8 +53,7 @@ options:
--output_dir=DIR
-v
"""
from padmet.padmetSpec import PadmetSpec
from padmet.padmetRef import PadmetRef
from padmet.classes import PadmetSpec, PadmetRef
from itertools import izip_longest
import os
import csv
......
......@@ -118,8 +118,8 @@ options:
import re
from datetime import datetime
from time import time
from padmet.padmetSpec import *
import padmet.sbmlPlugin as sbmlPlugin
from padmet.classes import PadmetRef, PadmetSpec, Policy, Node, Relation
import padmet.utils.sbmlPlugin as sbmlPlugin
from libsbml import *
import docopt
......
......@@ -32,8 +32,7 @@ option:
-v print info
"""
import re
from padmet.sbmlPlugin import parseNotes, parseGeneAssoc
from padmet.sbmlGenerator import check
from padmet.utils.sbmlPlugin import parseNotes, parseGeneAssoc
from libsbml import *
import docopt
import os
......@@ -176,6 +175,26 @@ def main():
writeSBMLToFile(document_study, output)
def check(value, message):
"""If 'value' is None, prints an error message constructed using
'message' and then exits with status code 1. If 'value' is an integer,
it assumes it is a libSBML return status code. If the code value is
LIBSBML_OPERATION_SUCCESS, returns without further action; if it is not,
prints an error message constructed using 'message' along with text from
libSBML explaining the meaning of the code, and exits with status code 1.
"""
if value == None:
raise SystemExit('LibSBML returned a null value trying to ' + message + '.')
elif type(value) is int:
if value == libsbml.LIBSBML_OPERATION_SUCCESS:
return
else:
err_msg = 'Error encountered trying to ' + message + '.' \
+ 'LibSBML returned error code ' + str(value) + ': "' \
+ libsbml.OperationReturnValue_toString(value).strip() + '"'
raise TypeError(err_msg)
else:
return
if __name__ == "__main__":
main()
......
# -*- coding: utf-8 -*-
"""
This file is part of padmet-utils.
padmet-utils is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
padmet-utils is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with padmet-utils. If not, see <http://www.gnu.org/licenses/>.
@author: Meziane AITE, meziane.aite@inria.fr
Description:
Convert a list of reactions to SBML file.
usage:
reactions_to_sbml.py --padmetRef=FILE --reactions=FILE --output=FILE [-v]
option:
-h --help Show help.
--padmetRef=FILE pathname to the padmet used as reference (ex: metacyc.padmet)
--reactions=FILE pathname to the file of reaction id. one id by line.
--output=FILE pathname to the sbml output.
-v print info
"""
from padmet.sbmlGenerator import reactions_to_SBML
import docopt
def main():
args = docopt.docopt(__doc__)
padmetRef_file = args["--padmetRef"]
reactions_file = args["--reactions"]
output = args["--output"]
verbose = args["-v"]
reactions_to_SBML(reactions_file, output, padmetRef_file, verbose=verbose)
if __name__ == "__main__":
main()
\ No newline at end of file
......@@ -35,8 +35,8 @@ option:
--sbml_lvl=STR sbml level 2 is sufficient for FBA.
-v print info.
"""
from padmet.padmetSpec import PadmetSpec
import padmet.sbmlPlugin as sp
from padmet.classes import PadmetSpec
import padmet.utils.sbmlPlugin as sp
import os
import docopt
import libsbml
......
......@@ -57,8 +57,7 @@ options:
--version=STR database version
-v print info
"""
from padmet.padmetSpec import PadmetSpec
from padmet.padmetRef import PadmetRef
from padmet.classes import PadmetSpec, PadmetRef
from time import time
from datetime import datetime
import os
......@@ -83,9 +82,11 @@ def main():
else:
raise TypeError("%s is not a dir or a file" %(args["--sbml"]))
if padmetRef_file and os.path.isfile(padmetRef_file):
padmetRef = PadmetRef(padmetRef_file)
if padmetRef_file:
if os.path.isfile(padmetRef_file):
padmetRef = PadmetRef(padmetRef_file)
else:
raise IOError("No such file %s" %padmetRef_file)
else:
padmetRef = None
......
......@@ -28,8 +28,8 @@ usage:
options:
-h --help Show help.
"""
from padmet.padmetRef import PadmetRef
from padmet.padmetSpec import PadmetSpec
from padmet.classes import PadmetRef
from padmet.classes import PadmetSpec
import os
import shutil
from itertools import chain
......
This diff is collapsed.
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/padmet-utils.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/padmet-utils.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/padmet-utils"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/padmet-utils"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes