MCPcopy Create free account
hub / github.com/CamaraLab/scTDA / find_root

Method find_root

scTDA/main.py:1473–1489  ·  view source on GitHub ↗

Given the output of RootedGraph.get_dendrite() as 'dendritem', it returns the less and the most differentiated nodes (used internally).

(self, dendritem)

Source from the content-addressed store, hash-verified

1471 return dendrite
1472
1473 def find_root(self, dendritem):
1474 """
1475 Given the output of RootedGraph.get_dendrite() as 'dendritem', it returns the less and the most differentiated
1476 nodes (used internally).
1477 """
1478 q = 1000.0
1479 q2 = -1000.0
1480 ind = 0
1481 ind2 = 0
1482 for n in dendritem.keys():
1483 if -2.0 < dendritem[n] < q:
1484 q = dendritem[n]
1485 ind = n
1486 if dendritem[n] > q2 and dendritem[n] > -2.0:
1487 q2 = dendritem[n]
1488 ind2 = n
1489 return ind, ind2
1490
1491 def dendritic_graph(self):
1492 """

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected