-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Colorize dendrogram #48
Conversation
8ef1576
to
7c38107
Compare
3e53573
to
3c92578
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice functionality. I tested the "cluster lineage tree" plugin and it works as expected.
The test coverage is impressive. Which gives me confidence that the code will run reliably.
The code quality is goof. But I see one mayor point for improvement. This PR adds new methods to the "Classification" class. The class became a bit unorganized. I think restructuring it would be valuable.
Regarding javadoc & comments: There are sometimes concepts or surprises in the code. That are nowhere described, for example:
- The class ID in the Classification class, what does it refer to.
- We no the the "WeightedLinkageStrategy" class is named wrongly. And therefor we decided extend the class. This should be described in the commet.
- That a class is a copy of a class from another repository.
- There are tests that only test a side effect "CustomizedClusterComponentTest"
Please add, one sentence of javadoc to each class in the repository. One sentence that describes the purpose of class.
There is a small problem the color of the 4th class is always black. This is due to the use of the glasby lookup table and the fact that the first 5 colors in there are "outliers colors". I would suggest to exclude the first five colors.
src/main/java/org/mastodon/mamut/clustering/ui/CustomizedClusterComponent.java
Outdated
Show resolved
Hide resolved
src/main/java/org/mastodon/mamut/clustering/ui/CustomizedClusterComponent.java
Outdated
Show resolved
Hide resolved
src/main/java/org/mastodon/mamut/clustering/ui/DendrogramPanel.java
Outdated
Show resolved
Hide resolved
src/main/java/org/mastodon/mamut/clustering/ui/DendrogramPanel.java
Outdated
Show resolved
Hide resolved
src/test/java/org/mastodon/mamut/clustering/ui/CustomizedClusterComponentTest.java
Show resolved
Hide resolved
src/main/java/org/mastodon/mamut/clustering/util/Classification.java
Outdated
Show resolved
Hide resolved
* Extends existing ClusterComponent with a Color specific to it * The color is set before the paint method of super class ClusterComponent is called
…lasses * classified objects are stored in an (ordered) list instead of a set * a mapping between cluster objects and cluster ids is added
…from class id to colors and a separate mapping from Cluster to color
…air<Set, Cluster>
…n ordered list of classifications consisting of a set of classified objects and a Cluster object belonging to it
…f, leafmapping * Use the new DendrogramView constructor in ClusterRootNodesController
…lebar * Painting the cutoff line and adapting the scalebar is now completely done in the DendrogramPanel
…the cluster object is not null
…jects cluster, mapping and colors
…classification object
* The private variable children of the parent class ClusterComponent is initialized in CustomizedClusterComponent constructor by calling super.getChildren()
* Make field CLUSTER_LINE_COLOR package protected so that there is an assumption that can be tested
…l to CustomizedClusterComponent class
3c92578
to
3345cc6
Compare
* This class names better fits it purpose
…rogramPanelTest class
…structor of CustomizedClusterComponent. This is sufficient, since the constructor is the only public method that uses T.
…needs a cluster object and a classification object as parameters
This includes: - omit the obscure "leaf name" variable -> the leave mapping is now performed already in the ClusterUtils methods - omit any cluster ids - renamed `algorithmResult` to `rootCluster`, since this is a more appropriate name
… for List to Set * List is not required, since ordering is not relevant
95d2686
to
de76fa3
Compare
…rategy explaining why they override existing classes from the clustering library
…nce the 4th color is close to black and thus difficult to see
Kudos, SonarCloud Quality Gate passed! |
Thanks for the review. I did the following steps:
|
Adds colorizing the dendrogram with the same colors that are used for the tag sets
Resolves #49