1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295
|
Input and Output
================
.. automodule:: pybel.io
.. autofunction:: pybel.load
.. autofunction:: pybel.dump
Import
------
Parsing Modes
~~~~~~~~~~~~~
The PyBEL parser has several modes that can be enabled and disabled. They are described below.
Allow Naked Names
*****************
By default, this is set to :code:`False`. The parser does not allow identifiers that are not qualified with
namespaces (*naked names*), like in :code:`p(YFG)`. A proper namespace, like :code:`p(HGNC:YFG)` must be used. By
setting this to :code:`True`, the parser becomes permissive to naked names. In general, this is bad practice and this
feature will be removed in the future.
Allow Nested
************
By default, this is set to :code:`False`. The parser does not allow nested statements is disabled. See `overview`.
By setting this to :code:`True` the parser will accept nested statements one level deep.
Citation Clearing
*****************
By default, this is set to :code:`True`. While the BEL specification clearly states how the language should be used as
a state machine, many BEL documents do not conform to the strict :code:`SET`/:code:`UNSET` rules. To guard against
annotations accidentally carried from one set of statements to the next, the parser has two modes. By default, in
citation clearing mode, when a :code:`SET CITATION` command is reached, it will clear all other annotations (except
the :code:`STATEMENT_GROUP`, which has higher priority). This behavior can be disabled by setting this to :code:`False`
to re-enable strict parsing.
Reference
~~~~~~~~~
.. autofunction:: pybel.from_bel_script
.. autofunction:: pybel.from_bel_script_url
.. autofunction:: pybel.to_bel_script
Hetionet
~~~~~~~~
.. automodule:: pybel.io.hetionet
.. autofunction:: pybel.from_hetionet_json
.. autofunction:: pybel.from_hetionet_file
.. autofunction:: pybel.from_hetionet_gz
.. autofunction:: pybel.get_hetionet
Transport
---------
All transport pairs are reflective and data-preserving.
Bytes
~~~~~
.. automodule:: pybel.io.gpickle
.. autofunction:: pybel.from_bytes
.. autofunction:: pybel.to_bytes
.. autofunction:: pybel.from_bytes_gz
.. autofunction:: pybel.to_bytes_gz
.. autofunction:: pybel.from_pickle
.. autofunction:: pybel.to_pickle
.. autofunction:: pybel.from_pickle_gz
.. autofunction:: pybel.to_pickle_gz
Node-Link JSON
~~~~~~~~~~~~~~
.. automodule:: pybel.io.nodelink
.. autofunction:: pybel.from_nodelink
.. autofunction:: pybel.to_nodelink
.. autofunction:: pybel.from_nodelink_jsons
.. autofunction:: pybel.to_nodelink_jsons
.. autofunction:: pybel.from_nodelink_file
.. autofunction:: pybel.to_nodelink_file
.. autofunction:: pybel.from_nodelink_gz
.. autofunction:: pybel.to_nodelink_gz
Streamable BEL (JSONL)
~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: pybel.io.sbel
.. autofunction:: pybel.from_sbel
.. autofunction:: pybel.to_sbel
.. autofunction:: pybel.from_sbel_file
.. autofunction:: pybel.to_sbel_file
.. autofunction:: pybel.from_sbel_gz
.. autofunction:: pybel.to_sbel_gz
Cyberinfrastructure Exchange
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: pybel.io.cx
.. autofunction:: pybel.from_cx
.. autofunction:: pybel.to_cx
.. autofunction:: pybel.from_cx_jsons
.. autofunction:: pybel.to_cx_jsons
.. autofunction:: pybel.from_cx_file
.. autofunction:: pybel.to_cx_file
.. autofunction:: pybel.from_cx_gz
.. autofunction:: pybel.to_cx_gz
JSON Graph Interchange Format
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: pybel.io.jgif
.. autofunction:: pybel.from_jgif
.. autofunction:: pybel.to_jgif
.. autofunction:: pybel.from_jgif_jsons
.. autofunction:: pybel.to_jgif_jsons
.. autofunction:: pybel.from_jgif_file
.. autofunction:: pybel.to_jgif_file
.. autofunction:: pybel.from_jgif_gz
.. autofunction:: pybel.to_jgif_gz
.. autofunction:: pybel.post_jgif
.. autofunction:: pybel.from_cbn_jgif
.. autofunction:: pybel.from_cbn_jgif_file
GraphDati
~~~~~~~~~
.. automodule:: pybel.io.graphdati
.. autofunction:: pybel.to_graphdati
.. autofunction:: pybel.from_graphdati
.. autofunction:: pybel.to_graphdati_file
.. autofunction:: pybel.from_graphdati_file
.. autofunction:: pybel.to_graphdati_gz
.. autofunction:: pybel.from_graphdati_gz
.. autofunction:: pybel.to_graphdati_jsons
.. autofunction:: pybel.from_graphdati_jsons
.. autofunction:: pybel.to_graphdati_jsonl
.. autofunction:: pybel.to_graphdati_jsonl_gz
INDRA
~~~~~
.. automodule:: pybel.io.indra
.. autofunction:: pybel.from_indra_statements
.. autofunction:: pybel.from_indra_statements_json
.. autofunction:: pybel.from_indra_statements_json_file
.. autofunction:: pybel.to_indra_statements
.. autofunction:: pybel.to_indra_statements_json
.. autofunction:: pybel.to_indra_statements_json_file
.. autofunction:: pybel.from_biopax
Visualization
-------------
Jupyter
~~~~~~~
.. automodule:: pybel.io.jupyter
.. autofunction:: pybel.to_jupyter
Analytical Services
-------------------
PyNPA
~~~~~
.. automodule:: pybel.io.pynpa
.. autofunction:: pybel.to_npa_directory
.. autofunction:: pybel.to_npa_dfs
HiPathia
~~~~~~~~
.. automodule:: pybel.io.hipathia
.. autofunction:: pybel.to_hipathia
.. autofunction:: pybel.to_hipathia_dfs
.. autofunction:: pybel.from_hipathia_paths
.. autofunction:: pybel.from_hipathia_dfs
SPIA
~~~~
.. automodule:: pybel.io.spia
.. autofunction:: pybel.to_spia_dfs
.. autofunction:: pybel.to_spia_excel
.. autofunction:: pybel.to_spia_tsvs
PyKEEN
~~~~~~
.. automodule:: pybel.io.pykeen
.. autofunction:: pybel.io.pykeen.get_triples_from_bel
.. autofunction:: pybel.io.pykeen.get_triples_from_bel_nodelink
.. autofunction:: pybel.io.pykeen.get_triples_from_bel_pickle
.. autofunction:: pybel.io.pykeen.get_triples_from_bel_commons
Machine Learning
~~~~~~~~~~~~~~~~
.. automodule:: pybel.io.triples
.. autofunction:: pybel.to_triples
.. autofunction:: pybel.to_triples_file
.. autofunction:: pybel.to_edgelist
Web Services
------------
BEL Commons
~~~~~~~~~~~
.. automodule:: pybel.io.bel_commons_client
.. autofunction:: pybel.from_bel_commons
.. autofunction:: pybel.to_bel_commons
Amazon Simple Storage Service (S3)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: pybel.io.aws
.. autofunction:: pybel.to_s3
.. autofunction:: pybel.from_s3
BioDati
~~~~~~~
.. automodule:: pybel.io.biodati_client
.. autofunction:: pybel.to_biodati
.. autofunction:: pybel.from_biodati
Fraunhofer OrientDB
~~~~~~~~~~~~~~~~~~~
.. automodule:: pybel.io.fraunhofer_orientdb
.. autofunction:: pybel.from_fraunhofer_orientdb
EMMAA
~~~~~~
.. automodule:: pybel.io.emmaa
.. autofunction:: pybel.from_emmaa
Databases
---------
SQL Databases
~~~~~~~~~~~~~
.. automodule:: pybel.manager.database_io
.. autofunction:: pybel.from_database
.. autofunction:: pybel.to_database
Neo4j
~~~~~
.. automodule:: pybel.io.neo4j
.. autofunction:: pybel.to_neo4j
Lossy Export
------------
Umbrella Node-Link JSON
~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: pybel.io.umbrella_nodelink
.. autofunction:: pybel.to_umbrella_nodelink
.. autofunction:: pybel.to_umbrella_nodelink_file
.. autofunction:: pybel.to_umbrella_nodelink_gz
GraphML
~~~~~~~
.. automodule:: pybel.io.graphml
.. autofunction:: pybel.to_graphml
Miscellaneous
~~~~~~~~~~~~~
.. automodule:: pybel.io.extras
.. autofunction:: pybel.to_csv
.. autofunction:: pybel.to_sif
.. autofunction:: pybel.to_gsea
|