PathMe-Viewer¶
PathMe Viewer.
A plugin for PathMe that allows to explore pathway knowledge.
Installation¶
pathme_viewer
can be installed with the following commands:
$ python3 -m pip install git+https://github.com/ComPath/PathMe-Viewer.git@master
or in editable mode with:
$ git clone https://github.com/ComPath/PathMe-Viewer.git
$ cd PathMe-Viewer
$ python3 -m pip install -e .
Database¶
The web application requires to load the pathways from the databases in the BEL. Thus, it is required to the following command to load the database (note that the first time it runs might take a couple of hours).
python3 -m pathme_viewer manage load_database
In order to check the status of the database, you can run:
python3 -m pathme_viewer manage summarize
The content of the database can be erased by running:
python3 -m pathme_viewer manage drop
Deployment¶
Once the desired pathway databases are loaded, you can deploy the web application by running:
python3 -m pip install pathme_viewer web
Note that the database runs by default in the following port: http://0.0.0.0:5000/. The Flask host and port can be modified by changing the default parameters (run: “python3 -m pathme_viewer web –help” for more info).
Command Line Interface¶
PathMe-Viewer commands.
pathme_viewer¶
PathMe
pathme_viewer [OPTIONS] COMMAND [ARGS]...
manage¶
Manage the database.
pathme_viewer manage [OPTIONS] COMMAND [ARGS]...
Options
-
-c
,
--connection
<connection>
¶ Cache connection. Defaults to sqlite:////home/docs/.bio2bel/bio2bel.db
drop¶
Delete all database entries
pathme_viewer manage drop [OPTIONS]
Options
-
-v
,
--debug
¶
Turn on debugging.
-
-y
,
--yes
¶
-
-c
,
--connection
<connection>
¶ Cache connection. Defaults to sqlite:////home/docs/.bio2bel/bio2bel.db
export-to-tsv¶
Export pathways to tsv
pathme_viewer manage export-to-tsv [OPTIONS]
Options
-
-c
,
--connection
<connection>
¶ Defaults to sqlite:////home/docs/.bio2bel/bio2bel.db
-
-a
,
--all
¶
load¶
Load Pathways
pathme_viewer manage load [OPTIONS]
Options
-
-c
,
--connection
<connection>
¶ Cache connection. Defaults to sqlite:////home/docs/.bio2bel/bio2bel.db
-
-kp
,
--kegg_path
<kegg_path>
¶ KEGG data folder. Defaults to /home/docs/.pathme/kegg
-
-rp
,
--reactome_path
<reactome_path>
¶ Reactome data folder. Defaults to /home/docs/.pathme/reactome
-
-wp
,
--wikipathways_path
<wikipathways_path>
¶ WikiPathways data folder. Defaults to /home/docs/.pathme/wikipathways
-
-f
,
--flatten
<flatten>
¶ Flat complexes/composites. Defaults to False
-
-y
,
--yes
¶
Skip confirmation
Database Models¶
PathMe-Viewer database models.
PathMe models.
-
class
pathme_viewer.models.
Pathway
(**kwargs)[source]¶ Represents a pathway network in BEL format harmonized by ComPath
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
name
¶ Pathway name
-
resource_name
¶ Database of origin
-
pathway_id
¶ Pathway identifier in database of origin
-
number_of_nodes
¶ Number of nodes
-
number_of_edges
¶ Number of edges
-
version
¶ Version of the BEL file
Authors of the underlying BEL file
-
contact
¶ Contact email from the underlying pathway
-
description
¶ Descriptive text from the pathway
-
pybel_version
¶ Version of PyBEL
-
blob
¶ A pickled version of this pathway
-
display_name
¶ Return pathway name.
-
pathway_tuple
¶ Return pathway name.
-
Database Manager¶
PathMe-Viewer database manager.
This module contains the PathMe database manager.
-
class
pathme_viewer.manager.
Manager
(engine, session)[source]¶ Database manager.
Init PathMe manager.
-
count_pathways_by_resource
()[source]¶ Count the pathways in the database grouping by resource.
- Return type
-