ValueError: Detected non-contiguous batches. #131
Unanswered
wangshuangyi
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Hi @wangshuangyi, this error happens if the batches are not contiguous, e.g., cells 1, 2, and 3 belong to batch A, B, and A, respectively. This could also happen if two of the batches actually have the same name. Could you check that cells belonging to the same batch are contiguous in the combined matrix? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @brianhie, many thanks for the great tool. However, I got a bit lost and hope you can help me out. I am trying to integrate some PBMC datasets from GEO and after preprocessing and adding batch information, an error is reported. I hope I can get your answer!
Traceback (most recent call last): File "/home/data/vip08/imap/big_scrna/pan_read_csv/scanorma/scanorama_46Wpbmc.py", line 12, in <module> sce.pp.scanorama_integrate(data, key = 'x') File "/home/data/vip08/miniconda3/envs/imap/lib/python3.7/site-packages/scanpy/external/pp/_scanorama_integrate.py", line 110, in scanorama_integrate raise ValueError('Detected non-contiguous batches.') ValueError: Detected non-contiguous batches.
data.obs['batch']
GSE138266/GSM4104134AGCTCCTGTGCTTCTC-1-12 batch6 GSE149689/ATGTCTTTCGATACTG-12-22 batch7 GSE178318GCTGCAGGTAGTAGTA_COL16_CRC-84 batch11 GSE96583/GSE96583_2_2/TTAGAATGCTCTTA-1-27 batch9 GSE178318CGTTCTGGTTAAGACA_COL16_CRC-84 batch11 ... GSE157278/TTGAACGGTGAGTGAC-6-10 batch4 GSE135779/GSE135779_sample_910/ATCATGGTCTACTTAC-1-42 batch10 GSE150861/CGAGAAGTCGAATGCT-2-0 batch1 GSE135779/GSE135779_sample_904/ATTACTCGTAAGTGGC-1-36 batch10 GSE135779/GSE135779_sample_927/GAGGTGAGTGATGATA-1-59 batch10
Name: batch, Length: 50449, dtype: category Categories (11, object): ['batch1', 'batch2', 'batch3', 'batch4', ..., 'batch8', 'batch9', 'batch10', 'batch11']
Beta Was this translation helpful? Give feedback.
All reactions