心之所向 步履不停
UMI(Unique molecularidentifier)——特异性分子标签(UMI)为 8-10nt 的短序列,可看做“条形码”,在文库构建时通过连接接头引入UMI标签连接到cDNA分子中,标记原始样品中的每个分子,对同一来源扩增产物进行追踪和最终提取分组,用于排除 PCR 扩增偏好性和测序偏好性引入的定量偏差,便于获得足够的读数以进行分析。
UMI-RNAseq技术是利用高通量测序技术在文库构建时引入特异性分子标签UMI,通过计数 UMI 的个数,我们便可以对原始的 RNA 分子进行“绝对定量”。
UMI绝对定量示意图
传统 RNA-seq 定量分析是存在一定缺陷的,不可避免的会有duplication的产生。Dup的产生固然有天然重复序列的原因,但更主要的是PCR扩增偏好性和不均匀性所致。从而导致定量与真实值存在偏差,为了纠正二代测序过程中带来的系统偏差,从而发展出了UMI-RNAseq。
原理及优势
建库流程
P5
- Rd1 SP
- UMI
- cDNA insert
- Rd2 SP
- index
- P7
。】分析流程
首先是确定测序数据的文库信息,比如示例用到的文库是:
文库信息示例
Read 2 的前 8 个碱基是 UMI,随后是 3 个碱基的连接子和 3 个碱基的非模板添加序列,之后才是真正的转录本序列。
原始数据QC检查
vim st1_r2_8nt_extract.sh
#! /bin/bash -xe
#
biosoft=/home/username/miniconda3/envs/scRNA/bin/umi_tools
project=/home/username/project/umi_rnaseq/r2_umi_8bp
outdir=${project}/st1_extract
Log=${project}/st0_log
fq1=$1
fq2=$2
id=$3
if [ ! -d ${outdir} ];
then mkdir -p ${outdir}
fi
/usr/bin/time -v ${biosoft} extract --extract-method=string \
--bc-pattern=NNNNNNNN \
--stdin ${fq2} \
--read2-in ${fq1} \
--stdout ${outdir}/${id}_extract_2.fastq.gz \
--read2-out ${outdir}/${id}_extract_1.fastq.gz 1>${Log}/st1_${id}_extract.log 2>&1
QC检查
使用trim_galore 去除R2的连接子和添加序列
vim st2_trim_cut6nt.sh
#! /bin/bash -xe
#
biosoft=/home/username/miniconda3/envs/RNAseq/bin/trim_galore
project=/home/username/project/umi_rnaseq/r2_umi_8bp
outdir=${project}/st2_clean_cut6nt_data
Log=${project}/st0_log
fq1=$1
fq2=$2
id=$3
if [ ! -d ${outdir} ];
then mkdir -p ${outdir}
fi
/usr/bin/time -v ${biosoft} -q 28 --phred33 --length 30 --max_n 3 \
--stringency 3 --paired --clip_R2 6 --gzip --cores 4 \
-o ${outdir} \
${project}/st1_extract/${id}*.gz 1>${Log}/st2_${id}_trim.log 2>&1
##参数释义
--clip_R2 <int> #用于 双端测序(paired-end)的专用参数,作用是从 read2 的 5' 端(起始端) 剪切掉指定数量(<int>)的碱基。这是专门针对双端测序中 reads2 的建库引入序列的操作
QC检查
vim st3_hisat2_cut6nt.sh
#! /bin/bash -xe
#
biosoft=/home/username/miniconda3/envs/RNAseq/bin/hisat2
index=/home/username/reference/human/GRCh38/hisat2_indx/GRCh38_genome
project=/home/username/project/umi_rnaseq/r2_umi_8bp
fqdir==${project}/st2_clean_cut6nt_data
outdir=${project}/st3_hisat_cut6nt_outs
Log=${project}/st0_log
fq1=$1
fq2=$2
id=$3
if [ ! -d ${outdir} ];
then mkdir -p ${outdir}
fi
/usr/bin/time -v ${biosoft} -p 4 \
-x ${index} \
-1 ${fq1} \
-2 ${fq2} 2>${Log}/st3_${id}_cut6nt_hisat2.log | samtools sort -@ 2 -o ${outdir}/${id}.sort.bam 1>${Log}/st3_${id}_cut6nt_samsort.log 2>&1
提交任务:
##提交
ls ${PWD}/{1..9}*1.fq.gz |paste - <(ls ${PWD}/{1..9}*2.fq.gz) <(ls {1..9}*1.fq.gz|cut -d "_" -f 1,2) > ../st3_hisat2_cut6nt_config.txt
screen -r r2
cat st3_hisat2_cut6nt_config.txt |xargs -iF -P 10 sh -c 'bash st3_hisat2_cut6nt.sh F'
比对结果
$grep "overall alignment" st3*cut6nt_hisat2.log
st3_10_S31_cut6nt_hisat2.log:90.66% overall alignment rate
st3_1_S22_cut6nt_hisat2.log:90.51% overall alignment rate
st3_2_S23_cut6nt_hisat2.log:91.23% overall alignment rate
st3_3_S24_cut6nt_hisat2.log:86.22% overall alignment rate
st3_4_S25_cut6nt_hisat2.log:89.86% overall alignment rate
st3_5_S26_cut6nt_hisat2.log:91.30% overall alignment rate
st3_6_S27_cut6nt_hisat2.log:92.39% overall alignment rate
st3_7_S28_cut6nt_hisat2.log:91.02% overall alignment rate
st3_8_S29_cut6nt_hisat2.log:93.67% overall alignment rate
st3_9_S30_cut6nt_hisat2.log:92.92% overall alignment rate
##结果bam文件大小
$ls -lha *.bam |cut -d " " -f 5-
3.0G 4月 29 16:30 10_S31.sort.bam
3.4G 4月 29 16:31 1_S22.sort.bam
4.5G 4月 29 16:45 2_S23.sort.bam
4.7G 4月 29 16:49 3_S24.sort.bam
4.0G 4月 29 16:41 4_S25.sort.bam
6.0G 4月 29 17:03 5_S26.sort.bam
4.5G 4月 29 16:42 6_S27.sort.bam
3.9G 4月 29 16:37 7_S28.sort.bam
3.4G 4月 29 16:32 8_S29.sort.bam
2.1G 4月 29 16:21 9_S30.sort.bam
相比于Bulk转录组区别的关键步骤
vim st4_umi_cut6nt_dup.sh
#! /bin/bash -xe
#
biosoft=/home/username/miniconda3/envs/scRNA/bin/umi_tools
project=/home/username/project/umi_rnaseq/r2_umi_8bp
bamdir=${project}/st3_hisat_cut6nt_outs
outdir=${project}/st4_umi_cut6nt_dup
Log=${project}/st0_log
fq1=$1
fq2=$2
id=$3
if [ ! -d ${outdir} ];
then mkdir -p ${outdir}
fi
cd ${bamdir} && samtools index ${id}.sort.bam
/usr/bin/time -v ${biosoft} dedup \
-I ${bamdir}/${id}.sort.bam \
--paired --output-stats=deduplicated \
-S ${outdir}/${id}_sort_dup.bam 1>${Log}/st4_${id}_cut6nt_umidup.log 2>&1
##批量提交任务
screen -r r2
cat st3_hisat2_cut6nt_config.txt |xargs -iF -P 10 sh -c 'bash st4_umi_cut6nt_dup.sh F'
去重后文件大小
$ls -lha *.bam |cut -d " " -f 5-
2.2G 4月 30 18:21 10_S31_sort_dup.bam
2.5G 4月 30 18:22 1_S22_sort_dup.bam
3.3G 4月 30 20:04 2_S23_sort_dup.bam
3.1G 4月 30 20:28 3_S24_sort_dup.bam
2.9G 4月 30 19:29 4_S25_sort_dup.bam
4.3G 4月 30 20:59 5_S26_sort_dup.bam
3.3G 4月 30 19:28 6_S27_sort_dup.bam
2.9G 4月 30 18:56 7_S28_sort_dup.bam
2.6G 4月 30 18:16 8_S29_sort_dup.bam
1.7G 4月 30 17:43 9_S30_sort_dup.bam
单从文件大小来看,也可以确定处理前后发生了明显变化。
mkdir st5_r2_umi_count && cd st5_r2_umi_count
gtf='/home/username/reference/human/GRCh38/gencode.v44.annotation.gtf'
ls -lha $gtf
featureCounts -T 5 -p -t exon -g gene_id -a $gtf -o r2_8bp_umi_id.txt ../st4_umi_cut6nt_dup/*.bam
至此上游定量流程就完成了。
参考链接
- https://mp.weixin.qq.com/s?__biz=MzIyMTI1NDU0Ng==&mid=2247485063&idx=1&sn=263295d238f86b27ecb2238e6e27f6ae&chksm=e83ec07adf49496cedc88272bca446decb092b04088b5c336858739e3768d9a4d83bf9f8e530&token=1373935942&lang=zh_CN#rd)
- https://mp.weixin.qq.com/s/NyUMI-2SWl3NwCgsS4yfBA
- https://www.genechem.com.cn/proinfo/138.html
- https://www.bilibili.com/video/BV1924y1F7cr/?spm_id_from=333.337.search-card.all.click&vd_source=123365f2db254d22dab5943e8c83caf0
- https://www.bilibili.com/video/BV1fjHXetESF/?spm_id_from=333.337.search-card.all.click&vd_source=123365f2db254d22dab5943e8c83caf0
- https://www.bilibili.com/video/BV1jK4y1u7P5/?spm_id_from=333.337.search-card.all.click&vd_source=123365f2db254d22dab5943e8c83caf0
- https://www.yunbios.net/UMI-RNA-seq.html#