0
$\begingroup$

I'm working with cellranger count to annotate some publicly available fastq files (SRX7888073). For each sample, 4 runs are available, which I assume represent technical replicates.

How do you recommend to handle them in cellranger? Are they 4 different samples (i.e. 4 separate runs), or 1 sample with 4 lanes?

Thank you !

$\endgroup$
2
  • 1
    $\begingroup$ Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. $\endgroup$
    – Community Bot
    Jun 8, 2023 at 16:32
  • $\begingroup$ Welcome @David, nice you joined us. It could be helpful if you could point to the information on the site, ie. "Male 3; Schistosoma mansoni; RNA-Seq". Thats kinda key, clicking offsite links to answer questions is sort of discouraged. The actual experimental details will be explained on the site ... $\endgroup$
    – M__
    Jun 8, 2023 at 16:38

3 Answers 3

3
$\begingroup$

It depends what you mean by "technical replicates". If it is the exact same library prep spread out over two lanes, or two flowcells, they must be combined at the fastq stage. Cellranger will naturally do this with fastqs that keep their original Illumina-assigned names, but just have the files split by lane.

If one file has a read from a gene with a particular cell barcode and UMI, and another read in a separate file but the same library prep has a read from the same gene, with the same barcode and same UMI, those two must not be both counted. So if you combine the counts, that's wrong.

A NextSeq naturally has 4 lanes, so that's almost certainly what you are looking at. The read names would confirm that, unless they've been altered. Cat them all together, or alter their names so that they match the original Illumina specs with lanes 1-4. You might have to do that anyway, cellranger used to be very picky about that, and might still be.

$\endgroup$
1
  • $\begingroup$ Agreed on all of that. If you alter names though then furst make a new folder, symlink files into that and alter the symlink names. Don't alter names of actual files, that's error-prone. $\endgroup$
    – ATpoint
    Jun 11, 2023 at 16:44
2
$\begingroup$

If they are truly technical replicates in the most specific sense (e.g. from the same extraction and library prep, just split up for sequencing), then the counts for each identified cell can be combined (i.e. added together). One way to do this is to concatenate the files prior to running any data processing scripts.

If there is anything different about the runs, then they should be treated as non-technical replicates and properly integrated:

https://satijalab.org/seurat/articles/integration_rpca.html

We had a situation with Rhapsody single cell data where a library was split into three on three different cell barcode plates, and was showing a small amount of library preparation bias that influenced clustering. Carrying out an integration of the libraries helped to reduce this bias.

$\endgroup$
1
  • 1
    $\begingroup$ Catting the fastqs will not be the same as combining the counts. If the catted fastqs are processed by cellranger, deduplication will be handled properly. If the fastqs are processed separately, you will overcount, because duplicates between runs will not be accounted for. $\endgroup$
    – swbarnes2
    Jun 9, 2023 at 17:03
0
$\begingroup$

After some digging, it seems like each of the 4 runs has I1, R1 and R2 files - they're replicates.

You can either

  1. run them separately and then perform cellranger aggr; or
  2. link to all 12 files using soft-links that follow a proper naming convention (the files need to have the same prefix, lane numbers need to be different per replicate), ensure all softlinks are in the same directory, then use the directory with cellranger count.

I'd recommend the former approach as it will probably save a little compute time, is parallelize-able and will be easier to debug/drill down into.

$\endgroup$
1
  • 2
    $\begingroup$ using cell aggr is totally wrong If you had 4 different samples, it would be a coincidence if some of them happened to have the same barcode, and the right thing to do would be to treat those as two separate cells. With this, if the same cell barcode turns up in each lane, it's actually the same cell, and they should be combined. $\endgroup$
    – swbarnes2
    Jun 9, 2023 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.