单细胞工具箱|Cell Ranger-V6.0 开启单细胞之旅(上)

简介: 单细胞工具箱|Cell Ranger-V6.0 开启单细胞之旅(上)


Cell Ranger是一个10X genomics公司的单细胞分析软件,将原始的fastq文件生成后续分析的feature-barcode表达矩阵。

其中包括很多模块,本次主要介绍cellranger mkfastq、cellranger count,cellranger aggr 和 cellranger reanalyze四个功能模块。



一 Cell Ranger下载安装

1.1 下载

进入cellranger官网(https://support.10xgenomics.com/)后,发现支持的分析模块有很多,先介绍单细胞转录组。选择单细胞转录组模块,点击进入

软件-下载-选择你想要的cellranger版本,


1)curl ,wget 和 直接网页下载,三种方式均可;

2)记得下载注释文件

3)注意查看md5值(很重要)


1.2 安装

Step1:解压下载的软件安装包

#进入文件存放的位置,示例为opt
$ cd /opt
#解压
$ tar -xzvf cellranger-6.0.1.tar.gz
解压缩到一个名为cellranger-6.0.1的新目录,包含Cell Ranger及其依赖项和Cell Ranger脚本。
Step2:同样的方式解压参考文件
$ tar -xzvf refdata-gex-GRCh38-2020-A.tar.gz
Step3:配置环境
将Cell Ranger目录添加到$PATH中,注意路径要准确,示例为/opt ,
$ export PATH=/opt/cellranger-6.0.1:$PATH

为使用方便可以添加到.bashrc文件中。


1.3 测试安装

可以查看一下版本和帮助,或者参考官网的Site Check Script 的方式。

cellranger -V

cellranger -h



二 mkfastq模块

cellranger使用mkfastq功能来拆分Illumina 原始数据(raw base call (BCL)),输出 FASTQ 文件。


2.1 下载示例数据

点击下载即可

2.2 Running mkfastq with a Simple CSV Samplesheet

1)首先示例矩阵数据解压缩,当前目录下生成cellranger-tiny-bcl-1.2.0文件夹

tar -xvzf cellranger-tiny-bcl-1.2.0.tar.gz

2)Simple CSV Samplesheet文件

格式:三列(Lane、Sample、Index),逗号分隔,不太容易出现格式错误。示例数据cellrangerver -tiny-bcl-simple-1.2.0.csv如下:

Lane,Sample,Index
1,test_sample,SI-TT-D9


Lane

Which lane(s) of the flowcell to process. Can be either a single lane, a range (e.g., 2-4) or '*' for all lanes in the flowcell.

Sample

The name of the sample. This name is the prefix to all the generated FASTQs, and corresponds to the --sample argument in all downstream 10x pipelines.
Sample names must conform to the Illumina bcl2fastq naming requirements. Only letters, numbers, underscores and hyphens area allowed; no other symbols, including dots (".") are allowed.

Index

The 10x sample index that was used in library construction, e.g., SI-TT-D9 or SI-GA-A1

3)run mkfastq

需要安装且配置bcl2fastq软件

$ cellranger mkfastq --id=cellranger-tiny-bcl-1.2.0 \
                     --run=/path/to/cellranger-tiny-bcl-1.2.0 \
                     --csv=cellranger-tiny-bcl-simple-1.2.0.csv
id :即为解压后的文件夹名字
run:为解压后的文件夹的绝对路径

在id名的新文件夹中既有生成的fastq文件了,可以用于后续的count分析。


三 count 模块

此处使用转录组数据进行count分析,通过fastq文件得到细胞和基因的定量结果。

3.1 必要参数

$ cellranger count --id=sample345 \
                   --transcriptome=/opt/refdata-gex-GRCh38-2020-A \
                   --fastqs=/home/jdoe/runs/HAWT7ADXX/outs/fastq_path \
                   --sample=mysample \
                   --expect-cells=1000 \
--id= 名称
--fastqs= fastq.gz文件保存的绝对路径
--sample= fastq.gz文件名"-"之前的字段
--transcriptome= 参考基因组路径
--expect-cells= 期望细胞数(可选)


3.2 参数列表

参数详细介绍详见:

https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/count#args中的Command-Line Argument Reference 部分

可以注意下以下参数:

--expect-cells

(optional) Expected number of recovered cells. Default: 3,000 cells.

和实验匹配

--nosecondary

(optional) Add this flag to skip secondary analysis of the feature-barcode matrix (dimensionality reduction, clustering and visualization). Set this if you plan to use cellranger reanalyze or your own custom analysis.

仅获得表达矩阵,不进行后续的降维,聚类和可视化分析

--chemistry

(optional) Assay configuration. NOTE: by default the assay configuration is detected automatically, which is the recommended mode. You should only specify chemistry if there is an error in automatic detection. Select one of:

  • auto for auto-detection (default),
  • ...


3.3 结果文件

结果文件列表以及简要描述说明

File Name

Description


web_summary.html

Run summary metrics and charts in HTML format

网页简版报告以及可视化

metrics_summary.csv

Run summary metrics in CSV format


possorted_genome_bam.bam

Reads aligned to the genome and transcriptome annotated with barcode information


possorted_genome_bam.bam.bai

Index for possorted_genome_bam.bam


filtered_feature_bc_matrix

Filtered feature-barcode matrices containing only cellular barcodes in MEX format. (In Targeted Gene Expression samples, the non-targeted genes are not present.)

过滤掉的barcode信息

filtered_feature_bc_matrix_h5.h5

Filtered feature-barcode matrices containing only cellular barcodes in HDF5 format. (In Targeted Gene Expression samples, the non-targeted genes are not present.)

过滤掉的barcode信息HDF5 format;


raw_feature_bc_matrices

Unfiltered feature-barcode matrices containing all barcodes in MEX format

原始barcode信息

raw_feature_bc_matrix_h5.h5

Unfiltered feature-barcode matrices containing all barcodes in HDF5 format

原始barcode信息HDF5 format

analysis

Secondary analysis data including dimensionality reduction, cell clustering, and differential expression


molecule_info.h5

Molecule-level information used by cellranger aggr to aggregate samples into larger datasets


cloupe.cloupe

Loupe Browser visualization and analysis file

Loupe Cell Browser 输入文件

feature_reference.csv

(Feature Barcode only) Feature Reference CSV file


target_panel.csv

(Targeted GEX only) Targed panel CSV file




相关文章
如何用vcftools从VCF文件中提取某条染色体信息
如何用vcftools从VCF文件中提取某条染色体信息
|
存储 数据可视化 算法
空间单细胞|基于图像的空间数据分析(2)
空间单细胞|基于图像的空间数据分析(2)
1274 0
|
存储 数据挖掘 Python
单细胞 轨迹分析 教程(长文+代码)
单细胞 轨迹分析 教程(长文+代码)
1069 10
单细胞 轨迹分析 教程(长文+代码)
|
12月前
|
机器学习/深度学习 并行计算 文件存储
机器学习超参数调优:十个实用的贝叶斯优化(Bayesian Optimization)进阶技巧
贝叶斯优化虽强大,但直接使用常面临收敛慢、计算贵等问题。本文总结十大实战技巧:引入先验加速冷启动,动态调整采集函数打破平台期,对数变换处理量级差异,避免超-超参数过拟合,成本感知抑制资源浪费,混合随机搜索提升鲁棒性,并行化利用多GPU,正确编码类别变量,约束无效区域,以及集成代理模型降方差。结合这些策略,让BO更智能、高效,真正发挥超参调优潜力。
1153 12
机器学习超参数调优:十个实用的贝叶斯优化(Bayesian Optimization)进阶技巧
|
数据可视化 Ubuntu 数据挖掘
linux中使用R语言
R语言是一种专用于统计计算和数据分析的编程语言,以其强大的数据处理能力和丰富的可视化功能著称。在Linux中安装R非常简单,通过`sudo apt install r-base`即可完成。R支持基本数据分析和复杂的数据可视化,如使用ggplot2包绘制精美图形。此外,R还能生成甘特图等项目管理工具,帮助清晰展示项目进度。无论是数据处理还是可视化,R都表现出色,适合各种数据分析任务。
998 3
|
弹性计算 Prometheus 运维
一文详解阿里云可观测体系下标签最佳实践
在当今数字化转型加速的时代,企业 IT 系统的复杂度与日俱增,如何高效地管理和监控这些系统成为了一项挑战。阿里云作为全球领先的云计算服务商,提供了一整套全面的可观测性解决方案,覆盖从业务、端侧(小程序、APP、H5 等)、应用、中间件、容器/ECS 等全栈的监控体系,旨在帮助企业构建强大而灵活的可观测性体系。其中,标签(Tag)作为一种核心组织和管理手段,在阿里云可观测体系中扮演着至关重要的角色。本文将深入探讨阿里云可观测系列产品中标签的应用,以及如何运用标签在阿里云可观测产品体系下进行体系化建设并给出相关最佳实践。
1671 218
|
数据可视化 关系型数据库 数据挖掘
scRNA分析|一(尽)文(力)解决你的单细胞火山图问题
scRNA分析|一(尽)文(力)解决你的单细胞火山图问题
2481 0
|
缓存 负载均衡 Dubbo
SpringCloud Gateway 在微服务架构下的最佳实践
SpringCloud Gateway 在微服务架构下的最佳实践
3847 133
|
网络架构
直通网线的标准颜色顺序
【8月更文挑战第5天】
3582 2
直通网线的标准颜色顺序
|
数据采集 数据可视化 数据挖掘
使用R语言进行主成分分析(PCA)
【4月更文挑战第26天】本文介绍了如何使用R语言进行主成分分析(PCA),包括安装必要包`stats`、`FactoMineR`和`factoextra`,数据预处理如标准化,使用`PCA()`函数执行PCA,以及通过`summary()`、`fviz_pca_ind()`和`fviz_pca_var()`进行结果解读和可视化。此外,还讨论了如何通过载荷系数解释主成分,强调PCA在数据降维和探索数据结构中的作用。
1835 1