HYsxe / PRINT

32 stars 3 forks source link

Suggested User Catch #20

Closed aseveritt closed 1 month ago

aseveritt commented 2 months ago

Hi all,

Great tool! I have a small suggestion to add a user-catch in the footprintScoring() function that checks if dispersionModel = dispModel(project, as.character(footprintRadius)) is NULL. Otherwise it returns Error in x %*% modelWeights[[1]] : requires numeric/complex matrix/vector arguments which isn't super straightforward to debug.

Conceptually it totally makes sense why this causes an error, but in the tutorial I believe you have for(kernelSize in 2:100){ dispModel(project, as.character(kernelSize)) <- readRDS(paste0("../../data/shared/dispModel/dispersionModel", kernelSize, "bp.rds")) } but then the plotMultiScale goes from 2:200 so I assume other people might run into the same issue in the future.

Best, Amanda

HYsxe commented 2 months ago

Hi Amanda!

Thanks for using our tool and spotting this issue! I have added a commit to include the user-catch you suggested! I tried testing the tutorial without loading the dispersion model and now it gives an error asking the user to load the model first.

Could you help me locate where the scale goes from 2 to 200? I did a search in the code base and couldn't find it.

Thank you!