美文网首页
CellBender: 去除 RNA 污染

CellBender: 去除 RNA 污染

作者: LET149 | 来源:发表于2025-02-21 00:18 被阅读0次

1. Paper

Unsupervised removal of systematic background noise from droplet-based single-cell experiments using CellBender

https://www.nature.com/articles/s41592-023-01943-7

2. GitHub

https://github.com/broadinstitute/CellBender

安装:

创建 Conda 环境:conda create --name CellBender python=3.7
激活 Conda 环境:conda activate CellBender
Conda 环境中安装 Cellbenderpip install cellbender

3. 官网

https://cellbender.readthedocs.io/en/latest/


remove ambient (contaminative) RNA

使用:

https://cellbender.readthedocs.io/en/latest/usage/index.html

cellbender remove-background  \
    --input  \
    --output output.h5  \
    --expected-cells  \
    --total-droplets-included  \
    --cuda
    1. --input: the input .h5 文件;通常是 Cellranger 输出的 raw_feature_bc_matrix.h5
    1. --output: the name for the output
    1. --expected-cells: 预期捕获的细胞数量;大多数时间使用 Cellranger report 中的数值;示例中 位置对应的数值
    1. --total-droplets-included:超过这个数值便为 surely empty;示例中 位置对应的数值
    1. --cuda: with this flag, GPU will be used for calculation

结果解读:

https://cellbender.readthedocs.io/en/latest/tutorial/index.html
https://cellbender.readthedocs.io/en/latest/reference/index.html#loading-outputs

    1. output.h5: 去除 ambient RNAs,保留全部的 barcode 后的结果
    1. output_filtered.h5: 去除 ambient RNAs;The word “filtered” means that this file contains only the droplets which were determined to have a > 50% posterior probability of containing cells.

anndata_from_h5()

import cellbender as cbd

scanpy_object_output = cbd.remove_background.downstream.anndata_from_h5('/path/output.h5')
    1. output.h5 文件会被加载
    1. 只有 --total-droplets-included 这个数量的细胞会被保留(根据 UMI number 进行排序)
    1. .obs 中会有 cell_probability 一列,根据默认,只有这一列 >0.5 的细胞会被最终保留并作为最终分析的高质量细胞,这一结果保存在 output_filtered.h5
    1. 降维以后的数据存放在 .obs['gene_expression_encoding'],后续计算 KNNtSNE 可以

相关文章

网友评论

      本文标题:CellBender: 去除 RNA 污染

      本文链接:https://www.haomeiwen.com/subject/eyrpmdtx.html