-
Notifications
You must be signed in to change notification settings - Fork 166
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
subcluster issues #528
Comments
Hi @callaL ,
With this version, the left most color bar on the observation plot will indicate the subclusters, and there is also a helper method to plot the figure with subclusters as annotations, which adds a black bar between each of them for more visual clarity. Regards, |
Thank you for your reply.The similarity between the two images indicates that the subclustering worked well,but it doesn't mean that the first image was drawn according to subcluster, does it?I have another question, why does HMM predict using the 'preliminary infercnv object' instead of the denoised result? |
Hi @callaL , Unless you manually edited the internals of the infercnv object, each subcluster should always be a monophyletic group in the dendrogram, so all cells from the same subcluster should be contiguous. This is the result of either individual hclust objects that are calculated for each subcluster and then merged as dendrograms into an overarching one, or an initial hclust is cut into subclusters. The HMM uses the non denoised results because the distribution of values is compared to that of the simulated data, but denoising changes what the distribution of values looks like as it zeroes all values within a certain range of the center. Regards, |
Dear Christophe, |
Hi @Nisanity007 , At this time there is no automated method to select the best value, but the latest version, 1.16.0, has features to help you inspect the subclustering results to determine if they are good or if the resolution needs adjustment. Regards, |
Thank you for your great advice. I have try it and set the leiden_resolution as 0.00001(fig1), 0.000005(fig2), the picture is followed. To which, whether the leiden_resolution needs adjust again, such as 0.000001, 0.0000001 or further. And I try to run infercnv with the option tumor_subcluster_partition_method = "random_trees", which seems better(fig3), however, the subcluster looks a bit confused(fig4). |
Hi @Nisanity007 , If you are using version 1.16.0+ of infercnv, then based on fig1/2, the leiden resolution you used is now too low and all cells are kept together in the same cluster. Based on datasets I ran tests with, a good starting range of leiden resolution is 0.05 to 0.01, although the value varies by dataset size, diversity and quality. For figure 3, the clustering itself looks good, however the potential problem with the random trees method (besides run time) is whether enough of the branches have been split. Figure 4 looks weird because it is actually a plot generated at step 7 when the subclustering happens with the random_trees method, which is before some of the key steps that make the figure readable. I should probably delay this plotting when using the random trees method to right before the HMM just as for the Leiden method.
This should generated a file "preliminary_obj_subclusters.png" where the residual expression is plotted with the random trees subclusters as annotations. Regards, |
|
Thank you for developing such an excellent tool.
I have some questions about subcluster that I would like to ask you?
I have run each using the following script:
cluster_by_groups=F,
scale_data=F,
denoise=TRUE,
HMM=TRUE,
analysis_mode="subclusters",
tumor_subcluster_partition_method='leiden',
num_threads = 10,
leiden_resolution = 0.5,
output_format='pdf'
The drawing of the final result is like this:
1、Is this picture drawn according to subcluster?The result of the group in this graph looks the same as infercnv.20_HMM_predHMMi6.leiden.hmm_mode-subclusters.Pnorm_0.5.repr_intensities.pdf
2、How can the results of the subcluster of inferCNV be displayed in inferCNv.pdf?For example, adding a comment bar on the left side of the graph?
The text was updated successfully, but these errors were encountered: