<｜begin▁of▁sentence｜>### Instruction:
As a Bioinformatics Analyst, you've been tasked with analyzing genomic data to identify potential protein-protein interaction networks. You've received an adjacency matrix file named 'matrix.txt', where spaces separate elements, and lines starting with '#' denote comments. This file contains edge weights representing the likelihood of interactions between proteins.

Your goal is to construct a graph object from this adjacency matrix using the igraph library. Additionally, you'll need to demonstrate a similar process using the networkx library, both of which are essential for further network analysis to understand complex biological pathways.
### Response:
import igraph as ig

# Read a graph from an adjacency matrix in 'matrix.txt'
# Assuming 'matrix.txt' contains a matrix where separations are spaces
# and lines starting with '#' are comments.
g = ig.Graph.Read_Adjacency('matrix.txt', sep=' ', comment_char='#', attribute='weight')

# Print the summary of the graph
print(g.summary())

# To achieve a similar task using networkx, you would use the following code:
import networkx as nx

# Read adjacency matrix from a file and create a networkx graph
with open('matrix.txt') as f:
    adj_matrix = nx.read_adj_matrix(f, delimiter=' ', comments='#')
    nx_graph = nx.from_numpy_matrix(adj_matrix)

# Print the number of nodes and edges in the networkx graph
print(nx.info(nx_graph))
<|EOT|>
