[BioC] Reference individual array in abatch after changing pData
Martin Morgan
mtmorgan at fhcrc.org
Mon Apr 7 21:40:26 CEST 2008
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
More information about the Bioconductor
mailing list