2019-11-04 记录CNV数据分析学习(一)

真是应了那句话,有压力才会有动力。
由于课题需求最近需要分析一些芯片的数据(GSE60607,GSE93004,GSE34459)然后一查发现有些原始不仅数据量大,而且还是分析CNV,相关方法都不熟悉,不过对于已经跟随生信技能树的大神团队学习了近2个月的生信基础课的我来说还是可以挑战一下的。
第一个问题通过求助曾老师
已经完成,30多个G的raw data已经备齐,下一步就是找方法去分析了。

第一步查找背景资料

Illumina全基因组SNP芯片不仅可以call snp,还可以call CNV和LOH等结构性的变异。对于结构性变异的鉴定是通过BAF和logRratio来计算。CNV和LOH的区别在于CNV中logRratio 会变化,而LOH中不会。

常用的软件有:CNVpartition;QuantiSNP;PennCNV;dChip;illumina官网还提供了其余一些方法,可是都是商业软件,需要购买。而上面几个是免费的。

然后再好好看看这几个数据集的情况:

1、GSE34459

来自文献Ripoll C, Rivals I, Ait Yahya-Graison E, Dauphinot L et al. Molecular signatures of cardiac defects in Down syndrome lymphoblastoid cell lines suggest altered ciliome and Hedgehog pathways. PLoS One 2012;7(8):e41616. PMID: 22912673

  • 是一个来自法国的研究2012发表在PLoS One,但查看了相关内容后发现这个是分析以往是数据来的。原始数据如下
    GSE34457 Molecular Signatures of cardiac defects in Down syndrome lymphoblastoid cell lines (congenital heart disease)
    GSE34458 Molecular Signatures of cardiac defects in Down syndrome lymphoblastoid cell lines (trisomy 21)
    所以是2个平台的来源的共66个样本

2、GSE93004

来自文献Rambo-Martin BL, Mulle JG, Cutler DJ, Bean LJH et al. Analysis of Copy Number Variants on Chromosome 21 in Down Syndrome-Associated Congenital Heart Defects. G3 (Bethesda) 2018 Jan 4;8(1):105-111. PMID: 29141989

  • 2017年发表的样本数目较大共526测序样本

3、GSE60607

来自文献

  • Ramachandran D, Mulle JG, Locke AE, Bean LJ et al. Contribution of copy-number variation to Down syndrome-associated atrioventricular septal defects. Genet Med 2015 Jul;17(7):554-60. PMID: 25341113
  • Ramachandran D, Zeng Z, Locke AE, Mulle JG et al. Genome-Wide Association Study of Down Syndrome-Associated Atrioventricular Septal Defects. G3 (Bethesda) 2015 Jul 20;5(10):1961-71. PMID: 26194203

这3个数据集都是来自几个比较大的人群,检测的是唐氏综合征(Down syndrome)相关先天性心脏病(CHD)的测序样本。很多疾病都有人种特异性,但是我们常听到一句话就是“天下唐氏是一家”,全世界的唐氏综合征患儿临床表现都是类似的,而且遗传基础也比较接近--都是由于21号染色体的多拷贝引起,50%的病人有并发CHD。而目前的研究来说,那么从唐氏这个遗传基础比较类似的病人模式中找到相同的致病原因对阐述CHD发病原因更有利,虽然有其他综合征合并有CHD,例如CHD发生率最高的是18三体综合征(爱德华综合征-Edwards syndrome)和22q11.2的微缺失( DiGeorge syndrome)这些综合征的发生率较低,且患儿多不易存活至成年,大都在胚胎期就遭到流产,研究人群样本太少。而DS患儿虽然因为技术的发展检出率的增高,流产率也明显提高,但现存的DS患儿数量群体仍然巨大,且部分有生育能力,造成更大的社会负担。同时也给我们提供了大量的研究资料。
背景就介绍这么多,下面开始学习准备工作。

第二步 学习常用的软件有:CNVpartition;QuantiSNP;PennCNV;dChip

免费的软件有这4种常见的,就一个个开始学习吧,首先是谷歌搜索哪一款更适合分析CNV了需要分析的这几个数据集是来自不同的测序平台,对于不同来源的数据可能适合的软件也不同,因此有可能需要结合几个软件的工具来分析。

软件CNVpartition

2019-11-04 记录CNV数据分析学习(一)_第1张图片
CNVpartition

这是Illumina公司推出的一个免费的软件,他支持win和mac系统,但是有各种限制


2019-11-04 记录CNV数据分析学习(一)_第2张图片
不适合我的系统

软件QuantiSNP

2019-11-04 记录CNV数据分析学习(一)_第3张图片
QuantiSNP

很好,这个有GitHub教程,这种我是最喜欢的,虽然我不是圈内人,但是也指代这个网站上都是干货啊,妥妥的。
点开一看果然很有用
2019-11-04 记录CNV数据分析学习(一)_第4张图片
这个作者的教程很是详细,果断收藏开始学习

学习链接: https://github.com/cwcyau/quantisnp

软件PennCNV

这个也是有GitHub教程:

2019-11-04 记录CNV数据分析学习(一)_第5张图片
PennCNV

这个教程就更棒了,他持续不断更新各种版本的教程,但是可惜的是这个看上去似乎有点难,慢慢来吧,总是得学会的。
学习链接: https://github.com/WGLab/PennCNV/releases

软件dChip

这个软件的资料有点不太好找,不是没有,主要是干扰项太多,直接输入这个词条发现一个问题,满屏都是Chip的广告和科普,然后需要限定一下才找得到关于软件的信息:


2019-11-04 记录CNV数据分析学习(一)_第6张图片
dChip

2019-11-04 记录CNV数据分析学习(一)_第7张图片
限定搜索后的结果

这样才能找到有效的教程
查了一下发现dChip软件主要分析的输出文件格式为CEL跟之前学过的生信基础里面的有些数据是比较像的,因为是Affymetrix公司的探测结果文件,所以扩展名为.CEL


2019-11-04 记录CNV数据分析学习(一)_第8张图片
image.png

但是很遗憾,这个软件的下载不太容易,我点开几个链接都是打不开,估计是被墙挡住了,没关系,我可以先学习中间2个,反正学一个是一个。

今天就先学习QuantiSNP

解读作者的readme.txt(非纯翻译)
软件版本:QuantiSNP v2.3 Beta
更新时间:03 April 2011

1. 前言

QuantiSNP这次更新的版本提高了性能,虽然名字里面写的是SNP,但是也可以call CNV,然后也可以分析跨平太的数据包括Affymetrix 500K and SNP 6.0 data,看着就挺不错的。

2. 安装

以下文件需要配置的:

  • Binary quantisnp (Linux) or quantisnp.exe (Windows).
  • Configuration files levels.dat and params.dat (levels-hd.dat is available for Infinium HD users).
  • Local GC content files for Build 35 and 36 of the human genome (b35.zip/b36.zip).
  • MATLAB Run-Time Libraries Installer (MCRInstallerXXX.bin - Linux, MCRInstallerXXX.exe - Windows).
    The MATLAB Run-Time Libraries must be installed before QuantiSNP can be used.
    总结一下就是首先需要一台Windows电脑或者Linux服务器,然后需要本地存储人类基因组的数据,这里是11年写的是35和36版本的估计现在需要换到37和38版本了。还有MATLAB库是个什么东西,需要在QuantiSNP使用之前安装。
    估计我这个本本是不好搞定了,先不管这么多,继续往下看。

3. 使用

A machine with at least 2 Gb memory is required and 4 Gb is recommended for processing SNP data from the Illumina 1M and Affymetrix 6.0 SNP arrays.这个要求到是不太高,2-4G内存,(我有16G,可惜系统不支持,考虑装个系统?)

3.1 Input data

For single file processing, the input files must be plain tab-delimited text files with the following columns:

  • Probe ID / SNP Name
  • Chromosome
  • Position
  • Log R Ratio
  • B Allele Frequency
    读进去的类似一个表格文件包括有以上5列的内容
    Suitable text files can be obtained directly from Illumina's BeadStudio or GenomeStudio software or manually extracted from other file formats.
    合适的文件来源于Illumina公司的BeadStudio or GenomeStudio software导出的txt文档
    或者Affymetrix公司的PennCNV Affymetrix extraction routines得到的输出文件具体参考http://openbioinformatics.org/penncnv/
    从这里知道了,原来这个软件是PennCNV分析之后的进一步分析的工具,所以应该先去了解一下PennCNV。
    不过也不影响继续学习吧
    For batch file processing using BeadStudio reports, the report files must contain the following columns:
  • Sample ID
  • SNP Name
  • Chromosome
  • Position
  • Log R Ratio
  • B Allele Freq

In addition, a tab-delimited gender information file can be created with the following columns:

  • Sample ID
  • Gender (Male/Female)
    这些都是参数问题,使用软件分析数据,就必须把输入的数据按照软件的格式要求先整理好。

3.2 Command line options

QuantiSNP 参数:

    --outdir {directory name} (Required) Directory in which output files are stored (must exist).
    --levels {filename} (Required) Path to a configuration file containing list of copy number states and associated mean levels for the Log R Ratio. Default: levels.dat is assumed to be in the same directory as the executable.
    --config {filename} (Required) Path to configuration file containing list of hyperparameter settings. Default: params.dat is assumed to be in the same directory as the executable.
    --gcdir {directory name} (Optional) Directory in which local GC content files are stored. If not specified, then local GC-based correction of the Log R Ratio is not performed.
    --lsetting {number} (Optional) The characteristic length used to calculate transition probabilities. Default: 2,000,000.
    --emiters {number} (Optional) The number of iterations used for the EM algorithm during learning. Default: 10.              
    --plot (Optional) Generates a series of plots (gzipped Postscript format) of putative copy number alterations found.
    --genotype (Optional) Generates a gzipped text file containing list of Generalised Genotypes.
    --chr {1-N} (Optional) Processes specified chromosomes only, e.g. --chr [1, 4:23] would run QuantiSNP using the data from chromosomes 1 and 4 to X only.
    --chrX {number} (Optional) Specifies the X chromosome, e.g. --chrX 23. Default: chrX is 23. This setting can be altered for analysis of non-human species.
    --doXcorrect Optional & Specifies whether to do correction of the Log R Ratio for the X chromosome. Default: No X correction.
    --isaffy (Optional) Specify for the processing of Affymetrix data. Default: Illumina data processing assumed.
[ for single file processing ]
    --sampleid {name} (Required) Sample ID - this is used to generate the name of the output file.
    --gender {male/female} (Required) Specifies gender of the sample. Adjusts processing for the X chromosome for males. If not specified, then automatic gender calling is used to predict gender.
    --input-file {filename} (Required) Path to text file containing input data.
[ for BeadStudio file processing ]
    --logfile {name} (Required) - writes a report of containing the samples in the BeadStudio report that were processed
    --genderfile {name} (Optional) - file containing sample IDs and gender information. If no gender file is supplied or a sample contains no gender information in the gender file then automatic gender calling is used.
    --beadstudio-files {name} (Required) - BeadStudio report file

3.3 Output

QuantiSNP generates up to four output files for each sample:

  • A list of putative copy number alterations in {samplename}.cnv.
  • A list of putative loss-of-heterozygosity regions in {samplename}.loh
  • A list of genotypes in {samplename}.gn.
  • Plots of putative CNVs in {samplename}.ps.gz.
  • Quality control parameters are stored in {samplename}.qc.
    输出文件包括.CNV,.LOH,genotypes,putative CNVs以及QC文件。
    以下个每个文件格式所有信息:

3.3.1 CNV file

The CNV output file

  • Sample Name.
  • Chromosome.
  • Start Position (bp).
  • End Position (bp).
  • Start Probe Name. Probe name of first probe in CNV region.
  • End Probe name. Probe name of last probe in CNV region.
  • Length (bp).
  • Number of Probes.
  • Copy number.
  • Maximum Log Bayes Factor. Log Bayes Factor of most probable copy number state.
  • Log Bayes Factor (six columns). Log Bayes Factors for all copy number states.

3.3.2 LOH file

  • Sample Name.
  • Chromosome.
  • Start Position (bp).
  • End Position (bp).
  • Start Probe Name. Probe name of first probe in CNV region.
  • End Probe name. Probe name of last probe in CNV region.
  • Length (bp).
  • Number of Probes.
  • Copy number.
  • Maximum Log Bayes Factor. Log Bayes Factor of most probable copy number state.
  • Log Bayes Factor (six columns). Log Bayes Factors for all copy number states.

3.3.3 Genotype file

  • Probe Name.
  • Chromosome.
  • Position (bp).
  • Log R Ratio (corrected for local GC content)
  • B allele frequency.
  • Copy number (of most probable copy number state).
  • Maximum Log Bayes Factor (of most probable copy number state).
  • Generalised genotype call.
  • Generalised genotype call probability.
  • Diploid genotype call.
  • Diploid genotype call probability.

3.3.4 QC file

  • Sample ID.
  • Outlier rate. Estimated probability of outliers in the data.
  • Std. Dev. LRR. A measure of the spread of Log R Ratio values.
  • Std. Dev. BAF. A measure of the spread of distribution of B allele frequencies for heterozygote genotypes.
  • Gender. Predicted gender of the sample if using automatic gender calling.

4. Analysis

对于每个CNV,将为其分配分数。此度量值称为"Log Bayes Factor",是一种数量,表示对可用 SNP 数据给出的指定位置存在CNV的支持。

建议对至少 30 的 Log Bayes 因子进行严格的阈值,以获得低误报率 (<1%)。10-30 之间的阈值增加了检测较小CNV的能力,但会减少误报calling(高达 10%)。使用小于 10 的 Log Bayes 因子标识的CNV通常微不足道,建议将其筛掉。

5. Quality Control

通过检查质量控制 (QC) 文件中的参数,可以检测低质量数据。有许多关键指标:

Outlier rate。高离值率表明QuantiSNP假定的噪声模型与数据的实际噪声特征不匹配。

Std. Dev. (Log R Ratio/B allele frequency)。B等位基因频率模型的对数R比和杂合组分的测量提供了数据中噪声的测量值。与高质量数据关联的典型值为 0.1-0.25 (LRR) 和 0.025-0.04 (BAF)。如果我们为大量样本绘制两个指标,则可以通过聚类来识别质量不佳的样本组。

6. Additional notes

6.1 Local GC content based correction

低质量的Illumina SNP数据通常包含wave-like artefacts in the Log R Ratio。QuantiSNP 使用本地 GC文件来移除这些干扰,以减少虚假的 CNV 调用。

6.2 Chromosome X processing

在染色体 X 上可能会进行过量的 CNV 调用,并使用旧版本的 Illumina 的群集文件生成过程处理数据。对于 Infinium HD 产品线,X 染色体的聚类文件生成得到了改进。详情参看:http://www.illumina.com/downloads/XChrClustering_TN.pdf
此外QuantiSNP 可以根据样本的特定性别将 X 染色体centred the Log R Ratio values for the X chromosome。使用开关-doXcorrect将人类女性的Log R Ratio居于零或人类男性的相应水平。

6.3 Parameter settings

levels.datparams.dat这两个文件有非常重要的默认参数,修改参数值可以提升QuantiSNP工作效率,对于 Infinium HD 用户,提供了levels-hd.dat。这些参数文件假定数据是使用 Illumina 自己的 BeadStudio 软件规范化的,如果您使用自己的自定义规范化方法或正在分析 Affymetrix 数据,则需要定义自己的级别。

6.3.1 Copy number levels

每个拷贝数state是与the Log R Ratio平均值有关的. 包括在以下文件内

levels.dat - older Illumina non-HD SNP arrays (HumanHapXXX)
levels-hd.dat - Illumina 6XX-Quad, Illumina 1M, Illumina-Omni
levels-affy.dat - Affymetrix SNP 6.0

6.3.2 Hyperparameters

The statistical model underlying QuantiSNP involves a number of preset hyperparameters. These are contained in the file params.dat.
需要进一步学习PennCNV。参看http://openbioinformatics.org/penncnv/

你可能感兴趣的:(2019-11-04 记录CNV数据分析学习(一))