> For the complete documentation index, see [llms.txt](https://zpliu.gitbook.io/booknote/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zpliu.gitbook.io/booknote/cell-ranger/dan-ge-yang-ben-de-fen-xi.md).

# single sample Analysis

## 大致流程主要分为以下几步

1. `cellranger mkfastq`将下机数据转换为fastq数据格式
2. 使用`cellranger count`将单个通道**GEM well**的fastq数据进行分析
3. 如果一个样品在多个通道中进行了测序，还可以选择`cellranger aggr`将多个通道的数据进行聚合生成单个样品的数据
4. 最后如果需要的话可以使用`cellranger reanalyze`对**libraries**中的数据进行重新分析例如 **PCA t-SNE clustering** 等主要是对参数进行一些微调

## 1. `cellranger mkfastq`

这里就不做详细的介绍，因为公司返回的数据经过处理了已经是fastq的格式了，不过需要注意的是，在进行`cellranger count`分析时，对fastq文件的命名有一定的要求

**e.g. SampleName\_S1\_L001\_R1\_001.fastq.gz**

**SampleName\_S1\_L001\_R2\_001.fastq.gz**

## 2.`cellranger count`

最主要的就一下几个参数

* \--id 指定输出文件夹的名字
* \--transcriptome 指定参考基因组的路径
* \--sample 指定需要处理的fastq文件的前缀
* \--expect-cell=1000 指定预期的细胞数目
* \--localcores 指定计算的核心数
* \--mempercore 指定内存大小 GB

基本的命令格式

```bash
cellranger count --id=J668   --transcriptome=~/genome_data/Ghirsutum_genome_HAU_v1.1/cellranger_reference/Ghirsutum/ --fastqs=~/work/scRNA-seq/Rawdata/   --localcores=20  --sample=J668 --mempercore=20  --expect-cell=1000
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://zpliu.gitbook.io/booknote/cell-ranger/dan-ge-yang-ben-de-fen-xi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
