如何通过affy包计算P值

时间:2015-04-02 06:17:44

标签: r preprocessor p-value

我有.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

计算通话后;

     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值。 ??

1 个答案:

答案 0 :(得分:0)

根据上面使用的数据对象: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