0.Multiqc简介
Fastqc是一款基于java的软件,能够对测序数据的质量进行评估。一个样本生成一个报告,当样本量过多时,逐一查看样本质量就稍显不方便,而Multiqc是一个基于Python的模块, 用于整合其它软件的报告的软件,能将fastqc生成的多个报告整合成一个报告的软件,这样能方便的查看所有测序数据的质量。
1.multiqc的安装
在conda环境中输入命令conda install multiqc
进行安装(安装失败的话尝试指定安装源)
下面是需要安装的依赖包
输入y开始下载
指定下载源的命令
conda install multiqc -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
2.multiqc登场之前
使用multiqc之前的工作:
2.1 从SRA数据库下载数据
下载数据(需要先安装SRA-toolkit)
prefetch SRR8073294
prefetch SRR8073207
下载成功后会显示...was downloaded successfully
SRA数据库简介 https://www.jianshu.com/p/4a32bf4c0eef
2.2 SRA文件解压成fastq格式
fastq-dump --gzip --split-files SRR8073294.sra
fastq-dump --gzip --split-files SRR8073207.sra
2.3 用fastq进行数据质量评价
mkdir ./fastqc_result
fastqc SRR8073207_1.fastq.gz -o ./fastqc_result/
fastqc SRR8073207_2.fastq.gz -o ./fastqc_result/
fastqc SRR8073294_1.fastq.gz -o ./fastqc_result/
fastqc SRR8073294_2.fastq.gz -o ./fastqc_result/
得到4组结果
(python2) username@servername:~/fastqc_result$ ls
SRR8073207_1_fastqc.html SRR8073207_2_fastqc.zip SRR8073294_2_fastqc.html
SRR8073207_1_fastqc.zip SRR8073294_1_fastqc.html SRR8073294_2_fastqc.zip
SRR8073207_2_fastqc.html SRR8073294_1_fastqc.zip
3. multiqc整合多个质控结果
multiqc的使用方法和命令参数如下:
Usage: multiqc [OPTIONS] <analysis directory>
Options:
-f, --force Overwrite any existing reports
## 重写已存在的报告
-s, --fullnames Do not clean the sample names (leave as full
file name) ## 保留样本名称
-i, --title TEXT Report title. Printed as page header, used
for filename if not otherwise specified.
## 指定报告标题
-o, --outdir TEXT Create report in the specified output
directory. ## 指定报告输出路径
-z, --zip-data-dir Compress the data directory. ## 压缩数据目录
-p, --export Export plots as static images in addition to
the report ## 将报告中的图导出为静态图
-fp, --flat Use only flat plots (static images)
## 只使用平面图(静态图)
-ip, --interactive Use only interactive plots (HighCharts
Javascript) ## 动图
--pdf Creates PDF report with 'simple' template.
Requires Pandoc to be installed.
## 输出PDF格式的报告(需要安装Pandoc)
执行以下命令:
multiqc ./fastqc_result/ -o ./fastqc_result/
结果如下:
...
[INFO ] fastqc : Found 4 reports
[INFO ] multiqc : Compressing plot data
[INFO ] multiqc : Report : multiqc_report.html
[INFO ] multiqc : Data : multiqc_data
[INFO ] multiqc : MultiQC complete
(python2) username@servername:~/fastqc_result$ ls
multiqc_data SRR8073207_2_fastqc.html SRR8073294_2_fastqc.html
multiqc_report.html SRR8073207_2_fastqc.zip SRR8073294_2_fastqc.zip
SRR8073207_1_fastqc.html SRR8073294_1_fastqc.html
SRR8073207_1_fastqc.zip SRR8073294_1_fastqc.zip
生成了两个文件,1个html报告和1个multiqc_data的文件夹,前者直接网页打开就可以查看,后者包含一些数据基本的统计信息和日志文档,html报告可直接用浏览器打开
用浏览器打开html文件
Multiqc报告的解读见该文章
https://www.jianshu.com/p/85da4dcc6020