【问题标题】:How to calculate Pvalue by affy package如何通过affy包计算P值
【发布时间】:2015-04-02 06:17:44
【问题描述】:

我有一个.CEL文件,需要affy包处理。我得到了相应的探测和检测调用。我还想计算 .CEL 文件的 Pvalue。

我使用下面的代码来获取探测和检测调用,然后进行组合:

     ##Read the CEL files (first command below) and then summarize and 
     ##normalize with MAS5 (second command below)
      affy.data = ReadAffy()
      eset.mas5 = mas5(affy.data)

 ## getting the expression matrix (probesets/genes in rows, chips in columns).
     exprSet.nologs = exprs(eset.mas5)

 # Rename the column names if we want
        colnames(exprSet.nologs) = c("Sample.1")


    # Run the Affy A/P call algorithm on the CEL files we processed above
    data.mas5calls = mas5calls(affy.data)

    # Get the actual A/P calls
    data.mas5calls.calls = exprs(data.mas5calls)

    ## Combining data
    data.full <- cbind(exprSet.nologs,data.mas5calls.calls)
    write.table(data.full, file="Full_data.txt", quote=F, sep="\t")

在上面的代码中,我还想计算 p 值,然后再进行组合。

.CEL文件:

CellHeader=X      Y MEAN    STDV    NPIXELS
           0      0 147.0   23.5     25
           1      0 10015.0 1276.7   25
           2      0 160.0   24.7     25
           3      0 9710.0  1159.8   25
           4      0 85.0    14.0     25
           5      0 171.0   21.0     25
           6      0 11648.0 1678.4   25
           7      0 163.0   30.7     25
           8      0 12044.0 1430.1   25
           9      0 169.0   25.7     25
          10      0 11646.0 1925.6   25
          11      0 176.0   30.7     25

获取探测ID和表达式值后:

 Probes            Expression Value
1007_s_at             969.52517
1053_at               388.33007
117_at                628.92785
121_at               2254.15379
1255_g_at             156.56440
1294_at               659.27168
1316_at               381.76688
1320_at                89.60607
1405_i_at             304.36621
1431_at               165.30764

计算 Calls 后;

     Probes   Detection Call
    1007_s_at "P"                  
    1053_at   "P"                  
    117_at    "P"                  
    121_at    "P"                  
    1255_g_at "A"                  
    1294_at   "A"                  
    1316_at   "P"                  
    1320_at   "A"                  
    1405_i_at "A"                  
    1431_at   "A"  

如何计算 P 值。 ??

【问题讨论】:

    标签: r preprocessor p-value


    【解决方案1】:

    根据上面使用的数据对象:data.mas5calls,你可以试试下面这行代码。 assayData(data.mas5calls)[["se.exprs"]]

    Output: 
            #1007_s_at           0.007542912
            #1053_at             0.019303461
            #117_at              0.011447358
            #121_at              0.009985415
            #1255_g_at           0.302547472
            #1294_at             0.162935019
            #1316_at             0.001141166
            #1320_at             0.418069378
            #1405_i_at           0.062021416
            #1431_at             0.107301013
    

    【讨论】:

      猜你喜欢
      • 2014-04-13
      • 2017-11-30
      • 1970-01-01
      • 2021-08-03
      • 2020-10-15
      • 2014-06-01
      • 1970-01-01
      • 2018-10-12
      • 1970-01-01
      相关资源
      最近更新 更多