liuqivandy / SpaGene

16 stars 1 forks source link

How can I set the number of patterns #2

Closed tujchl closed 1 year ago

tujchl commented 1 year ago

Hi, Sorry to bother you again. The default number of patterns is 8. I found that there is a parameter named “knn” in FindPattern function which is 8 by default. I guess that it control the number of patterns. I just want to adjust it to optimize the identified patterns by evaluating the Heatmap of top genes. To my surprise, the number of patterns to show by “PlotPattern” is always 8 even changing the “knn” to 40.

liuqivandy commented 1 year ago

knn is not the parameter, but nPattern in the FindPattern function. For example, if want to find 20 patterns, set nPattern=20. FindPattern(spagene, nPattern=20)