cellranger定量:one-library-multiple-flowcells.md 3.5 KB


title: cellranger定量:One Library, Multiple Flowcells tags: [] id: '2029' categories:

  • - uncategorized date: 2022-09-25 07:08:51 ---

If you have a library which was sequenced across multiple flowcells, you can pool the reads from both sequencing runs. Follow the steps in Running Multi-Library Samples to combine them in a single cellranger count run.

重命名R1、R2

My FASTQs are not named like any of the above examples. It is likely that you received files that were processed through a proprietary LIMS system, which employs its own naming conventions.

10x pipelines need files named in the bcl2fastq or demux convention in order to run properly. You will need to determine which file corresponds to which sample and which read type, likely by consulting your sequencing core or the individual who demultiplexed your flowcell.

It is highly likely that these files were initially processed with bcl2fastq, so you will need to rename the files in the following format, once you track down their origin:

[Sample Name]_S1_L00[Lane Number]_[Read Type]_001.fastq.gz

Where Read Type is one of:

  • I1: Sample index read (optional)
  • I2: Sample index read (optional)
  • R1: Read 1
  • R2: Read 2

After you have renamed those files into that format, you'll use the following arguments:

Situation

Argument+Value

All samples

--fastqs=/PATH/TO/PROJECT_FOLDER

Process SAMPLENAME from all lanes

--fastqs=/PATH/TO/PROJECT_FOLDER \
--sample=SAMPLENAME

Process SAMPLENAME from lane 1 only

--sample=SAMPLENAME \
--fastqs=/PATH/TO/PROJECT_FOLDER \
--lanes=1

重命名前

├── SRR12391722
│ ├── SRR12391722_1.fastq.gz
│ └── SRR12391722_2.fastq.gz
├── SRR12391723
│ ├── SRR12391723_1.fastq.gz
│ └── SRR12391723_2.fastq.gz
├── SRR12391724
│ ├── SRR12391724_1.fastq.gz
│ └── SRR12391724_2.fastq.gz
└── SRR12391725
│├── SRR12391725_1.fastq.gz
│└── SRR12391725_2.fastq.gz

重命名后

SRX8890106
├── SRX8890106_S1_L001_R1_001.fastq.gz
├── SRX8890106_S1_L001_R2_001.fastq.gz
├── SRX8890106_S1_L002_R1_001.fastq.gz
├── SRX8890106_S1_L002_R2_001.fastq.gz
├── SRX8890106_S1_L003_R1_001.fastq.gz
├── SRX8890106_S1_L003_R2_001.fastq.gz
├── SRX8890106_S1_L004_R1_001.fastq.gz
└── SRX8890106_S1_L004_R2_001.fastq.gz

进行定量

Running cellranger count; cellranger 安装

#!/bin/bash
export PATH=/opt/cellranger/cellranger-6.1.2:$PATH
db=/opt/cellranger/refdata-gex-GRCh38-2020-A
data=/home/jovyan/work_st/sce/GSE137829/data
work=/home/jovyan/work_st/sce/GSE137829/res
mkdir $work
cd $work
for sample in ${data}/*;
do
echo $sample
sample_res=${sample##*/}
cellranger count --id=$sample_res \
--localcores=12 \
--transcriptome=$db \
--fastqs=$sample \
--sample=$sample_res \
--expect-cells=5000
done
  • nano 103.sh
  • chmod +x 103.sh
  • ./103.sh