saezlab / liana

LIANA: a LIgand-receptor ANalysis frAmework
https://saezlab.github.io/liana/
GNU General Public License v3.0
181 stars 31 forks source link

liana_dotplot magnitude and specificity argument syntax #49

Closed mschmidt22 closed 2 years ago

mschmidt22 commented 2 years ago

I am attempting to set my own scaling values for the liana_dotplot. Thus, I am entering the values I want into the magnitude and specificity arguments

liana_adult_signaling %>% liana_dotplot(source_groups = c('Fibroblast'), target_groups = c('Beta'), ntop = 10, magnitude = 1, specificity = 0.2)

However, I get the following error. Thus, can you please explain the proper syntax for the magnitude and specificity arguments?

Error in as_indices_impl(): ! Must rename columns with a valid subscript vector. ✖ Can't convert from to due to loss of precision. Run rlang::last_error() to see where the error occurred.

mschmidt22 commented 2 years ago

I am now realizing that the magnitude and specificity arguments are supplying data for the graph and not scaling the legend. I imagine this is something I will have to do with ggplot

dbdimitrov commented 2 years ago

@mschubert indeed! If you wish to scale the dotsizes, you can pass a vector with those to size_range- c(2, 10) by default.