我想使用msmsTest包来统计我的蛋白质组学数据(光谱计数类型)。
但是,使用以下命令导入文件时出现错误消息:
e <- pp.msms.data(myStackoverflowexample)
Error in MSnbase:::logging(msnset, "Applied pp.msms.data preprocessing") :
no slot of name "processingData" for this object of class "ExpressionSet".
我认为当我尝试以适当的格式(应该是ExpressionSet文件)生成文件时,我的问题来自上一步。为此,我尝试逐步遵循ExpressionSetIntroduction手册,对我来说似乎没问题,但每当我使用命令时,我都会收到错误&#34; e&lt; - pp.msms.data(myStackoverflowexample)&#34;使用msmsTest包。
请帮助我,因为几周以来我被困住了,这可能是我错过的一个非常愚蠢的事情。
您可以在此处获取示例数据集(原始数据和现象数据): https://www.dropbox.com/s/o9ts4k5qrnyem6d/rawdata.txt?dl=0 https://www.dropbox.com/s/3oy6n6y5hfq30ee/pdata.txt?dl=0
以下是允许我从头开始构建ExpressionSet文件的代码:
library(limma)
library(MSnbase)
library(msmsEDA)
library(msmsTests)
library(edgeR)
# creation of the file "assay data" in the correct format :
dataDirectory<- setwd(".../msmsTest-essai - stkvflw")
exprsFile <- file.path(dataDirectory, "rawdata.txt")
exprs <- as.matrix(read.table(exprsFile, header=TRUE, sep="\t",row.names=1))
# creation of the phenotypic data file:
pDataFile <- file.path(dataDirectory, "pdata.txt")
pData <- read.table(pDataFile,row.names=1, header=TRUE, sep="\t")
head(pData)
all(rownames(pData)==colnames(exprs)) # verification that rows and names of both files match
metadata <- data.frame(labelDescription= c("molecule treatment",
"number of years",
"tissues from Velpeau Hospital patients",
"in cm",
"in kg"),
row.names=c("treat", "age", "tissue", "height", "weight"))
phenoData <- new("AnnotatedDataFrame", data=pData, varMetadata=metadata)
experimentData <- new("MIAME",
name="Mickael Jordan",
lab="Chicago Bulls",
contact="mjordan@lab.not.exist",
title="Basket-ball Research Institute",
abstract="An example ExpressionSet",
url="www.lab.not.exist",
other=list(
notes="Created from text files"
))
myStackoverflowexample <- ExpressionSet(assayData=exprs,
phenoData=phenoData,
experimentData=experimentData,
annotation="blablabla")
myStackoverflowexample
ExpressionSet (storageMode: lockedEnvironment)
assayData: 8 features, 208 samples
element names: exprs
protocolData: none
phenoData
sampleNames: A1 A2 ... C64 (208 total)
varLabels: treat age ... weight (5 total)
varMetadata: labelDescription
featureData: none
experimentData: use 'experimentData(object)'
Annotation: blablabla
summary(myStackoverflowexample)
Length Class Mode
1 ExpressionSet S4
所以在这段代码之后,我遇到了msmsTest包:
e <- pp.msms.data(myStackoverflowexample)
Error in MSnbase:::logging(msnset, "Applied pp.msms.data preprocessing") :
no slot of name "processingData" for this object of class "ExpressionSet"
如果我们查看手册示例,我们会看到一行&#34;处理信息&#34;键入myStackoverflowexample
data(msms.dataset) # example given in the manual
msms.dataset
MSnSet (storageMode: lockedEnvironment)
assayData: 697 features, 14 samples
element names: exprs
protocolData: none
phenoData
sampleNames: U2.2502.1 U2.2502.2 ... U6.0302.3 (14 total)
varLabels: treat batch
varMetadata: labelDescription
featureData: none
experimentData: use 'experimentData(object)'
pubMedIds: http://www.ncbi.nlm.nih.gov/pubmed/22588121
Annotation:
- - - **Processing information** - - -
MSnbase version: 1.8.0
有关此问题的任何线索,最后能够使用统计分析处理我的文件吗?
非常感谢您的帮助。
我想尝试msmsTest包。
但是,当我使用我的示例数据集尝试手册中的代码时,我有以下错误消息:
b<-read.delim("example.data.set.txt")
head(b)
name condition tissue LogFC
1 kjhss1 control brain 7.129283
2 sdth2 control brain 7.179909
3 sgdhstjh20 control brain 9.353147
4 jdygfjgdkydg21 control brain 6.459432
5 shfjdfyjydg22 control brain 9.372865
6 jdyjkdg23 control brain 9.541097
str(b)
'data.frame': 4461 obs. of 4 variables:
$ name : Factor w/ 1131 levels "dghwg1041","dghwg1086",..: 480 761 787 360 863 385 133 888 563 738 ...
$ condition: Factor w/ 5 levels "control","treatmentA",..: 1 1 1 1 1 1 1 1 1 1 ...
$ tissue : Factor w/ 2 levels "brain","heart": 1 1 1 1 1 1 1 1 1 1 ...
$ LogFC : num 7.13 7.18 9.35 6.46 9.37 ...
e <- pp.msms.data(b)
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘exprs’ for signature ‘"data.frame"’
所以我被困在那里,我无法继续前进。
我试图定义我的数据集as.data.frame()或as.matrix(),但是我得到了相同的错误消息。
我在biobase中读过有关exprs()函数的信息: &#34;这些通用函数访问存储在从eSet类派生的对象中的化验数据的表达式和错误度量。&#34;
但它对我帮助不大......我已经阅读了一些与基因组数据类似的exprs()问题相关的帖子,但听起来像是&#34; gibberish&#34;对我来说。显然,我的data.frame的eSet类结构可能有些问题,但我不明白这意味着什么以及如何解决它。
有谁知道如何解决此问题以及如何继续?
提前多多感谢,
亲切的问候,
SkyR
答案 0 :(得分:3)