美文网首页
第四章 Limma包读取Microarray数据(一)

第四章 Limma包读取Microarray数据(一)

作者: 王子威PtaYoth | 来源:发表于2019-12-17 19:11 被阅读0次

    4.1 概述

    Limma Guidance Chapter4主要介绍了除Affymetrix GeneChips外的多种Microarray如何读取。
    Affymetrix GeneChips可以使用affy, gcrma或aroma.affymetrix包进行读取和标准化。

    4.2 建议的文件

    首先描述Microarray文件输出的大致流程:
    一个实验,包含1个或多个microarray,使用同样library的探针。
    →扫描,生成TIFF文件。
    →使用图像处理软件(ArrayVision, ImaGene, GenePix, QuantArray, SPOT等)处理TIFF文件。
    →获得每个SPOT(SPOT的概念)的foreground和background intensities。
    →输出spot intensities至一系列text files。
    →每个array对应1个file,Imagene处理则每个array对应2个file。

    你需要提供:
    1、图像处理的output files。多数情况这些文件会包含探针的ID和name,可能还包含注释信息。(SPOT软件在输出文件时不写入probe ID,此时需要genelist文件来描述探针。)
    2、多数情况还需要一个targets file,它描述了每个RNA样本被杂交hybridize进了某个array的某个channel。
    3、还可以进一步提供spot types file,它定义了特殊的探针,例如control spots。

    4.3 The Targets Frame

    将数据input进limma的第一步通常是创建targets file(“which lists the RNA target hybridized to each channel of each array”)通常是1个tab分隔的txt文件,每个microarray占用1行。
    可使用targets <- readTargets()读入,成为targets frame对象。
    可以使用excel查看targets file,通常包括FileName列,Cy3染色列,Cy5染色列。

    这个Swirl case study ?的targets file还包括Slide编号和日期 ApoA1 case study,这个研究的targets file加入了Name列,通过targets <- readTargets("targets.txt", row.names="Name") 可以定义targets frame中array(即每一行)的名称 ImaGene的targets file中FileName有两列,因为ImaGene将红绿强度信号分别储存在2个文件中。

    4.4 Reading Two-Color Intensity Data 读入双色强度数据

    The foreground and background intensities可以通过以下代码读入RGList对象

    RG <- read.maimages(files, source="<imageanalysisprogram>", path="<directory>")
    ## RG是一个RGList对象,用于储存原始的two-color intensities
    

    <imageanalysisprogram>代表image analysis program的名称(如SPOT
    <directory>则是文件所在目录的完整路径,若路径指向当前的工作目录则可以省略该参数

    targets <- readTargets()
    RG <- read.maimages(targets$FileName, source="spot") #如果是GenePix输出文件则参数source="genepix"
    ##或者
    RG <- read.maimages(targets, source="spot")#函数会自动寻找targets对象中的FileName 列
    

    同样当参数source="imagene",则典型的代码为

    targets <- readTargets()
    files <- targets[,c("FileNameCy3","FileNameCy5")]
    RG <- read.maimages(files, source="imagene")#此时files参数为一个2列的矩阵,而不是向量
    
    foreground and background intensities的默认估计方式

    如果你不想用default estimates,可以自定义read.maimages()函数的columns参数。比如在GenePix中使用了一个自定的background method?,你希望使用median foreground estimates。这种foreground和background的组合在limma中没有预设,于是你可以:

    RG <- read.maimages(files,source="genepix", columns=list(R="F635 Median",G="F532 Median",Rb="B635",Gb="B532"))
    ## 猜测这里的R, G代表foreground,Rb, Gb代表background
    ## F635 Median代表**Median** **F**oreground,635mm为红光。同理,532mm为绿光
    

    如果你的image analysis program不在上述的列表内。只要你的image output file是标准格式,只需要提供你的annotation和intensity column,例如:

    RG <- read.maimages(files,columns=list(R="F635 Mean",G="F532 Mean",Rb="B635 Median",Gb="B532 Median"), annotation=c("Block","Row","Column","ID","Name"))
    ## 这段代码等同于参数 source=‘genepix’
    ## 复习一下file参数,为targets对象中column名为FileName的向量,即一个包含了文件名(例如“slide19w595.txt”)的字符串向量。read.maimages()读取targets, 输出RGList,RGList本质上为matrix对象
    

    show(RG)来查看读入是否正确,行为gene,列为array
    RG[,1]查看第1个array
    RG[,1]查看前100个gene
    summary(RG$R)来查看各个array的red intensities(那green intensities呢?)
    RG <- cbind(RG1, RG2)可以合并两组array

    4.5 Reading Single-Channel Agilent Intensity Data 读入单通道的安捷伦强度数据

    和双色数据类似,read.maimages() 需要添加参数green.only=TRUE,因为没有红色通道

    x <- read.maimages(files, source="agilent", green.only=TRUE)
    #或
    x <- read.maimages(targets, source="agilent", green.only=TRUE)
    #若targets file不在当前工作目录下
    x <- read.maimages(files, source="agilent", path="<directory>", green.only=TRUE)
    

    参数green.only=TRUE使得read.maimages()输出EList对象,而不是RGList.
    raw intensities储存于summary(x$E)

    x <- read.maimages(targets, source="agilent.mean", green.only=TRUE)
    

    Agilent Feature Extraction 的output files 除了intensities data列还包括注释列,read.maimages() 默认读取Row, Col, Start, Sequence, SwissProt, GenBank, Primate, GenPept, ProbeUID, ControlType, ProbeName, GeneName, SystematicName, Description等注释列,Section17.4有一个完整的单通道安捷伦数据的case study。

    4.6 Reading Illumina BeadChip Data 读取Illumina BeadChip数据

    Illumina的全基因组beadchip需要特殊处理。Illumina images由Bead-Scan软件扫描,Illumina的BeadStudio或GenomeStudio软件可以生成probe summary pofiles(tab分隔的txt文件,包含了intensity data)。
    通常同一时间处理的所有arrays被写入同一个file,每一array对应多个列。
    我们建议不要对从GenomeStudio输出的intensities进行任何背景校正或标准化,这两步在limma中进行更好。GenomeStudio也可以输出control probes的profile,建议一并输出。

    Illumina文件同其他平台的不同之处在于每一个image out put file包括多个array的数据,且control probes的intensity数据被写入了一个单独的文件。

    读取Illumina probe summary

    x <- read.ilmn("probe profile.txt", ctrlfiles="control probe profile.txt")
    # "probe profile.txt"为Illumina软件输出的probe summary profile file
    # ctrlfiles参数则读取Illumina软件单独输出的control probe的profile file
    # 在有多个probe summary profiles时read.ilmn.targets()可用来读取target file
    

    建议读入control probe profiles,这样就可以使用neqc()或nec()函数进行背景校正和标准化。相反则类似于其它单通道平台进行校正和标准化。
    Section17.3有一个完整的Illumina微阵列数据的case study。

    2019/12/17 简单的复习总结:
    1、首先要有targets file,告诉limma读入哪些文件
    2、limma读入文件后输出1个List对象,RGList或EList等等,包含了原始的强度数据
    3、注意不同平台的差别

    相关文章

      网友评论

          本文标题:第四章 Limma包读取Microarray数据(一)

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