Metadata

Functions to modify the metadata of graphs, their edges, and their nodes.

pybel.struct.mutation.metadata.strip_annotations(graph)[source]

Strip all the annotations from a BEL graph.

Parameters

graph (BELGraph) – A BEL graph

Return type

None

pybel.struct.mutation.metadata.add_annotation_value(graph, annotation, value, strict=True)[source]

Add the given annotation/value pair to all qualified edges.

Parameters
  • graph (BELGraph) – A BEL graph

  • annotation (str) –

  • value (str) –

  • strict (bool) – Should the function ensure the annotation has already been defined?

Return type

None

pybel.struct.mutation.metadata.remove_annotation_value(graph, annotation, value)[source]

Remove the given annotation/value pair to all qualified edges.

Parameters
  • graph (BELGraph) – A BEL graph

  • annotation (str) –

  • value (str) –

Return type

None

pybel.struct.mutation.metadata.remove_extra_citation_metadata(graph)[source]

Remove superfluous metadata associated with a citation (that isn’t the db/id).

Best practice is to add this information programmatically.

Return type

None