help with dataset
4
0
Entering edit mode
@alberto-goldoni-3477
Last seen 10.1 years ago
> Hello to everybody, > i have a little problem with my dataset. Actually my data using > pData(eset.irq.50) is like this: > > > eset.irq.50 > ExpressionSet (storageMode: lockedEnvironment) > assayData: 1227 features, 8 samples > element names: exprs > phenoData > sampleNames: SHR-PUFA5.CEL, SHR-PUFA6.CEL, ..., WK-st2.CEL (8 total) > varLabels and varMetadata description: > sample: arbitrary numbering > featureData > featureNames: 1367555_at, 1367556_s_at, ..., 1399089_at (1227 total) > fvarLabels and fvarMetadata description: none > experimentData: use 'experimentData(object)' > Annotation: rat2302 > > > > pData(eset.irq.50) > sample > SHR-PUFA5.CEL 1 > SHR-PUFA6.CEL 2 > SHR-st7.CEL 3 > SHR-st8.CEL 4 > WK-PUFA3.CEL 5 > WK-PUFA4.CEL 6 > WK-st1.CEL 7 > WK-st2.CEL 8 > > i would like to modify these data in order to obtain: > > > pData(eset.irq.50) > ES TYPE > SHR-PUFA5.CEL PUFA SHR > SHR-PUFA6.CEL PUFA SHR > SHR-st7.CEL ST SHR > SHR-st8.CEL ST SHR > WK-PUFA3.CEL PUFA WK > WK-PUFA4.CEL PUFA WK > WK-st1.CEL ST WK > WK-st2.CEL ST WK > > in order to gave to me the possibility to perform factDesign analysis. > > Somebody can help me? > > > BEST REGARDS. > > > > -- > ----------------------------------------------------- > Dr. Alberto Goldoni > Bologna, Italy > ----------------------------------------------------- > -- ----------------------------------------------------- Dr. Alberto Goldoni Bologna, Italy ----------------------------------------------------- [[alternative HTML version deleted]]
• 1.2k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 10 weeks ago
United States
Hello Alberto -- Alberto Goldoni <alberto.goldoni1975 at="" gmail.com=""> writes: >> Hello to everybody, >> i have a little problem with my dataset. Actually my data using >> pData(eset.irq.50) is like this: >> >> > eset.irq.50 >> ExpressionSet (storageMode: lockedEnvironment) >> assayData: 1227 features, 8 samples >> element names: exprs >> phenoData >> sampleNames: SHR-PUFA5.CEL, SHR-PUFA6.CEL, ..., WK-st2.CEL (8 total) >> varLabels and varMetadata description: >> sample: arbitrary numbering >> featureData >> featureNames: 1367555_at, 1367556_s_at, ..., 1399089_at (1227 total) >> fvarLabels and fvarMetadata description: none >> experimentData: use 'experimentData(object)' >> Annotation: rat2302 >> >> >> > pData(eset.irq.50) >> sample >> SHR-PUFA5.CEL 1 >> SHR-PUFA6.CEL 2 >> SHR-st7.CEL 3 >> SHR-st8.CEL 4 >> WK-PUFA3.CEL 5 >> WK-PUFA4.CEL 6 >> WK-st1.CEL 7 >> WK-st2.CEL 8 >> >> i would like to modify these data in order to obtain: >> >> > pData(eset.irq.50) >> ES TYPE >> SHR-PUFA5.CEL PUFA SHR >> SHR-PUFA6.CEL PUFA SHR >> SHR-st7.CEL ST SHR >> SHR-st8.CEL ST SHR >> WK-PUFA3.CEL PUFA WK >> WK-PUFA4.CEL PUFA WK >> WK-st1.CEL ST WK >> WK-st2.CEL ST WK do you mean like > dim(sample.ExpressionSet) Features Samples 500 26 > head(pData(sample.ExpressionSet)) sex type score A Female Control 0.75 B Male Case 0.40 C Male Control 0.73 D Male Case 0.42 E Female Case 0.93 F Male Control 0.22 > sample.ExpressionSet[["ES", labelDescription="What ES is"]] <- + factor(c("PUFA", "ST")) > sample.ExpressionSet[["TYPE", labelDescription="What TYPE is"]] <- + factor(rep(c("SHR", "WK"), each=13)) > head(pData(sample.ExpressionSet)) sex type score ES TYPE A Female Control 0.75 PUFA SHR B Male Case 0.40 ST SHR C Male Control 0.73 PUFA SHR D Male Case 0.42 ST SHR E Female Case 0.93 PUFA SHR F Male Control 0.22 ST SHR > varMetadata(sample.ExpressionSet) labelDescription sex Female/Male type Case/Control score Testing Score ES What ES is TYPE What TYPE is ? Hope that helps, Martin >> in order to gave to me the possibility to perform factDesign analysis. >> >> Somebody can help me? >> >> >> BEST REGARDS. >> >> >> >> -- >> ----------------------------------------------------- >> Dr. Alberto Goldoni >> Bologna, Italy >> ----------------------------------------------------- >> -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793
ADD COMMENT
0
Entering edit mode
Many thanks, but now the situation is like this: > pData(eset.iqr.50) sample ES TYPE SHR-PUFA5.CEL 1 PUFA SHR SHR-PUFA6.CEL 2 PUFA SHR SHR-st7.CEL 3 PUFA SHR SHR-st8.CEL 4 PUFA SHR WK-PUFA3.CEL 5 ST WK WK-PUFA4.CEL 6 ST WK WK-st1.CEL 7 ST WK WK-st2.CEL 8 ST WK > head(pData(eset.iqr.50)) sample ES TYPE SHR-PUFA5.CEL 1 PUFA SHR SHR-PUFA6.CEL 2 PUFA SHR SHR-st7.CEL 3 PUFA SHR SHR-st8.CEL 4 PUFA SHR WK-PUFA3.CEL 5 ST WK WK-PUFA4.CEL 6 ST WK > varMetadata(eset.iqr.50) labelDescription sample arbitrary numbering ES What ES is TYPE What TYPE is i would like to remove "sample" and leave only ES and TYPE, can you help me again? Best regards. 2009/5/27 Martin Morgan <mtmorgan@fhcrc.org> > Hello Alberto -- > > Alberto Goldoni <alberto.goldoni1975@gmail.com> writes: > > >> Hello to everybody, > >> i have a little problem with my dataset. Actually my data using > >> pData(eset.irq.50) is like this: > >> > >> > eset.irq.50 > >> ExpressionSet (storageMode: lockedEnvironment) > >> assayData: 1227 features, 8 samples > >> element names: exprs > >> phenoData > >> sampleNames: SHR-PUFA5.CEL, SHR-PUFA6.CEL, ..., WK-st2.CEL (8 total) > >> varLabels and varMetadata description: > >> sample: arbitrary numbering > >> featureData > >> featureNames: 1367555_at, 1367556_s_at, ..., 1399089_at (1227 total) > >> fvarLabels and fvarMetadata description: none > >> experimentData: use 'experimentData(object)' > >> Annotation: rat2302 > >> > >> > >> > pData(eset.irq.50) > >> sample > >> SHR-PUFA5.CEL 1 > >> SHR-PUFA6.CEL 2 > >> SHR-st7.CEL 3 > >> SHR-st8.CEL 4 > >> WK-PUFA3.CEL 5 > >> WK-PUFA4.CEL 6 > >> WK-st1.CEL 7 > >> WK-st2.CEL 8 > >> > >> i would like to modify these data in order to obtain: > >> > >> > pData(eset.irq.50) > >> ES TYPE > >> SHR-PUFA5.CEL PUFA SHR > >> SHR-PUFA6.CEL PUFA SHR > >> SHR-st7.CEL ST SHR > >> SHR-st8.CEL ST SHR > >> WK-PUFA3.CEL PUFA WK > >> WK-PUFA4.CEL PUFA WK > >> WK-st1.CEL ST WK > >> WK-st2.CEL ST WK > > do you mean like > > > dim(sample.ExpressionSet) > Features Samples > 500 26 > > head(pData(sample.ExpressionSet)) > sex type score > A Female Control 0.75 > B Male Case 0.40 > C Male Control 0.73 > D Male Case 0.42 > E Female Case 0.93 > F Male Control 0.22 > > sample.ExpressionSet[["ES", labelDescription="What ES is"]] <- > + factor(c("PUFA", "ST")) > > sample.ExpressionSet[["TYPE", labelDescription="What TYPE is"]] <- > + factor(rep(c("SHR", "WK"), each=13)) > > head(pData(sample.ExpressionSet)) > sex type score ES TYPE > A Female Control 0.75 PUFA SHR > B Male Case 0.40 ST SHR > C Male Control 0.73 PUFA SHR > D Male Case 0.42 ST SHR > E Female Case 0.93 PUFA SHR > F Male Control 0.22 ST SHR > > varMetadata(sample.ExpressionSet) > labelDescription > sex Female/Male > type Case/Control > score Testing Score > ES What ES is > TYPE What TYPE is > > ? > > Hope that helps, > > Martin > > >> in order to gave to me the possibility to perform factDesign analysis. > >> > >> Somebody can help me? > >> > >> > >> BEST REGARDS. > >> > >> > >> > >> -- > >> ----------------------------------------------------- > >> Dr. Alberto Goldoni > >> Bologna, Italy > >> ----------------------------------------------------- > >> > > -- > Martin Morgan > Computational Biology / Fred Hutchinson Cancer Research Center > 1100 Fairview Ave. N. > PO Box 19024 Seattle, WA 98109 > > Location: Arnold Building M1 B861 > Phone: (206) 667-2793 > -- ----------------------------------------------------- Dr. Alberto Goldoni Bologna, Italy ----------------------------------------------------- [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
@martin-morgan-1513
Last seen 10 weeks ago
United States
Alberto Goldoni <alberto.goldoni1975 at="" gmail.com=""> writes: > Many thanks, but now the situation is like this: >> pData(eset.iqr.50) > ????????????? sample?? ES TYPE > SHR-PUFA5.CEL????? 1 PUFA? SHR > SHR-PUFA6.CEL????? 2 PUFA? SHR > SHR-st7.CEL??????? 3 PUFA? SHR > SHR-st8.CEL??????? 4 PUFA? SHR > WK-PUFA3.CEL?????? 5?? ST?? WK > WK-PUFA4.CEL?????? 6?? ST?? WK > WK-st1.CEL???????? 7?? ST?? WK > WK-st2.CEL???????? 8?? ST?? WK >> head(pData(eset.iqr.50)) > ????????????? sample?? ES TYPE > SHR-PUFA5.CEL????? 1 PUFA? SHR > SHR-PUFA6.CEL????? 2 PUFA? SHR > SHR-st7.CEL??????? 3 PUFA? SHR > SHR-st8.CEL??????? 4 PUFA? SHR > WK-PUFA3.CEL?????? 5?? ST?? WK > WK-PUFA4.CEL?????? 6?? ST?? WK >> varMetadata(eset.iqr.50) > ????????? labelDescription > sample arbitrary numbering > ES????????????? What ES is > TYPE????????? What TYPE is > i would like to remove "sample" and leave only ES and TYPE, > can you help me again? > phenoData(sample.ExpressionSet) An object of class "AnnotatedDataFrame" sampleNames: A, B, ..., Z (26 total) varLabels and varMetadata description: sex: Female/Male type: Case/Control ...: ... TYPE: What TYPE is (5 total) > phenoData(sample.ExpressionSet) <- phenoData(sample.ExpressionSet)[,-1] > phenoData(sample.ExpressionSet) An object of class "AnnotatedDataFrame" sampleNames: A, B, ..., Z (26 total) varLabels and varMetadata description: type: Case/Control score: Testing Score ES: What ES is TYPE: What TYPE is (but unless 'sample' is a data entry error why would you want to lose information?) Martin > Best regards. > > > 2009/5/27 Martin Morgan <[[mtmorgan at fhcrc.org]]> > > Hello Alberto -- > > > Alberto Goldoni <[[alberto.goldoni1975 at gmail.com]]> > writes: > >> Hello to everybody, >> i have a little problem with my > dataset. Actually my data using >> pData(eset.irq.50) is like > this: >> >> > eset.irq.50 >> ExpressionSet (storageMode: > lockedEnvironment) >> assayData: 1227 features, 8 samples >> > ? element names: exprs >> phenoData >> ? sampleNames: > SHR-PUFA5.CEL, SHR-PUFA6.CEL, ..., WK-st2.CEL ?(8 total) >> ? > varLabels and varMetadata description: >> ? ? sample: arbitrary > numbering >> featureData >> ? featureNames: 1367555_at, > 1367556_s_at, ..., 1399089_at ?(1227 total) >> ? fvarLabels and > fvarMetadata description: none >> experimentData: use > experimentData(object)' >> Annotation: rat2302 >> >> >> > > pData(eset.irq.50) >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? > ?sample >> SHR-PUFA5.CEL ? ? ? ? ? ? 1 >> SHR-PUFA6.CEL ? ? > ? ? ? ? 2 >> SHR-st7.CEL ? ? ? ? ? ? ? ? ? 3 >> SHR- st8.CEL > ? ? ? ? ? ? ? ? ? 4 >> WK-PUFA3.CEL ? ? ? ? ? ? ?5 >> > WK-PUFA4.CEL ? ? ? ? ? ? ?6 >> WK-st1.CEL ? ? ? ? ? ? ? ? ? ?7 >> > WK-st2.CEL ? ? ? ? ? ? ? ? ? ?8 >> >> i would like to modify > these data in order to obtain: >> >> > pData(eset.irq.50) >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ES ? ? ? ? ? ? ?TYPE >> > SHR-PUFA5.CEL ? ? PUFA ? ? ? ? ?SHR >> SHR-PUFA6.CEL ? ? PUFA ? > ? ? ? ?SHR >> SHR-st7.CEL ? ? ? ? ? ST ? ? ? ? ? ? ? SHR >> > SHR-st8.CEL ? ? ? ? ? ST ? ? ? ? ? ? ? SHR >> WK-PUFA3.CEL ? ? > ?PUFA ? ? ? ? ? WK >> WK-PUFA4.CEL ? ? ?PUFA ? ? ? ? ? WK >> > WK-st1.CEL ? ? ? ? ? ?ST ? ? ? ? ? ? ? ?WK >> WK-st2.CEL ? ? ? ? > ? ?ST ? ? ? ? ? ? ? ?WK > > > > do you mean like > > dim(sample.ExpressionSet) Features ?Samples ? ? 500 ? ? ? > 26 > head(pData(sample.ExpressionSet)) ? ? sex ? ?type score A > Female Control ?0.75 B ? Male ? ?Case ?0.40 C ? Male Control > ?0.73 D ? Male ? ?Case ?0.42 E Female ? ?Case ?0.93 F ? > Male Control ?0.22 > sample.ExpressionSet[["ES", > labelDescription="What ES is"]] <- + ? ? factor(c("PUFA", "ST")) > > sample.ExpressionSet[["TYPE", labelDescription="What TYPE is"]] <- + > ? ? factor(rep(c("SHR", "WK"), each=13)) > > head(pData(sample.ExpressionSet)) ? ? sex ? ?type score ? ES > TYPE A Female Control ?0.75 PUFA ?SHR B ? Male ? ?Case ?0.40 > ? ST ?SHR C ? Male Control ?0.73 PUFA ?SHR D ? Male ? ?Case > ?0.42 ? ST ?SHR E Female ? ?Case ?0.93 PUFA ?SHR F ? Male > Control ?0.22 ? ST ?SHR > varMetadata(sample.ExpressionSet) ? > ? ?labelDescription sex ? ? ? ?Female/Male type ? ? > ?Case/Control score ? ?Testing Score ES ? ? ? ? ?What ES is TYPE > ? ? ?What TYPE is > ? > Hope that helps, > Martin > > >> in order to gave to me the possibility to perform > factDesign analysis. >> >> Somebody can help me? >> >> >> > BEST REGARDS. >> >> >> >> -- >> > ----------------------------------------------------- >> > Dr. Alberto Goldoni >> Bologna, Italy >> > ----------------------------------------------------- >> > -- > > > Martin Morgan Computational Biology / Fred Hutchinson Cancer > Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, > WA 98109 > Location: Arnold Building M1 B861 Phone: (206) 667-2793 -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793
ADD COMMENT
0
Entering edit mode
@vincent-j-carey-jr-4
Last seen 19 days ago
United States
you are asking how to add new phenoData variables to an ExpressionSet E if there are n samples and v is a vector of length n and you want to name the new variable p, one approach is pData(E)$p = v specifically for your problem pData(eset.irq.50)$ES = c("PUFA", "PUFA", "ST", "ST", "PUFA", "PUFA", "ST", "ST") would take care of one of your variables you have to be very careful that the phenodata variable values correspond to the samples that you want to label. a more secure way of handling this problem is to create a data frame of n rows and q columns that describe your samples comprehensively. the rownames of the data frame should correspond to the sample names of the ExpressionSet data. construct an AnnotatedDataFrame based on the nxq data frame and then use the phenoData<- or a de novo ExpressionSet construction to take advantage of validation that the sample names for both expression and sample-level data are consistent. I see that Martin Morgan has responded at an ungodly hour with a more concise solution, using [[ instead of $, that covers the varMetadata elements as well. care has to be taken when using $ so it is a good idea to attend to his approach. On Wed, May 27, 2009 at 8:03 AM, Alberto Goldoni < alberto.goldoni1975@gmail.com> wrote: > > Hello to everybody, > > i have a little problem with my dataset. Actually my data using > > pData(eset.irq.50) is like this: > > > > > eset.irq.50 > > ExpressionSet (storageMode: lockedEnvironment) > > assayData: 1227 features, 8 samples > > element names: exprs > > phenoData > > sampleNames: SHR-PUFA5.CEL, SHR-PUFA6.CEL, ..., WK-st2.CEL (8 total) > > varLabels and varMetadata description: > > sample: arbitrary numbering > > featureData > > featureNames: 1367555_at, 1367556_s_at, ..., 1399089_at (1227 total) > > fvarLabels and fvarMetadata description: none > > experimentData: use 'experimentData(object)' > > Annotation: rat2302 > > > > > > > pData(eset.irq.50) > > sample > > SHR-PUFA5.CEL 1 > > SHR-PUFA6.CEL 2 > > SHR-st7.CEL 3 > > SHR-st8.CEL 4 > > WK-PUFA3.CEL 5 > > WK-PUFA4.CEL 6 > > WK-st1.CEL 7 > > WK-st2.CEL 8 > > > > i would like to modify these data in order to obtain: > > > > > pData(eset.irq.50) > > ES TYPE > > SHR-PUFA5.CEL PUFA SHR > > SHR-PUFA6.CEL PUFA SHR > > SHR-st7.CEL ST SHR > > SHR-st8.CEL ST SHR > > WK-PUFA3.CEL PUFA WK > > WK-PUFA4.CEL PUFA WK > > WK-st1.CEL ST WK > > WK-st2.CEL ST WK > > > > in order to gave to me the possibility to perform factDesign analysis. > > > > Somebody can help me? > > > > > > BEST REGARDS. > > > > > > > > -- > > ----------------------------------------------------- > > Dr. Alberto Goldoni > > Bologna, Italy > > ----------------------------------------------------- > > > > > > -- > ----------------------------------------------------- > Dr. Alberto Goldoni > Bologna, Italy > ----------------------------------------------------- > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > -- Vincent Carey, PhD Biostatistics, Channing Lab 617 525 2265 [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
@saroj-k-mohapatra-3419
Last seen 10.1 years ago
Hi Alberto: In line of Vincent's second suggestion, you could read the phenoData while reading the data (.CEL files). After that, it would propagate from AffyBatch to expressionSet object. For some time, I have used this approach (below) which I would like to bounce off the list. For example, there is a Targets.txt file: Sample Celfile ES TYPE SHR.PUFA5 SHR-PUFA5.CEL PUFA SHR SHR.PUFA6 SHR-PUFA6.CEL PUFA SHR SHR.st7 SHR-st7.CEL ST SHR SHR.st8 SHR-st8.CEL ST SHR WK.PUFA3 WK-PUFA3.CEL PUFA WK WK.PUFA4 WK-PUFA4.CEL PUFA WK WK.st1 WK-st1.CEL ST WK WK.st2 WK-st2.CEL ST WK You read in this information > targets=readTargets() Then create Phenodata object from this information. The following create an object that is basically same as the targets > myCovs = data.frame(targets) > rownames(myCovs) = myCovs[,1] Find the levels of each column in the targets. > nlev = as.numeric(apply(myCovs, 2, function(x) nlevels(as.factor(x)))) > finally create the data.frame and AnnotatedDataFrame metadata = data.frame(labelDescription = paste(colnames(myCovs), ": ", nlev, " level", ifelse(nlev==1,"","s"), sep=""), row.names=colnames(myCovs)) phenoData = new("AnnotatedDataFrame", data=myCovs, varMetadata=metadata) use the phenoData as an argument to ReadAffy > dat=ReadAffy(sampleNames=myCovs$Sample, filenames=myCovs$Celfile, phenoData=phenoData) Then normalize. > eset = rma(dat) I hope that works. Saroj Sample Celfile ES TYPE SHR.PUFA5 SHR-PUFA5.CEL PUFA SHR SHR.PUFA6 SHR-PUFA6.CEL PUFA SHR SHR.st7 SHR-st7.CEL ST SHR SHR.st8 SHR-st8.CEL ST SHR WK.PUFA3 WK-PUFA3.CEL PUFA WK WK.PUFA4 WK-PUFA4.CEL PUFA WK WK.st1 WK-st1.CEL ST WK WK.st2 WK-st2.CEL ST WK Alberto Goldoni wrote: >> Hello to everybody, >> i have a little problem with my dataset. Actually my data using >> pData(eset.irq.50) is like this: >> >> >>> eset.irq.50 >>> >> ExpressionSet (storageMode: lockedEnvironment) >> assayData: 1227 features, 8 samples >> element names: exprs >> phenoData >> sampleNames: SHR-PUFA5.CEL, SHR-PUFA6.CEL, ..., WK-st2.CEL (8 total) >> varLabels and varMetadata description: >> sample: arbitrary numbering >> featureData >> featureNames: 1367555_at, 1367556_s_at, ..., 1399089_at (1227 total) >> fvarLabels and fvarMetadata description: none >> experimentData: use 'experimentData(object)' >> Annotation: rat2302 >> >> >> >>> pData(eset.irq.50) >>> >> sample >> SHR-PUFA5.CEL 1 >> SHR-PUFA6.CEL 2 >> SHR-st7.CEL 3 >> SHR-st8.CEL 4 >> WK-PUFA3.CEL 5 >> WK-PUFA4.CEL 6 >> WK-st1.CEL 7 >> WK-st2.CEL 8 >> >> i would like to modify these data in order to obtain: >> >> >>> pData(eset.irq.50) >>> >> ES TYPE >> SHR-PUFA5.CEL PUFA SHR >> SHR-PUFA6.CEL PUFA SHR >> SHR-st7.CEL ST SHR >> SHR-st8.CEL ST SHR >> WK-PUFA3.CEL PUFA WK >> WK-PUFA4.CEL PUFA WK >> WK-st1.CEL ST WK >> WK-st2.CEL ST WK >> >> in order to gave to me the possibility to perform factDesign analysis. >> >> Somebody can help me? >> >> >> BEST REGARDS. >> >> >> >> -- >> ----------------------------------------------------- >> Dr. Alberto Goldoni >> Bologna, Italy >> ----------------------------------------------------- >> >> > > > >
ADD COMMENT

Login before adding your answer.

Traffic: 728 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6