HelenaLC / CATALYST

Cytometry dATa anALYsis Tools
66 stars 30 forks source link

Combining several SCE elements into one #373

Closed MargolinGaby closed 9 months ago

MargolinGaby commented 9 months ago

Hello Helena, please kindly suggest the optimal way to combine several SCE objects (cell populations) into one SCE object. I have subset 13 cell populations from original SCE object created from CYTof into 13 SCE objects. I have cleaned them. Now I would like to combine / merge them back into one SCE object.

I tried to combine them using cbind, but got the following ERROR :

sce3test <- cbind(sce05C_B_cells, sce05C_CD16_mDCs) Error in FUN(X[[i]], ...) : column(s) 'marker_class' in ‘mcols’ are duplicated and the data do not match

I couldn't attach here RDS files so I zipped few of them. Output.zip please advise how to solve this error or use different option. your prompt reply is highly appreciated Gaby

MargolinGaby commented 9 months ago

I assume that the error is due the difference of type and state markers in each of 13 clusters, I'll try to redefine it to be as original

HelenaLC commented 9 months ago

Yeah, I think you got it - simply setting rowData(sce)$marker_class <- NULL on all SCEs, combining them, and resetting the slot should solve it.

MargolinGaby commented 9 months ago

Yes, I did it and now, I have a new error while cbind()..:

Error in FUN(X[[i]], ...) : column(s) 'used_for_clustering' in ‘mcols’ are duplicated and the data do not match, in this case shall I set rowData(sce)$used_for_clustering <- NULL ( or FALSE)?

thank you so much for your prompt reply

On Tue, Oct 31, 2023 at 2:03 PM Helena L. Crowell @.***> wrote:

Yeah, I think you got it - simply setting rowData(sce)$marker_class <- NULL on all SCEs, combining them, and resetting the slot should solve it.

— Reply to this email directly, view it on GitHub https://github.com/HelenaLC/CATALYST/issues/373#issuecomment-1787085509, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7JIUBYJF6UNUUSIJTFGGF3YCDSHRAVCNFSM6AAAAAA6XQ2SGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBXGA4DKNJQHE . You are receiving this because you authored the thread.Message ID: @.***>

MargolinGaby commented 9 months ago

Helena, thank you so much!!! Gaby

solved it by defining a logical vector for type markers which are used for clusterization:

used_for_clust<-c(1,1,1,1,0,1,1,0,1,1,0,0,0,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0) used_for_clust <- as.logical(used_for_clust) rowData(sce05C_B_cells)$used_for_clustering <- used_for_clust

On Tue, Oct 31, 2023 at 3:25 PM Gaby Margolin @.***> wrote:

Yes, I did it and now, I have a new error while cbind()..:

Error in FUN(X[[i]], ...) : column(s) 'used_for_clustering' in ‘mcols’ are duplicated and the data do not match, in this case shall I set rowData(sce)$used_for_clustering <- NULL ( or FALSE)?

thank you so much for your prompt reply

On Tue, Oct 31, 2023 at 2:03 PM Helena L. Crowell < @.***> wrote:

Yeah, I think you got it - simply setting rowData(sce)$marker_class <- NULL on all SCEs, combining them, and resetting the slot should solve it.

— Reply to this email directly, view it on GitHub https://github.com/HelenaLC/CATALYST/issues/373#issuecomment-1787085509, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7JIUBYJF6UNUUSIJTFGGF3YCDSHRAVCNFSM6AAAAAA6XQ2SGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBXGA4DKNJQHE . You are receiving this because you authored the thread.Message ID: @.***>

MargolinGaby commented 8 months ago

Dear Helena, Can you please kindly reply to me on the open issue #374? thank you, Gaby

On Tue, Oct 31, 2023 at 3:46 PM Helena L. Crowell @.***> wrote:

Closed #373 https://github.com/HelenaLC/CATALYST/issues/373 as completed.

— Reply to this email directly, view it on GitHub https://github.com/HelenaLC/CATALYST/issues/373#event-10821142278, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7JIUB67DBV53S5KQLNBSVLYCD6MBAVCNFSM6AAAAAA6XQ2SGCVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQHAZDCMJUGIZDOOA . You are receiving this because you authored the thread.Message ID: @.***>