Command Line Interface
Note
The command line wrapper might not work on Windows. Use python3 -m pybel
if it has issues.
PyBEL automatically installs the command pybel
. This command can be used to easily compile BEL documents
and convert to other formats. See pybel --help
for usage details. This command makes logs of all conversions
and warnings to the directory ~/.pybel/
.
pybel
PyBEL CLI on /home/docs/checkouts/readthedocs.org/user_builds/pybel/envs/v0.15.5/bin/python
pybel [OPTIONS] COMMAND [ARGS]...
Options
- --version
Show the version and exit.
- -c, --connection <connection>
Database connection string.
- Default
sqlite:////home/docs/.data/pybel/pybel_0.14.0_cache.db
compile
Compile a BEL script to a graph.
pybel compile [OPTIONS] PATH
Options
- --allow-naked-names
Enable lenient parsing for naked names
- --disallow-nested
Disable lenient parsing for nested statements
- --disallow-unqualified-translocations
Disallow unqualified translocations
- --no-identifier-validation
Turn off identifier validation
- --no-citation-clearing
Turn off citation clearing
- -r, --required-annotations <required_annotations>
Specify multiple required annotations
- --upgrade-urls
- --skip-tqdm
- -v, --verbose
Arguments
- PATH
Required argument
insert
Insert a graph to the database.
pybel insert [OPTIONS] path
Arguments
- path
Required argument
machine
Get content from the INDRA machine and upload to BEL Commons.
pybel machine [OPTIONS] [AGENTS]...
Options
- --local
Upload to local database.
- --host <host>
URL of BEL Commons.
Arguments
- AGENTS
Optional argument(s)
manage
Manage the database.
pybel manage [OPTIONS] COMMAND [ARGS]...
drop
Drop the database.
pybel manage drop [OPTIONS]
Options
- --yes
Confirm the action without prompting.
edges
Manage edges.
pybel manage edges [OPTIONS] COMMAND [ARGS]...
ls
List edges.
pybel manage edges ls [OPTIONS]
Options
- --offset <offset>
- --limit <limit>
examples
Load examples to the database.
pybel manage examples [OPTIONS]
Options
- -v, --debug
namespaces
Manage namespaces.
pybel manage namespaces [OPTIONS] COMMAND [ARGS]...
drop
Drop a namespace by URL.
pybel manage namespaces drop [OPTIONS] URL
Arguments
- URL
Required argument
insert
Add a namespace by URL.
pybel manage namespaces insert [OPTIONS] URL
Arguments
- URL
Required argument
ls
List cached namespaces.
pybel manage namespaces ls [OPTIONS]
Options
- -u, --url <url>
Specific resource URL to list
- -i, --namespace-id <namespace_id>
Specific resource URL to list
networks
Manage networks.
pybel manage networks [OPTIONS] COMMAND [ARGS]...
drop
Drop a network by its identifier or drop all networks.
pybel manage networks drop [OPTIONS]
Options
- -n, --network-id <network_id>
Identifier of network to drop
- -y, --yes
Drop all networks without confirmation if no identifier is given
ls
List network names, versions, and optionally, descriptions.
pybel manage networks ls [OPTIONS]
nodes
Manage nodes.
pybel manage nodes [OPTIONS] COMMAND [ARGS]...
prune
Prune nodes not belonging to any edges.
pybel manage nodes prune [OPTIONS]
summarize
Summarize the contents of the database.
pybel manage summarize [OPTIONS]
neo
Upload to neo4j.
pybel neo [OPTIONS] path
Options
- --connection <connection>
Connection string for neo4j upload.
- --password <password>
Arguments
- path
Required argument
parse
Parse a single BEL statement and pring JSON output.
pybel parse [OPTIONS] TEXT
Options
- --pprint
Arguments
- TEXT
Required argument
serialize
Serialize a graph to various formats.
pybel serialize [OPTIONS] path
Options
- --tsv <tsv>
Path to output a TSV file.
- --edgelist <edgelist>
Path to output a edgelist file.
- --sif <sif>
Path to output an SIF file.
- --gsea <gsea>
Path to output a GRP file for gene set enrichment analysis.
- --graphml <graphml>
Path to output a GraphML file. Use .graphml for Cytoscape.
- --nodelink <nodelink>
Path to output a node-link JSON file.
- --bel <bel>
Output canonical BEL.
Arguments
- path
Required argument
summarize
Summarize a graph.
pybel summarize [OPTIONS] path
Arguments
- path
Required argument
upload
Upload a graph to BEL Commons.
pybel upload [OPTIONS] path
Options
- --host <host>
URL of BEL Commons.
- --user <user>
User for BEL Commons
- Default
<function _get_user at 0x7fa0814df9d0>
- --password <password>
Password for BEL Commons
- Default
<function _get_password at 0x7fa0814dfa60>
Arguments
- path
Required argument
warnings
List warnings from a graph.
pybel warnings [OPTIONS] path
Arguments
- path
Required argument