Reference individual array in abatch after changing pData
1
0
Entering edit mode
Paul Geeleher ★ 1.3k
@paul-geeleher-2679
Last seen 10.2 years ago
Dear Memebers, I want to be able to reference individual arrays in an abatch like so abatch[,1], abatch[,2] etc. This seems to work fine using the original pData for the abatch after using ReadAffy(): sample N10S.CEL 1 N11S.CEL 2 N12S.CEL 3 N7S.CEL 4 N8S.CEL 5 N9S.CEL 6 P1S.CEL 7 P2S.CEL 8 P3S.CEL 9 P4S.CEL 10 P5S.CEL 11 P6S.CEL 12 But when I run these commands: pd <- data.frame(population = c(1,1,1,1,1,1,2,2,2,2,2,2), replicate = c(1,2,3,4,5,6,1,2,3,4,5,6), sample = c(1,2,3,4,5,6,7,8,9,10,11,12)) rownames(pd) <- sampleNames(abatch) pData(abatch) <- pd Which changes the pData for the abatch to this: population replicate sample N10S.CEL 1 1 1 N11S.CEL 1 2 2 N12S.CEL 1 3 3 N7S.CEL 1 4 4 N8S.CEL 1 5 5 N9S.CEL 1 6 6 P1S.CEL 2 1 7 P2S.CEL 2 2 8 P3S.CEL 2 3 9 P4S.CEL 2 4 10 P5S.CEL 2 5 11 P6S.CEL 2 6 12 Referencing the arrays using "abatch[,1]" throws up the following error: Error in `row.names<-.data.frame`(`*tmp*`, value = c("sample", "population", : invalid 'row.names' length How can I change the pData and still be able to reference the arrays like "abatch[,1]"? Thanks, -Paul
• 753 views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States
Hi Paul -- can you please provide the output of sessionInfo() ? Thanks, Martin "Paul Geeleher" <paulgeeleher at="" gmail.com=""> writes: > Dear Memebers, > > I want to be able to reference individual arrays in an abatch like so > abatch[,1], abatch[,2] etc. > > This seems to work fine using the original pData for the abatch after > using ReadAffy(): > > sample > N10S.CEL 1 > N11S.CEL 2 > N12S.CEL 3 > N7S.CEL 4 > N8S.CEL 5 > N9S.CEL 6 > P1S.CEL 7 > P2S.CEL 8 > P3S.CEL 9 > P4S.CEL 10 > P5S.CEL 11 > P6S.CEL 12 > > > But when I run these commands: > > pd <- data.frame(population = c(1,1,1,1,1,1,2,2,2,2,2,2), replicate = > c(1,2,3,4,5,6,1,2,3,4,5,6), sample = c(1,2,3,4,5,6,7,8,9,10,11,12)) > rownames(pd) <- sampleNames(abatch) > pData(abatch) <- pd > > Which changes the pData for the abatch to this: > > population replicate sample > N10S.CEL 1 1 1 > N11S.CEL 1 2 2 > N12S.CEL 1 3 3 > N7S.CEL 1 4 4 > N8S.CEL 1 5 5 > N9S.CEL 1 6 6 > P1S.CEL 2 1 7 > P2S.CEL 2 2 8 > P3S.CEL 2 3 9 > P4S.CEL 2 4 10 > P5S.CEL 2 5 11 > P6S.CEL 2 6 12 > > Referencing the arrays using "abatch[,1]" throws up the following error: > > Error in `row.names<-.data.frame`(`*tmp*`, value = c("sample", "population", : > invalid 'row.names' length > > > How can I change the pData and still be able to reference the arrays > like "abatch[,1]"? > > Thanks, > -Paul > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M2 B169 Phone: (206) 667-2793
ADD COMMENT
0
Entering edit mode
Hi thanks for your reply, but I've actually worked out that this problem was to do with the fact that i was running an older version of Bioconductor. Version 2.5.1. Upgrading has solved it. Sorry for wasting your time. -Paul On Mon, Apr 7, 2008 at 8:40 PM, Martin Morgan <mtmorgan at="" fhcrc.org=""> wrote: > Hi Paul -- can you please provide the output of sessionInfo() ? > > Thanks, > > Martin > > > > "Paul Geeleher" <paulgeeleher at="" gmail.com=""> writes: > > > Dear Memebers, > > > > I want to be able to reference individual arrays in an abatch like so > > abatch[,1], abatch[,2] etc. > > > > This seems to work fine using the original pData for the abatch after > > using ReadAffy(): > > > > sample > > N10S.CEL 1 > > N11S.CEL 2 > > N12S.CEL 3 > > N7S.CEL 4 > > N8S.CEL 5 > > N9S.CEL 6 > > P1S.CEL 7 > > P2S.CEL 8 > > P3S.CEL 9 > > P4S.CEL 10 > > P5S.CEL 11 > > P6S.CEL 12 > > > > > > But when I run these commands: > > > > pd <- data.frame(population = c(1,1,1,1,1,1,2,2,2,2,2,2), replicate = > > c(1,2,3,4,5,6,1,2,3,4,5,6), sample = c(1,2,3,4,5,6,7,8,9,10,11,12)) > > rownames(pd) <- sampleNames(abatch) > > pData(abatch) <- pd > > > > Which changes the pData for the abatch to this: > > > > population replicate sample > > N10S.CEL 1 1 1 > > N11S.CEL 1 2 2 > > N12S.CEL 1 3 3 > > N7S.CEL 1 4 4 > > N8S.CEL 1 5 5 > > N9S.CEL 1 6 6 > > P1S.CEL 2 1 7 > > P2S.CEL 2 2 8 > > P3S.CEL 2 3 9 > > P4S.CEL 2 4 10 > > P5S.CEL 2 5 11 > > P6S.CEL 2 6 12 > > > > Referencing the arrays using "abatch[,1]" throws up the following error: > > > > Error in `row.names<-.data.frame`(`*tmp*`, value = c("sample", "population", : > > invalid 'row.names' length > > > > > > How can I change the pData and still be able to reference the arrays > > like "abatch[,1]"? > > > > Thanks, > > -Paul > > > > _______________________________________________ > > Bioconductor mailing list > > Bioconductor at stat.math.ethz.ch > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > > -- > Martin Morgan > Computational Biology / Fred Hutchinson Cancer Research Center > 1100 Fairview Ave. N. > PO Box 19024 Seattle, WA 98109 > > Location: Arnold Building M2 B169 > Phone: (206) 667-2793 >
ADD REPLY

Login before adding your answer.

Traffic: 838 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