Closed dwhswenson closed 3 years ago
Merging #90 (73cca8d) into master (ae5deca) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #90 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 13 13
Lines 1140 1153 +13
=========================================
+ Hits 1140 1153 +13
Impacted Files | Coverage Δ | |
---|---|---|
contact_map/contact_count.py | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update ae5deca...73cca8d. Read the comment docs.
This is ready for review. Includes:
to_networkx()
method for exporting contact map as a NetworkX graph
A sparse matrix (such as a contact map) can be considered equivalent to a network. This PR adds a direct function to make a NetworkX graph from a
ContactCount
.This constructor allows you to also add our graph to an existing graph by specifying the
graph
keyword. Additionally, you can select whether you want the graph to use the indices as nodes or the topology objects.Another way to create a NetworkX graph from a
ContactCount
would be:There are options possible with
nx.from_scipy_sparse
that are not possible withContactCount.to_networkx
. See NetworkX docs on it.