src/pybel/cli.py
def serialize(graph: BELGraph, tsv, edgelist, sif, gsea, graphml, nodelink, bel):
    """Serialize a graph to various formats."""
    if tsv:
        logger.info('Outputting TSV to %s', tsv)
        to_triples_file(graph, tsv)

    if edgelist:
        logger.info('Outputting edgelist to %s', edgelist)
        to_edgelist(graph, edgelist)

    if sif:
        logger.info('Outputting SIF to %s', sif)
        to_sif(graph, sif)

    if graphml:
        logger.info('Outputting GraphML to %s', graphml)
        to_graphml(graph, graphml)

    if gsea:
        logger.info('Outputting GRP to %s', gsea)
        to_gsea(graph, gsea)

    if nodelink:
        logger.info('Outputting Nodelink JSON to %s', nodelink)
        to_nodelink_file(graph, nodelink)

    if bel:
        logger.info('Outputting BEL script to %s', bel)
        to_bel_script(graph, bel)
Serialize a graph to various formats.
Serialize a graph to various formats.
Serialize a graph to various formats .
def serialize(graph: BELGraph, tsv, edgelist, sif, gsea, graphml, nodelink, bel):
    if tsv:
        logger.info('Outputting TSV to %s', tsv)
        to_triples_file(graph, tsv)
    if edgelist:
        logger.info('Outputting edgelist to %s', edgelist)
        to_edgelist(graph, edgelist)
    if sif:
        logger.info('Outputting SIF to %s', sif)
        to_sif(graph, sif)
    if graphml:
        logger.info('Outputting GraphML to %s', graphml)
        to_graphml(graph, graphml)
    if gsea:
        logger.info('Outputting GRP to %s', gsea)
        to_gsea(graph, gsea)
    if nodelink:
        logger.info('Outputting Nodelink JSON to %s', nodelink)
        to_nodelink_file(graph, nodelink)
    if bel:
        logger.info('Outputting BEL script to %s', bel)
        to_bel_script(graph, bel)
def serialize ( graph : BELGraph , tsv , edgelist , sif , gsea , graphml , nodelink , bel ) : if tsv : logger . info ( 'Outputting TSV to %s' , tsv ) to_triples_file ( graph , tsv ) if edgelist : logger . info ( 'Outputting edgelist to %s' , edgelist ) to_edgelist ( graph , edgelist ) if sif : logger . info ( 'Outputting SIF to %s' , sif ) to_sif ( graph , sif ) if graphml : logger . info ( 'Outputting GraphML to %s' , graphml ) to_graphml ( graph , graphml ) if gsea : logger . info ( 'Outputting GRP to %s' , gsea ) to_gsea ( graph , gsea ) if nodelink : logger . info ( 'Outputting Nodelink JSON to %s' , nodelink ) to_nodelink_file ( graph , nodelink ) if bel : logger . info ( 'Outputting BEL script to %s' , bel ) to_bel_script ( graph , bel )
Serialize a graph to various formats.
Serialize a graph to various formats .
"""Serialize a graph to various formats."""
graph
BELGraph
tsv
edgelist
sif
gsea
graphml
nodelink
bel