welch-lab / liger

R package for integrating and analyzing multiple single-cell datasets
GNU General Public License v3.0
380 stars 78 forks source link

Fixed non-conformable matrix bug in online_iNMF #269

Open bnovotny opened 2 years ago

bnovotny commented 2 years ago

Hi, I noticed that when running online_iNMF I was getting a non-conformable matrix error with regard to object@B[[i]] - B_old[[i]]. I think this is due to the line initializing B_old when X_new is specified; the dimensions of the matrix are different than when X_new is left NULL. Changing the matrix dimensions to (num_genes, k) seems to fix the error. Thanks so much for this package!