byzhang23 / TreeCorTreat

TreeCorTreat
GNU General Public License v3.0
7 stars 0 forks source link

Function Compatibility Issue with Seurat Upgrade: Invalid Slot Names in treecor_harmony #3

Open yingxuexiao opened 3 months ago

yingxuexiao commented 3 months ago

Hi~ I hope this message finds you well. I am writing to report an issue related to the treecor_harmony function from your tool, which seems to be incompatible with the latest version of Seurat.

With the recent update to Seurat, the function call: integration <- treecor_harmony(count = raw_data[['count']], sample_meta = raw_data[['sample_meta']], output_dir = output_dir)

results in an error due to the Seurat package's inability to recognize certain slot names. Specifically, the error message indicates: invalid names for slots of class “Assay5”: min_cells, min_features

It appears that these slot names are no longer valid in the updated Seurat version, I am currently using R version 4.4.0 and Seurat version 5.1.0. I modified the function as follows to adapt to the new version of Seurat:

treecor_harmony <- function(count, sample_meta, output_dir, cell_meta = NULL, num_PCs = 20, 
                              num_harmony = 20, num_features = 2000,  
                              pct_mito_cutoff = 20, exclude_genes = NULL, vars_to_regress = c("sample"), 
                              resolution = 0.5, verbose = TRUE) {
    u <- CreateSeuratObject(counts = count)

}

I also found similar issues in another function, access_data_seurat, which also appears to be affected by Seurat's updates.

Could you please provide guidance or an updated version of your tool to address these compatibility issues? Your assistance would be greatly appreciated.

Thank you very much for your support.

Best regards,

Yingxue Xiao

ayin0510 commented 2 months ago

I am also having similar issues with following the package. Any insights would be greatly appreciated, thank you!