saezlab / liana

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

Error message not informative #101

Closed estellad closed 1 year ago

estellad commented 1 year ago

Hi there, thank you for a great package! I was testing and encounter a problem that I could not make heat_freq() plot and chord_freq() plot on the truncated liana, but was able to plot these on aggregated liana (one step before truncation). The error message shows 'Error: number of observations in bottom annotation should be as same as ncol of the matrix.', and the actual cause of error is after truncation with filter(aggregate_rank <= 0.01), the nlevels of source and target in the truncated liana no longer matches the nlevels of annotation in the original count matrix. To fix it, you raise the value to be higher to keep more observations, so that the nlevels match, like filter(aggregate_rank <= 0.05). Could you please make the error message a bit more informative? Thank you!

dbdimitrov commented 1 year ago

Hi @estellad,

Are you running the tutorial? The error is handled by the package used to plot, I'm happy to extend it but it would be easier if you could provide a reproducible example so that I know when the error occurs exactly.

Thanks for using liana!