-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Advanced diplotype clustering - follow-up (#550)
* add diplotype clustering API docs * tidy; dynamic height * tidy legend * tweaks * fix typing * refactor * fix tests
- Loading branch information
Showing
14 changed files
with
112 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"""Parameters for hierarchical clustering functions.""" | ||
|
||
from typing import Literal | ||
|
||
from typing_extensions import Annotated, TypeAlias | ||
|
||
linkage_method: TypeAlias = Annotated[ | ||
Literal["single", "complete", "average", "weighted", "centroid", "median", "ward"], | ||
""" | ||
The linkage algorithm to use. See the Linkage Methods section of the | ||
scipy.cluster.hierarchy.linkage docs for full descriptions. | ||
""", | ||
] | ||
|
||
leaf_y: TypeAlias = Annotated[ | ||
int, | ||
"Y coordinate at which to plot the leaf markers.", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,9 @@ | ||
"""Parameters for diplotype clustering functions.""" | ||
|
||
from typing import Literal | ||
from typing_extensions import Annotated, TypeAlias | ||
from .diplotype_distance_params import distance_metric | ||
from .clustering_params import linkage_method | ||
|
||
|
||
linkage_method: TypeAlias = Annotated[ | ||
Literal["single", "complete", "average", "weighted", "centroid", "median", "ward"], | ||
""" | ||
The linkage algorithm to use. See the Linkage Methods section of the | ||
scipy.cluster.hierarchy.linkage docs for full descriptions. | ||
""", | ||
] | ||
|
||
linkage_method_default: linkage_method = "complete" | ||
|
||
distance_metric_default: distance_metric = "cityblock" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,5 @@ | ||
"""Parameters for haplotype clustering functions.""" | ||
|
||
from typing import Literal | ||
|
||
from typing_extensions import Annotated, TypeAlias | ||
|
||
linkage_method: TypeAlias = Annotated[ | ||
Literal["single", "complete", "average", "weighted", "centroid", "median", "ward"], | ||
""" | ||
The linkage algorithm to use. See the Linkage Methods section of the | ||
scipy.cluster.hierarchy.linkage docs for full descriptions. | ||
""", | ||
] | ||
from .clustering_params import linkage_method | ||
|
||
linkage_method_default: linkage_method = "single" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.