Tristan Colombo

NAME

BioGraph::FileAccess

SYNOPSIS

use BioGraph::FileAccess;

DESCRIPTION

Package for manipulate graphs represented as well as adjacent matrix or adjacent list. Library for read and write different types of graph.

AVAILABLE FUNCTIONS

This is the list of the differents functions implemented in this library.

read_graph

Use this function to read graph from file

  • SYNOPSIS %G=read_graph(file, representation, symetrisation)

  • PARAMETERS

    file

    the name of the graph file to read ; the recognized formats of graphs are

    dot (extension '.dot') Graph format used by the dot program of the package graphviz from AT&T (http://www.graphviz.org)
    graph (extension '.gr') In this graph format, the first line is the number of edges and the other lines are the edges in the form : edge1 tabulate edge2
    biolayout (extension '.biolayout') Graph format used by the biolayout program (http://www.biolayout.org)
    pajek (extension '.net') Graph format used by the pajek program

    Note that the format of the graph is detected by checking the name file, so ensure that your file has the correct extension.

    representation

    the type of representation choosen : 1 = adjacent matrix, and 2 = adjacent list

    symetrisation

    enable (or not) the symetrisation of the edges of the graph : 0 = disable, 1 = enable

  • OUTPUT The hash table of the graph read

    adjacent matrix

    $G{$s1}{$s2} exists if (and only if) the edge ($s1, $s2) exists

    adjacent list

    $G{$s1} contains the list of all the vertices connected to $s1

read_association

Associate a comment to vertices (ex: associate a function to a protein, ...)

  • SYNOPSIS %C=read_association(file, representation, graph)

  • PARAMETERS

    file

    the name of the associations file (format : vertex tabulate comment)

    representation

    the type of representation choosen : 1 = adjacent matrix, and 2 = adjacent list

    graph

    the hash table of the graph

  • OUTPUT The hash table of the associations : vertex <=> comment

write_graph

Use this function to write graph to disk in the required format

  • SYNOPSIS write_graph(representation, file_name, format, graph)

  • PARAMETERS

    representation

    the type of representation choosen : 1 = adjacent matrix, and 2 = adjacent list

    file_name

    the basename of the output file (ex: graph => graph.dot)

    format

    one type of format in : dot, gr, biolayout, net

    graph

    the hash table of the graph

  • OUTPUT Nothing else the file written to disk

write_valuated_graph

Use this function to write valuated graph to disk in the required format

  • SYNOPSIS write_graph(representation, file_name, format, ref_distance, graph)

  • PARAMETERS

    representation

    the type of representation choosen : 1 = adjacent matrix, and 2 = adjacent list

    file_name

    the basename of the output file (ex: graph => graph.dot)

    format

    one type of format in : dot, gr, biolayout, net

    ref_distance

    the reference to the table of distances

    graph

    the hash table of the graph

  • OUTPUT Nothing else the file written to disk

write_graph_clusters

Use this function to write graph with clusters to disk in the required format

  • SYNOPSIS write_graph_clusters(representation, file_name, format, cluster_nb, ref_cluster, graph)

  • PARAMETERS

    representation

    the type of representation choosen : 1 = adjacent matrix, and 2 = adjacent list

    file_name

    the basename of the output file (ex: graph => graph.dot)

    format

    one type of format in : dot, gr, biolayout, net

    cluster_nb

    the number of clusters

    ref_cluster

    the table of clusters's elements

    graph

    the hash table of the graph

  • OUTPUT Nothing else the file written to disk

write_treedyn_clusters

Use this function to write clusters to disk in the treedyn format

  • SYNOPSIS write_treedyn_clusters(file_name, cluster_nb, ref_cluster)

  • PARAMETERS

    file_name

    the basename of the output file (ex: graph => graph.dot)

    cluster_nb

    the number of clusters

    ref_cluster

    the table of clusters's elements

  • OUTPUT Nothing else the file written to disk

AUTHOR AND COPYRIGHT

  BioGraph::FileAccess is Copyright (C) 2004, Tristan Colombo
                                     CNRS - LCB, 31 chemin Joseph Aiguier
                                     13009 Marseille
                                     France

                                     Email: tristan.colombo@ibsm.cnrs-mrs.fr

  All rights reserved.

  You may distribute this package under the terms of the GNU
  General Public License.