I have tried the below code to try and get an assay from one object and placing it into another:
adt.data <- GetAssayData(object = atac.object[['peaks']], slot = 'data')
rna.object[["peaks"]] <- CreateAssayObject(data = adt.data )
but I get the error:
Error in '[[<-': Cannot add new cells with [[<-
Backtrace:
1.methods (local) '[[<-'('*tmp*', "peaks", value = '<Assay[,5532]>')
2. SeuratObject (local) '[[<-'('*tmp*, "peaks", value= '<Assay[,5532]>')
I have also tried :
rna.object[['peaks']] <- atac.object[['ATAC']]
but I receive the same error.
Does anyone have any suggestions? I believe I understand the error message itself but I have ran similar lines of code before and it has worked