NanoStringDiff生成非常大的logFC值

时间:2016-10-30 18:04:10

标签: r

我正在尝试使用NanoStringDiff来识别处理和对照样品之间差异表达的microRNA,但是我获得了非常大的倍数变化值(某些基因的log2FC为27,但通过检查预计为1左右)。我认为我的代码有错误。我使用以下指南http://www.bioconductor.org/packages/release/bioc/vignettes/NanoStringDiff/inst/doc/NanoStringDiff.pdf 我在下面提供了我的代码,我正在使用的数据在https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE84971上公开提供(GSE84971_non-normalized.txt.gz) 我把这些数据转换成了一个Excel文件,其格式与我称之为“数据”的指南中指定的格式一样。

非常感谢任何帮助。

source("https://bioconductor.org/biocLite.R")
biocLite()
biocLite("NanoStringDiff")
biocLite("Biobase")
library("BioBase") 
library("NanoStringDiff")

designs=data.frame(group=c("Control","Control","Control", "Treatment", "Treatment", "Treatment"))
designs 

directory <- "/Users/admin/Desktop" 

path <- paste(directory, "data.csv", sep ="/", collapse = NULL) 
NanoStringData=createNanoStringSetFromCsv(path,header=TRUE,designs)  

pheno=pData(NanoStringData)
group=pheno$group
design.full=model.matrix(~0+group) #create a design (or model) matrix
design.full

contrast=c(-1,1) 

NanoStringData=estNormalizationFactors(NanoStringData) 

positiveFactor(NanoStringData)
negativeFactor(NanoStringData)
housekeepingFactor(NanoStringData)

result=glm.LRT(NanoStringData,design.full, Beta= ncol(design.full), contrast=contrast)
result$table

我尝试使用dput(NanoString)添加数据,希望这使我的代码更加自包含。下面显示了输出。

new("NanoStringSet"
    , positiveFactor = numeric(0)
    , negativeFactor = numeric(0)
    , housekeepingFactor = numeric(0)
    , positiveControl = structure(c(51117L, 9153L, 2357L, 749L, 133L, 88L, 30283L, 6423L,
                                    1178L, 444L, 83L, 35L, 46143L, 8040L, 2014L, 554L, 114L, 82L,
                                    48365L, 9338L, 2158L, 603L, 135L, 91L, 52744L, 10177L, 2391L,
                                    786L, 143L, 72L, 70189L, 12069L, 3186L, 693L, 176L, 110L), .Dim = c(6L,
                                                                                                        6L), .Dimnames = list(c("POS_A(128)", "POS_B(32)", "POS_C(8)",
                                                                                                                                "POS_D(2)", "POS_E(0.5)", "POS_F(0.125)"), c("Control.1", "Control.2",
                                                                                                                                                                             "Control.3", "Treatment.1", "Treatment.2", "Treatment.3")))
    , negativeControl = structure(c(52L, 32L, 40L, 14L, 104L, 74L, 28L, 25L, 29L, 11L,
                                    74L, 45L, 31L, 32L, 29L, 13L, 80L, 60L, 61L, 44L, 32L, 5L, 103L,
                                    74L, 56L, 42L, 44L, 15L, 135L, 62L, 55L, 54L, 36L, 12L, 108L,
                                    61L), .Dim = c(6L, 6L), .Dimnames = list(c("NEG_B(0)", "NEG_C(0)",
                                                                               "NEG_A(0)", "NEG_F(0)", "NEG_E(0)", "NEG_D(0)"), c("Control.1",
                                                                                                                                  "Control.2", "Control.3", "Treatment.1", "Treatment.2", "Treatment.3"
                                                                               )))
    , housekeepingControl = structure(c(825L, 1892L, 1293L, 1496L, 2157L, 1254L, 1081L, 1121L,
                                        914L, 1223L, 2123L, 3912L, 1876L, 2217L, 3363L, 1392L, 1750L,
                                        1626L, 1196L, 1917L, 1378L, 1446L, 1300L, 1077L, 1875L, 2098L,
                                        8006L, 2989L, 4447L, 4930L), .Dim = 5:6, .Dimnames = list(c("Actb|0",
                                                                                                    "B2m|0", "Gapdh|0", "Rpl19|0", "Rplp0|0"), c("Control.1", "Control.2",
                                                                                                                                                 "Control.3", "Treatment.1", "Treatment.2", "Treatment.3")))
    , experimentData = new("MIAME"
                           , name = ""
                           , lab = ""
                           , contact = ""
                           , title = ""
                           , abstract = ""
                           , url = ""
                           , pubMedIds = ""
                           , samples = list()
                           , hybridizations = list()
                           , normControls = list()
                           , preprocessing = list()
                           , other = list()
                           , .__classVersion__ = new("Versions"
                                                     , .Data = list(c(1L, 0L, 0L), c(1L, 1L, 0L))
                           )
    )
    , assayData = <environment>
      , phenoData = new("AnnotatedDataFrame"
                        , varMetadata = structure(list(labelDescription = NA_character_), .Names = "labelDescription", row.names = "group", class = "data.frame")
                        , data = structure(list(group = structure(c(1L, 1L, 1L, 2L, 2L, 2L), .Label = c("Control",
                                                                                                        "Treatment"), class = "factor")), .Names = "group", row.names = c("Control.1",
                                                                                                                                                                          "Control.2", "Control.3", "Treatment.1", "Treatment.2", "Treatment.3"
                                                                                                        ), class = "data.frame")
                        , dimLabels = c("sampleNames", "sampleColumns")
                        , .__classVersion__ = new("Versions"
                                                  , .Data = list(c(1L, 1L, 0L))
                        )
      )
    , featureData = new("AnnotatedDataFrame"
                        , varMetadata = structure(list(labelDescription = character(0)), .Names = "labelDescription", row.names = character(0), class = "data.frame")
                        , data = structure(list(), .Names = character(0), class = "data.frame", row.names = c("hsa-miR-10a-5p|0",
                                                                                                              "hsa-miR-1234|0", "hsa-miR-185-5p|0", "hsa-miR-27a-3p", "hsa-miR-34c-3p",
                                                                                                              "hsa-miR-1181|0", "hsa-miR-601", "hsa-miR-4454"))
                        , dimLabels = c("featureNames", "featureColumns")
                        , .__classVersion__ = new("Versions"
                                                  , .Data = list(c(1L, 1L, 0L))
                        )
    )
    , annotation = character(0)
    , protocolData = new("AnnotatedDataFrame"
                         , varMetadata = structure(list(labelDescription = character(0)), .Names = "labelDescription", row.names = character(0), class = "data.frame")
                         , data = structure(list(), .Names = character(0), class = "data.frame", row.names = c("Control.1",
                                                                                                               "Control.2", "Control.3", "Treatment.1", "Treatment.2", "Treatment.3"
                         ))
                         , dimLabels = c("sampleNames", "sampleColumns")
                         , .__classVersion__ = new("Versions"
                                                   , .Data = list(c(1L, 1L, 0L))
                         )
    )
    , .__classVersion__ = new("Versions"
                              , .Data = list(c(3L, 3L, 1L), c(2L, 34L, 0L), c(1L, 3L, 0L), c(1L, 0L,
                                                                                             0L))
    )
)

谢谢!

0 个答案:

没有答案