10XGenomics / cellranger

10x Genomics Single Cell Analysis
https://www.10xgenomics.com/support/software/cell-ranger
Other
340 stars 91 forks source link

cellranger aggr combined two files' data? #182

Closed aryan-dugar2 closed 2 years ago

aryan-dugar2 commented 2 years ago

I recently ran cellranger aggr on 11 samples. My command was, cellranger aggr --id=aggr_data2 --csv=newdata.csv wherenewdata.csv was formatted as below (notice that sample5 and sample7 are missing, so I have a total of 11 samples). The following processing took place on R using Seurat.

After importing the files with the command Read10X on Seurat, I was correlating the label at the end of the barcodes "ATXXXXXXXXX-D"" to the number of samples, and found that I only have 10 values for D: {0,1,2,...9}.

What I noticed was that sample 1 got D = 1, sample 2 got D = 2 and so on until sample 11 got D = 9. However, sample 12 got D = 0 and sample 13 got D = 1. What I expected was that there should be 11 distinct values for D - however, I only got 10, with 1 of the values being shared amongst cells from two distinct samples. (I did this using the summary.json file generated by the aggr function - which shows the number of cells that made it into the output file for each sample I put in. So, what I did was count the occurences of each value of D, and correlate those with the number of cells obtained from each sample.)

Moreover, there were some barcodes shared amongst sample1 and sample13, and these seemed to have been collapsed onto one in the aggr output. My conjecture is that sample13 overwrote sample1 wherever the barcodes overlapped.

I'm now manually sorting the samples with R, but I wanted to raise this issue in case there is a workaround.

sample_id,molecule_h5
sample1,sample1_outs/outs/molecule_info.h5
sample2,sample2_outs/outs/molecule_info.h5
sample3,sample3_outs/outs/molecule_info.h5
sample4,sample4_outs/outs/molecule_info.h5
sample6,sample6_outs/outs/molecule_info.h5
sample8,sample8_outs/outs/molecule_info.h5
sample9,sample9_outs/outs/molecule_info.h5
sample10,sample10_outs/outs/molecule_info.h5
sample11,sample11_outs/outs/molecule_info.h5
sample12,sample12_outs/outs/molecule_info.h5
sample13,sample13_outs/outs/molecule_info.h5
aryan-dugar2 commented 2 years ago

Resolved