theMILOlab / SPATA2

A Toolbox for Spatial Transcriptomics Analysis
https://themilolab.github.io/SPATA2/
93 stars 16 forks source link

Error in runAutoencoderDenoising #109

Open p-lombard opened 5 months ago

p-lombard commented 5 months ago

Hi! I seem to be running into a persistent error with runAutoencoderDenoising:

Error in [[<-.data.frame(*tmp*, mtr_name, value = list(df = list(genes = c("AL627309.1", : replacement has 3 rows, data has 36478

I've tried different SPATA objects but can't seem to get around this issue. runAutoencoderAssessment() works fine.

image

R version 4.3.3 (2024-02-29 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 11 x64

p-lombard commented 5 months ago

After looking through the scripts in the github, it appears that the error is being thrown when addGeneMetaData() is called. Line 711 in add.R is causing the error in addGeneMetaData).

object@gdata[[of_sample]][[mtr_name]] <- meta_data_list

It seems the information being stored in the gdata slot has been changed in the SPATA2 update, which explains why my old SPATA objects don't have this issue. I think the location to which addGeneMetaData saves meta_data_list may need to be changed to reflect this.

Thanks!!

simonmfr commented 5 months ago

Hi @p-lombard, thank you for looking into this, we will get back to you!