Skip to content

Commit

Permalink
Fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
moshi4 committed Nov 9, 2023
1 parent 0ed4150 commit f4c8a9d
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/pycirclize/circos.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def initialize_from_tree(
Returns
-------
circos, tv : tuple[Circos, TreeViz]
Circos instance initialized from tree, TreeViz instance
Circos & TreeViz instances initialized from tree
"""
# Initialize circos sector with tree size
tree = TreeViz.load_tree(tree_data, format=format)
Expand Down Expand Up @@ -575,9 +575,9 @@ def line(
Parameters
----------
r : float, tuple[float, float]
r : float | tuple[float, float]
Line radius position (0 - 100). If r is float, (r, r) is set.
deg_lim : tuple[float, float]
deg_lim : tuple[float, float] | None, optional
Degree limit region (-360 - 360). If None, `circos.deg_lim` is set.
arc : bool, optional
If True, plot arc style line for polar projection.
Expand Down
2 changes: 1 addition & 1 deletion src/pycirclize/parser/genbank.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(
gbk_source : str | Path | TextIOWrapper
Genbank file or source
(`*.gz`, `*.bz2`, `*.zip` compressed file can be readable)
name : str | None
name : str | None, optional
name (If None, `file name` or `record name` is set)
reverse : bool, optional
If True, reverse complement genome is used
Expand Down
2 changes: 1 addition & 1 deletion src/pycirclize/parser/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def sort(self, order: str | list[str] = "asc") -> Matrix:
Parameters
----------
order : str | list[str] | None, optional
order : str | list[str], optional
Sort order of matrix for plotting Chord Diagram.
If `asc`|`desc`, sort in ascending(or descending) order by node size.
If node name list is set, sort in user specified node order.
Expand Down
14 changes: 7 additions & 7 deletions src/pycirclize/sector.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def text(
----------
text : str
Text content
x: float, optional
x: float | None, optional
X position. If None, sector center x is set.
r : float, optional
Radius position. By default, outer position `r=105` is set.
Expand Down Expand Up @@ -299,11 +299,11 @@ def line(
Parameters
----------
r : float, tuple[float, float]
r : float | tuple[float, float]
Line radius position (0 - 100). If r is float, (r, r) is set.
start : float, optional
start : float | None, optional
Start position (x coordinate). If None, `sector.start` is set.
end : float, optional
end : float | None, optional
End position (x coordinate). If None, `sector.end` is set.
arc : bool, optional
If True, plot arc style line for polar projection.
Expand All @@ -330,11 +330,11 @@ def rect(
Parameters
----------
start : float, optional
start : float | None, optional
Start position (x coordinate). If None, `sector.start` is set.
end : float, optional
end : float | None, optional
End position (x coordinate). If None, `sector.end` is set.
r_lim : tuple[float, float] | None
r_lim : tuple[float, float] | None, optional
Radius limit region. If None, (0, 100) is set.
**kwargs : dict, optional
Patch properties (e.g. `fc="red", ec="blue", lw=1.0, ...`)
Expand Down
9 changes: 7 additions & 2 deletions src/pycirclize/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ def text(
----------
text : str
Text content
x : float | None
x : float | None, optional
X position. If None, track center x position is set.
r : float | None
r : float | None, optional
Radius position. If None, track center radius position is set.
adjust_rotation : bool, optional
If True, text rotation is auto set based on `x` and `orientation` params.
Expand Down Expand Up @@ -1149,6 +1149,11 @@ def tree(
align_line_kws : dict[str, Any] | None, optional
Patch properties (e.g. `dict(lw=1, ls="dotted", alpha=1.0, ...)`)
<https://matplotlib.org/stable/api/_as_gen/matplotlib.patches.Patch.html>
Returns
-------
tv : TreeViz
TreeViz instance
"""
tv = TreeViz(
tree_data,
Expand Down
2 changes: 1 addition & 1 deletion src/pycirclize/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def highlight(
query : str | list[str] | tuple[str]
Search query node name(s) for highlight. If multiple node names are set,
MRCA(Most Recent Common Ancester) node is set.
color : str | None, optional
color : str, optional
Highlight color
alpha : float, optional
Highlight color alpha(transparancy) value
Expand Down

0 comments on commit f4c8a9d

Please sign in to comment.