Skip to content

Commit

Permalink
make bigger circles
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao committed Apr 12, 2024
1 parent 96986e6 commit caa89a4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions jcvi/apps/pedigree.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ def to_graph(self, inbreeding: Dict[str, SampleInbreeding]) -> nx.DiGraph:
colors = dict(zip(terminal_nodes, set3_n(len(terminal_nodes))))
for s in self:
inb = inbreeding[s]
label = f"\n\n\n{s}"
label = s
if inb.mean_inbreeding > 0.01:
label += f"\n({inb.mean_inbreeding:.2f})"
label += f"\n(F={inb.mean_inbreeding:.2f})"
dosage = inb.dosage
fillcolor = [f"{colors[k]};{v:.2f}" for k, v in dosage.items()]
fillcolor = ":".join(fillcolor)
Expand All @@ -101,12 +101,12 @@ def to_graph(self, inbreeding: Dict[str, SampleInbreeding]) -> nx.DiGraph:
G._node[s]["label"] = label
G._node[s]["shape"] = "circle"
G._node[s]["fixedsize"] = "true"
G._node[s]["width"] = "0.3"
G._node[s]["height"] = "0.3"
G._node[s]["width"] = "0.6"
G._node[s]["height"] = "0.6"
G._node[s]["style"] = "wedged"
G._node[s]["fillcolor"] = fillcolor
G._node[s]["color"] = "none"
G._node[s]["fontsize"] = "8"
G._node[s]["fontsize"] = "10"
G._node[s]["fontname"] = "Helvetica"
return G

Expand Down

0 comments on commit caa89a4

Please sign in to comment.