in cellranger multi how to set sample section with barcode-sample-assignment

3 min read 02-09-2025
in cellranger multi how to set sample section with barcode-sample-assignment


Table of Contents

in cellranger multi how to set sample section with barcode-sample-assignment

Setting Sample Sections in Cell Ranger Multi with Barcode-Sample-Assignment

Cell Ranger Multi's ability to process multiple samples simultaneously hinges on accurately assigning barcodes to their respective samples. This is crucial for downstream analysis and interpretation of your single-cell RNA sequencing data. The barcode-sample-assignment file is the key to this process. Let's explore how to effectively create and use this file to define sample sections within your Cell Ranger Multi run.

What is the barcode-sample-assignment file?

The barcode-sample-assignment file is a tab-separated values (TSV) file that maps barcodes to specific samples. Each line in the file represents a single sample and its associated barcodes. The file typically has two columns:

  • barcode: This column contains the barcode sequences, often 10x Genomics cell barcodes. These are the unique identifiers for individual cells.
  • sample: This column indicates the sample name to which the barcode belongs. This name should correspond to the sample names used in your sequencing data's file organization.

How to create the barcode-sample-assignment file?

Creating this file depends heavily on your experimental design and how you prepared your samples for sequencing. Here's a breakdown of common scenarios:

  • Individual libraries for each sample: If you prepared a separate library for each sample, the barcode-sample-assignment is straightforward. Each barcode within a specific library belongs to that sample. You can create the file manually in a spreadsheet program like Excel or Google Sheets, or you might generate it through a custom script using the output from your library preparation process. For example:
barcode	sample
AAACCTGAGTACGAA	Sample1
AAACCTGCATGTATT	Sample1
AAACGGGAGTCGCGT	Sample2
AAACGGGTCCGCATT	Sample2
...	...
  • Multiplexed libraries: If you multiplexed samples within a single library, you need a way to distinguish the barcodes belonging to each sample. This usually involves incorporating sample-specific indices or barcodes during library preparation. The information to create the barcode-sample-assignment file will then come from the experimental design and library preparation protocol. You'll likely need a script or analysis pipeline to create the association between barcodes and sample identities, especially if you have a large number of samples and barcodes.

  • Using 10x Genomics' recommended procedures: 10x Genomics provides detailed instructions and potentially scripts to handle multiplexing scenarios for each of their platforms. Refer to the specific Cell Ranger documentation for your chosen platform and experimental protocol.

How to use the barcode-sample-assignment file with Cell Ranger Multi?

Once you've created your barcode-sample-assignment.tsv file, you provide it as an argument to the Cell Ranger Multi count command:

cellranger multi count \
    --id=multisample_run \
    --transcriptome=/path/to/refdata-gex \
    --fastqs=/path/to/fastq/files \
    --sample=barcode-sample-assignment.tsv

Replace placeholders like /path/to/refdata-gex and /path/to/fastq/files with the appropriate paths to your reference transcriptome and FASTQ files, respectively.

What if I don't have a barcode-sample-assignment file?

If you don't have a barcode-sample-assignment file, Cell Ranger Multi cannot correctly distinguish between the different samples. You must create it for proper multiplexed sample analysis. Improper usage could lead to incorrect or meaningless downstream analyses.

Troubleshooting: Common Errors and Solutions

  • Incorrect file format: Ensure your barcode-sample-assignment.tsv file is a correctly formatted TSV file with the correct headers ("barcode" and "sample").
  • Mismatched barcodes: Verify that the barcodes in your file exactly match the barcodes in your sequencing data.
  • Typographical errors: Double-check for any typos in your sample names or barcodes.

By carefully creating and using the barcode-sample-assignment file, you can effectively leverage Cell Ranger Multi's capabilities to analyze multiple samples concurrently and accurately interpret your single-cell RNA sequencing data. Remember to consult the official Cell Ranger documentation for the most up-to-date instructions and best practices.