当前位置:网站首页>RNA-seq入门实战(一):上游数据下载、格式转化和质控清洗
RNA-seq入门实战(一):上游数据下载、格式转化和质控清洗
2022-06-27 21:36:00 【生信技能树】
连续两次求贤令:曾经我给你带来了十万用户,但现在祝你倒闭,以及 生信技能树知识整理实习生招募,让我走大运结识了几位优秀小伙伴!大家开始根据我的ngs组学视频进行一系列公共数据集分析实战,其中几个小伙伴让我非常惊喜,不需要怎么沟通和指导,就默默的完成了一个实战!
他前面的分享是:
下面是他对我们b站转录组视频课程的详细笔记
本节概览:
- 1.在文章中找到 GEO accession number, 从NCBI获取数据SRR号
- 2.在linux中使用prefetch命令根据SRR号下载SRA文件
- 3.使用fasterq-dump/fastq-dump命令将SRA文件转为FASTQ格式,pigz软件多线程压缩(可选)
- 4.使用fastqc和multiqc进行测序数据的质控查看5.使用trim-galore去除低质量碱基和接头
承接上节RNA-seq入门实战(零):RNA-seq流程前的准备——Linux与R的环境创建
一、从NCBI获取数据SRR号
数据的文章来源: Formative pluripotent stem cells show features of epiblast cells poised for gastrulation | Cell Research (nature.com) 在文章的Data availability 下找到 GEO accession number: GSE154290
进入NCBI官网搜索GSE154290,选择相应结果进入
找到Supplementary file 下的SRA Run Select选项
Common Fields下介绍了数据的基本信息,例如表中的PAIRED表示双端测序数据。此次实战选择勾选 Found 27 Items下的RNA_mESCs和RNA_EpiSCs各两个数据,再选中Select下的Selected选项,下载Accession List后复制数据的SRR号
二、SRA数据下载
1.创建并进入test项目文件夹,将SRR号粘贴导入idname文件
mkdir test ;cd test
cat > idname
SRR12207279
SRR12207280
SRR12207283
SRR12207284
^C 2.创建SRA数据下载的脚本文件
vim 00_prefetch.sh 主要利用了sra-tools中的 prefetch命令下载sra数据
#sh内容################################
echo -e "\n \n \n prefetch sra !!! \n \n \n "
date
mkdir -p ~/test/raw/sra/
cd ~/test/raw/sra/
pwd
cat ~/test/idname | while read id ; \
do
( prefetch -O ./ $id & )
done 3.后台挂起运行脚本,运行情况导入log_00日志文件
nohup bash 00_prefetch.sh >log_00 2>&1 &查看一下系统任务运行情况和test项目下的文件结构
任务运行没问题,等待数据下载完毕,暂时去relax一下吧ヽ( ̄▽ ̄)ノ 当cat log_00出现以下downloaded successfully字样时表示下载完成,再检查数据下载情况,确认下载完成没问题后就可以进行下一步文件格式转化啦
prefetch.log
三、 SRA文件转为FASTQ格式
主要利用了sra-tool中的fasterq-dump命令转化格式为fastq,之后用pigz软件多线程压缩为.gz文件节省空间(可略过),再用fastqc和multiqc进行原始数据的质控和质控汇总~
fasterq-dump/fastq-dump常用参数
同上,先创建 01_sra2fq_qc1.sh 脚本文件
vim 01_sra2fq_qc1.sh ###########################################
#移动sra子文件夹下的文件并删除子文件夹
date
echo -e "\n \n \n 111# move files !!! \n \n \n "
cd ~/test/raw/sra/
cat ~/test/idname | while read id do
mv $id/* ./
rm -rf $id/
done
date
echo -e "\n \n \n 111# sra>>>fq !!! \n \n \n "
mkdir -p ~/test/raw/fq/
cd ~/test/raw/fq/
pwd
ls ~/test/raw/sra/*.sra |while read id
do
echo " PROCESS $(basename $id) "
fasterq-dump -3 -e 12 -O ./ $id
pigz -p 12 ~/test/raw/fq/*q
done
date
echo -e " \n \n \n 111# qc 1 !!! \n \n \n "
mkdir ~/test/raw/qc1/
cd ~/test/raw/qc1/
pwd
ls ~/test/raw/fq/* | xargs fastqc -t 12 -o ./
multiqc ./
echo -e " \n 111# ALL Work Done!!! \n "
date运行01_sra2fq_qc1.sh 脚本文件
nohup bash 01_sra2fq_qc1.sh >log_01 2>&1 &等待任务完成,查看一下raw文件夹下数据
tree raw
四、质控清洗
1. 原始数据质量查看
查看上一步qc1文件夹下的multiqc_report.html质控汇总网页文件,主要关注测序质量与测序接头这两项内容,可以发现该数据质量较好,平均质量均在30以上,接头含量也很低。 具体内容分析见: 20160410 测序分析——使用 FastQC 做质控 - 知乎 (zhihu.com)
小L生信学习日记-3丨原始数据质量如何判断?-上 (qq.com)
小L生信学习日记-4丨原始数据质量如何判断?-下 - 知乎 (zhihu.com)
2. 质控清洗数据
主要使用trim-galore去除低质量碱基和接头,详尽使用方法参见lncRNA组装流程的软件介绍之trim-galore 常用参数如下:
trim-galore常用参数
vim 2_cleanfq_qc2.sh ##############################################
echo -e " \n \n \n 222# Clean ! trim_galore !!! \n \n \n"
date
mkdir ~/test/clean/
cd ~/test/clean/
pwd
##########single###########################################################################
#ls ~/test/raw/fq/*.f* | while read id
#do
# trim_galore -q 25 -j 4 --phred33 --length 35 --stringency 3 \
# --gzip -o ~/test/clean/ $id
#done
#
##########paired###########################################################################
#1)先把文件_1、_2的路径文件名分别存储,再合并成两列的格式,存为config#########
ls ~/test/raw/fq/*_1* >1
ls ~/test/raw/fq/*_2* >2
paste 1 2 >config
cat config | while read id
do
arr=($id)
fq1=${arr[0]}
fq2=${arr[1]}
trim_galore -j 4 -q 25 --phred33 --length 35 --stringency 3 \
--paired --gzip -o ~/test/clean/ $fq1 $fq2
done
###########################################################################################
echo -e "\n \n \n 222# qc2 检查clean清洗结果!!! \n \n \n"
mkdir ~/test/clean/qc2
cd ~/test/clean/qc2
pwd
ls ~/test/clean/*f*.gz | xargs fastqc -t 12 -o ~/test/clean/qc2
multiqc ./
echo -e " \n 222# ALL Work Done !!! \n "
datenohup bash 2_cleanfq_qc2.sh >log_2 2>&1 &3. 清洗后数据质量查看
查看~/test/clean/qc2下的multiqc_report.html质控汇总网页文件,碱基质量更好一些了
到此,我们完成了RNAseq原始数据的下载、格式转化和质控清洗步骤,得到了经过质控后存放于clean文件夹下的fastq文件,接下来就可以利用这些cleaned fastq文件进行下一步的比对、计数(hisat2+feature_counts 或 salmon),最终得到我们想要的counts文件
参考资料
20160410 测序分析——使用 FastQC 做质控 - 知乎 (zhihu.com)
小L生信学习日记-3丨原始数据质量如何判断?-上 (qq.com)
小L生信学习日记-4丨原始数据质量如何判断?-下 - 知乎 (zhihu.com)
lncRNA组装流程的软件介绍之trim-galore
本实战教程基于以下生信技能树分享的视频:
【生信技能树】转录组测序数据分析_哔哩哔哩_bilibili
【生信技能树】GEO数据库挖掘_哔哩哔哩_bilibili
边栏推荐
- 2022 PMP project management examination agile knowledge points (3)
- Golang uses Mongo driver operation -- Query (array related)
- Webserver flow chart -- understand the calling relationship between webserver modules
- request对象、response对象、session对象
- seata
- 撰写外文时怎样引用中文文献?
- Systematic learning + active exploration is the most comfortable way to get started!
- 線程池實現:信號量也可以理解成小等待隊列
- 【PCL自学:Segmentation4】基于Min-Cut点云分割
- flutter系列之:flutter中的变形金刚Transform
猜你喜欢

安全省油环保 骆驼AGM启停电池魅力十足

MYSQL的下载与配置安装

手把手教你移植 tinyriscv 到FPGA上

Windows环境下的ELK——Logstash+Mysql(4)

吴恩达《机器学习》课程总结(11)_支持向量机

Smart wind power | Tupu software digital twin wind turbine equipment, 3D visual intelligent operation and maintenance
![[microservices sentinel] sentinel data persistence](/img/9f/2767945db99761bb35e2bb5434b44d.png)
[microservices sentinel] sentinel data persistence

C WinForm reads the resources picture

ASP. Net warehouse purchase, sales and inventory ERP management system source code ERP applet source code

Sécurité, économie de carburant et protection de l'environnement chameau
随机推荐
What if Fiddler fails to listen to the interface
解决新版chrome跨域问题:cookie丢失以及samesite属性问题「建议收藏」
[PCL self study: pclplotter] pclplotter draws data analysis chart
Golang uses Mongo driver operation - query (basic)
Feign通过自定义注解实现路径的转义
系统学习+主动探索,是最舒适的入门学习方式!
【AI应用】NVIDIA Tesla V100S-PCIE-32GB的详情参数
Msp430f5529 MCU reads gy-906 infrared temperature sensor
ICML 2022: UFRGS |作为最优策略转移基础的乐观线性支持和后继特征
自定义MySQL连接池
Golang uses Mongo driver operation -- Query (array related)
零基础自学SQL课程 | SQL中的日期函数大全
图的存储结构
零基础自学SQL课程 | SQL基本函数大全
Feign implements path escape through custom annotations
【tinyriscv verilator】分支移植到正点原子达芬奇开发板
使用cef3开发的浏览器不支持flash问题的解决
Solve the cross domain problem of the new version of chrome: Cookie loss and samesite attribute problem "recommended collection"
吴恩达《机器学习》课程总结(14)_降维
C WinForm reads the resources picture