scCustomize icon indicating copy to clipboard operation
scCustomize copied to clipboard

Error Merge

Open eblchen opened this issue 1 year ago • 9 comments

Cannot merge Seurat object list get the following error:

entry.seurat <- Merge_Seurat_List(entry.list)
Error in names(model.list) <- all.levels : 
  attempt to set an attribute on NULL

Any pointers would be appreciated :)

eblchen avatar May 23 '24 16:05 eblchen

Can you post the output of traceback() after receiving the error?

Best, Sam

samuel-marsh avatar May 23 '24 17:05 samuel-marsh

Sure, thanks for helping with this!

> entry.seurat <- Merge_Seurat_List(entry.list)
Error in names(model.list) <- all.levels : 
  attempt to set an attribute on NULL
> traceback()
8: merge.SCTAssay(x = objects[[idx.x]][[assay]], y = lapply(X = objects[idx.y], 
       FUN = "[[", assay), labels = projects, add.cell.ids = NULL, 
       collapse = collapse, merge.data = merge.data)
7: merge(x = objects[[idx.x]][[assay]], y = lapply(X = objects[idx.y], 
       FUN = "[[", assay), labels = projects, add.cell.ids = NULL, 
       collapse = collapse, merge.data = merge.data)
6: merge.Seurat(x = x, y = y, merge.data = merge.data, project = project)
5: merge(x = x, y = y, merge.data = merge.data, project = project)
4: fn(out, elt, ...)
3: reduce_impl(.x, .f, ..., .init = .init, .dir = .dir)
2: reduce(list_seurat, function(x, y) {
       merge(x = x, y = y, merge.data = merge.data, project = project)
   })
1: Merge_Seurat_List(entry.list)
> 

eblchen avatar May 24 '24 08:05 eblchen

ok thanks.

What happens if you run:

merged <- merge(entry.list[[1]], entry.list[[2:length(x = entry.list)]])

Best, Sam

samuel-marsh avatar May 25 '24 13:05 samuel-marsh

Hi,

Just following up on my message from last week.

Best, Sam

samuel-marsh avatar May 30 '24 13:05 samuel-marsh

Hi Sam, Sorry it's taken a while to reply have been away! This was the result:

> merged <- merge(entry.list[[1]], entry.list[[2:length(x = entry.list)]])
Error in (function (cond)  : 
  error in evaluating the argument 'y' in selecting a method for function 'merge': subscript out of bounds

eblchen avatar May 31 '24 13:05 eblchen

no worries! Sorry this was my bad on previous code. Try running this (removed bracket):

merged <- merge(entry.list[[1]], entry.list[2:length(x = entry.list)])

Best, Sam

samuel-marsh avatar May 31 '24 15:05 samuel-marsh

Hi @eblchen,

No worries if you haven't had time but just following up on my previous post.

Best, Sam

samuel-marsh avatar Jun 06 '24 14:06 samuel-marsh

Hi Sam, Sorry only just got back from travelling!

> merged <- merge(entry.list[[1]], entry.list[2:length(x = entry.list)])
Error in names(model.list) <- all.levels : 
  attempt to set an attribute on NULL

This was the error. Thanks for your help with this!

eblchen avatar Jun 17 '24 10:06 eblchen

Hi @eblchen,

So sorry I've been in and out as well. So this tells me that the issue is coming from Seurat objects and not scCustomize. How many objects are in your list?

Best, Sam

samuel-marsh avatar Jul 03 '24 11:07 samuel-marsh

Hi @eblchen

Just checking in to see if this is still an issue or if I can close the issue?

Thanks!! Sam

samuel-marsh avatar Aug 22 '24 12:08 samuel-marsh

Hi Sam, Don’t think I solved it but found a workaround for now so happy to close the ticket sorry for not getting back to you sooner and thank you for all your help! Best wishes, Emilia

Emilia Chen | PhD Student

The Institute of Cancer Research | 15 Cotswold Road, Sutton, SM2 5NG T +442034376259 | E @.@.> | W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter @ICR_Londonhttps://twitter.com/ICR_London Facebook www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch

Making the discoveries that defeat cancer

[ICR Logo]http://www.icr.ac.uk/

From: Samuel Marsh @.> Sent: Thursday, August 22, 2024 1:21 PM To: samuel-marsh/scCustomize @.> Cc: Emilia Chen @.>; Mention @.> Subject: Re: [samuel-marsh/scCustomize] Error Merge (Issue #187)

CAUTION: This email originated from outside of the ICR. Do not click links or open attachments unless you recognize the sender's email address and know the content is safe.

Hi @eblchenhttps://github.com/eblchen

Just checking in to see if this is still an issue or if I can close the issue?

Thanks!! Sam

— Reply to this email directly, view it on GitHubhttps://github.com/samuel-marsh/scCustomize/issues/187#issuecomment-2304533536, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5QEA6CMWOZK3HLGAO3YIEDZSXJTPAVCNFSM6AAAAABIGBJDYSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBUGUZTGNJTGY. You are receiving this because you were mentioned.Message ID: @.***>

The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP.

This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network.

eblchen avatar Aug 22 '24 16:08 eblchen