Error in `[<-.data.frame`(`*tmp*`, col, value = c("KC33_AAACCCAAGTAGTCAA", : replacement has 76211 rows, data has 694321 Calls: read_reference -> read_adata -> read_df -> [<- -> [<-.data.frame
Hello! I am trying to use RCTD on python via the TACCO package wrapper. I have been running across this error which I haven't been able to solve on the TACCO github / python side, and I am wondering if you would have any insight as to what is going on.
I run this command: tc.tl.annotate( adata, reference, method='RCTD', conda_env="/opt/homebrew/Caskroom/miniconda/base/envs/tacco_env", annotation_key='v2.subclass.l2', result_key='v2.subclass.l2', assume_valid_counts=True, )
and I get this error:
Starting annotation of data with shape (65124, 300) and a reference of shape (694321, 300) using the following wrapped method:
+- multi center: multi_center=None multi_center_amplitudes=True
+- core: method=RCTD annotation_prior=None conda_env=/opt/homebrew/Caskroom/miniconda/base/envs/tacco_env
[1] "reference.h5ad" "data.h5ad" "result" "0"
[5] "14" "full" "v2.subclass.l2" "x"
[9] "y" "158.0"
[1] "reading data"
[1] "csr"
[1] "reading reference"
[1] "csr"
Attaching package: ‘SparseM’
The following object is masked from ‘package:Matrix’:
det
Error in [<-.data.frame(*tmp*, col, value = c("KC33_AAACCCAAGTAGTCAA", :
replacement has 76211 rows, data has 694321
Calls: read_reference -> read_adata -> read_df -> [<- -> [<-.data.frame
Execution halted
My reference object indeed has 694321 cells, but I'm not sure where the 76211 number is coming from. I have made sure that there are no NAs, all cells are unique, etc. I am using raw counts for both reference and adata (it is a xenium anndata object, one sample only). Any help would be greatly appreciated!
Apologies -- I don't have experience working with the python version of RCTD. I would encourage you to contact the developers. If you are having trouble getting a response, you can also email me at [email protected] . I am happy to email the TACCO developers on your behalf.
If you are experiencing a similar issue in the R version of RCTD, I can take a deeper look.