Skip to content

Commit d40e313

Browse files
authored
Merge pull request #74 from GuignardLab/update_readme
Update readme
2 parents e5c7d6f + 874af17 commit d40e313

File tree

3 files changed

+32
-55
lines changed

3 files changed

+32
-55
lines changed

README.md

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -24,66 +24,44 @@ and one can then load lineage trees the following way:
2424
For `.lT` files:
2525

2626
```python
27-
lT = lineageTree('path/to/file.lT')
27+
lT = lineageTree.load('path/to/file.lT')
2828
```
2929

3030
For ASTEC data:
3131

3232
```python
33-
lT = lineageTree('path/to/ASTEC.pkl', file_type='ASTEC')
33+
from LineageTree import read_from_ASTEC
34+
lT = read_from_ASTEC('path/to/ASTEC.pkl')
3435
```
3536

36-
or
37+
For MaMuT or TrackMate:
3738

3839
```python
39-
lT = lineageTree('path/to/ASTEC.xml', file_type='ASTEC')
40-
```
41-
42-
For SVF:
43-
44-
```python
45-
lT = lineageTree('path/to/SVF.bin')
46-
```
47-
48-
For MaMuT:
49-
50-
```python
51-
lT = lineageTree('path/to/MaMuT.xml', file_type='MaMuT')
52-
```
53-
54-
For TrackMate:
55-
56-
```python
57-
lT = lineageTree('path/to/MaMuT.xml', file_type='TrackMate')
40+
from LineageTree import read_from_mamut_xml
41+
lT = read_from_mamut_xml('path/to/MaMuT.xml')
5842
```
5943

6044
For TGMM:
6145

6246
```python
63-
lT = lineageTree('path/to/single_time_file{t:04d}.xml', tb=0, te=500, file_type='TGMM')
47+
from LineageTree import read_from_tgmm_xml
48+
lT = read_from_tgmm_xml('path/to/single_time_file{t:04d}.xml', tb=0, te=500)
6449
```
6550

6651
For Mastodon:
6752

6853
```python
69-
lT = lineageTree('path/to/Mastodon.mastodon', file_type='mastodon')
54+
from LineageTree import read_from_mastodon
55+
lT = read_from_mastodon('path/to/Mastodon.mastodon')
7056
```
7157

7258
or, for Mastodon csv file:
7359

7460
```python
75-
lT = lineageTree(['path/to/nodes.csv', 'path/to/links.csv'], file_type='mastodon')
61+
from LineageTree import read_from_mastodon_csv
62+
lT = read_from_mastodon_csv(['path/to/nodes.csv', 'path/to/links.csv'])
7663
```
7764

78-
## Dependencies
79-
80-
Some dependecies are requiered:
81-
82-
- general python dependecies:
83-
- numpy, scipy
84-
- specific dependency:
85-
- svgwrite if svg output is needed
86-
8765
## Quick install
8866

8967
To quickly install the library together with its dependencies one can run:

src/LineageTree/lineageTreeManager.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -657,28 +657,28 @@ def plot_tree_distance_graphs(
657657
matched_right.append(node_2)
658658
l_node_2 = tree2.lT.get_chain_of_node(node_2)[-1]
659659
matched_right.append(l_node_2)
660-
colors1[node_1] = (
661-
self.__calculate_distance_of_sub_tree(
662-
node_1,
663-
tree1.lT,
664-
node_2,
665-
tree2.lT,
666-
btrc,
667-
corres1,
668-
corres2,
669-
delta_tmp,
670-
self.norm_dict[norm],
671-
tree1.get_norm(node_1),
672-
tree2.get_norm(node_2),
673-
)
660+
colors1[
661+
node_1
662+
] = self.__calculate_distance_of_sub_tree(
663+
node_1,
664+
tree1.lT,
665+
node_2,
666+
tree2.lT,
667+
btrc,
668+
corres1,
669+
corres2,
670+
delta_tmp,
671+
self.norm_dict[norm],
672+
tree1.get_norm(node_1),
673+
tree2.get_norm(node_2),
674674
)
675675
colors2[node_2] = colors1[node_1]
676-
colors1[tree1.lT.get_chain_of_node(node_1)[-1]] = (
677-
colors1[node_1]
678-
)
679-
colors2[tree2.lT.get_chain_of_node(node_2)[-1]] = (
680-
colors2[node_2]
681-
)
676+
colors1[
677+
tree1.lT.get_chain_of_node(node_1)[-1]
678+
] = colors1[node_1]
679+
colors2[
680+
tree2.lT.get_chain_of_node(node_2)[-1]
681+
] = colors2[node_2]
682682

683683
if tree1.lT.get_chain_of_node(node_1)[-1] != node_1:
684684
matched_left.append(

src/LineageTree/test/test_lineageTree.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import numpy as np
44
import pytest
5-
65
from LineageTree import (
76
lineageTree,
87
lineageTreeManager,

0 commit comments

Comments
 (0)