美文网首页
单细胞数据挖掘1-bam-fastq-matrix

单细胞数据挖掘1-bam-fastq-matrix

作者: 大吉岭猹 | 来源:发表于2020-05-03 23:10 被阅读0次

1. 写在前面

  • 数据集介绍
    • 测了 LK 和 LSK 细胞的 scRNA-seq,但是作者定义 LK 的方法比较奇怪,之后会把“LK”中 sca-1 阳性的细胞去掉
  • 由于作者只提供 bam 和表达矩阵,我们想自己做基于 cellranger 结果的质控就必须先 bam 转 fq,再跑 cellranger count

2. bam-fastq

  • 使用 10X 开发的工具 bamtofastq
  • 代码
ls bam/Lin*bam | while read id;
do
    tmp1=${id%_*}
    tmp2=${tmp1%_*}
    tmp3=${tmp2%_*}
    sample=${tmp3##*_}
    echo $sample

    bamtofastq-1.2.0 --nthreads=24 $id out_${sample}
done
  • 另附曾老师的杂技代码,把上面愚蠢的 4 行代码变成 1 行
a=a_b_c_d
echo $a
b=`echo $a|cut -d"_" -f 3`
echo $b
  • 输出结果是三个 bam 各生成了 48 个 fastq 文件

3. fastq-matrix

  • 10X 标准流程,cellranger count
  • 代码
cellranger count \
  --id=lk_cellranger_SIGAH1 \
  --transcriptome=/ref/cellranger/refdata-cellranger-mm10-3.0.0 \
  --fastqs=/new_lk/step01-bam-fastq-matrix/out_SIGAH1/SIGAH1_MissingLibrary_1_HHW22BBXX \
  --sample=bamtofastq \
  --nosecondary \
  --localcores=18 \
  --localmem=30
  • 三个标准输出文件位于总的输出文件夹下的 outs/filtered_feature_bc_matrix 路径
  • 如果要使用未经 cellranger 过滤的数据则使用 outs/raw_feature_bc_matrix 路径下的输出文件

友情宣传

相关文章

网友评论

      本文标题:单细胞数据挖掘1-bam-fastq-matrix

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