xushiabbvie / TDtool

6 stars 0 forks source link

[run_expression_alignment_TCGADEPMAP.R] Error in `ScaleData()` #3

Closed aambioinfo closed 1 month ago

aambioinfo commented 1 month ago

Hello again,

when running TCGA_obj <- create_Seurat_object(dat$TCGA_mat, dat$TCGA_ann, type='tumor') I got this Error in ScaleData(): image

We added this line (122) of code to src/Celligner_methods.R and it seems to solve the problem: image

Is this the correct way to prevent the error from triggering?

Many thanks.

xushiabbvie commented 1 month ago

Hi, we already reference the src/Celligner_methods.R in the script at line 10 'source("src/Celligner_methods.R")'. This line will run src/Celligner_methods.R for you. It seems that you skip this line or getting errors running this. You can either run this line or run src/Celligner_methods.R yourself. Thanks.

aambioinfo commented 1 month ago

Hi, yes, I run all the lines in the run_expression_alignment_TCGADEPMAP.R, including the source("src/Celligner_methods.R") and I got that error, but after adding seu_obj <- Seurat::NormalizeData(seu_obj) in line 122 in src/Celligner_methods.R, the problem was solved. My question was if this line should be added to the original code to solve the issue. Thanks.

xushiabbvie commented 1 month ago

No, if you run source("src/Celligner_methods.R"), then every line in source("src/Celligner_methods.R") should be executed already.

ajaybabu27 commented 1 week ago

@xushiabbvie, @aambioinfo was right. You need to add seu_obj <- Seurat::NormalizeData(seu_obj) in line 122 in src/Celligner_methods.R for run_expression_alignment_TCGADEPMAP.R code to work without errors. As @aambioinfo asked is this a right of line of code to add or did you have something else on your end ?

xushiabbvie commented 1 week ago

Hi @ajaybabu27 and @aambioinfo , thank you for trying our code. I did test on my end but it works with no errors. I think this may be related to newer Seurat version. Can you let me know which version are you using?

ajaybabu27 commented 1 week ago

The version I am using is Seurat_5.0.1

aambioinfo commented 1 week ago

The version I am using is Seurat 5.1.0

xushiabbvie commented 1 week ago

I think the error comes from Seurat v5. The version I am using is Seurat 4.4.0. If you would like to use Seurat v5 for this analysis, you can add the line @aambioinfo suggested. Thank you for checking out!