[BioC] Re: concentrations
Adaikalavan Ramasamy
ramasamy at cancer.org.uk
Fri Jun 3 00:29:47 CEST 2005
I am sorry but I do not know about the spike in experiments in detail
and do not want to mislead you. Perhaps re-reading the answer by James
MacDonald to your enquiry a few weeks might be of help
https://stat.ethz.ch/pipermail/bioconductor/2005-May/008926.html
Or perhaps someone in the BioConductor mailing list might know.
I think all you need is something like the below :
spikein.genes <- c("geneA", "geneB", "geneC", "geneD") # see [1]
raw <- ReadAffy()
out <- justRMA(raw)
pms <- pm(out)[ spikein.genes, ]
mms <- mm(out)[ spikein.genes, ]
con <- matrix( ... ) # see [2]
par(mfrow = c(1, 2))
y.max <- max( max(pms), max(mms) )
matplot(con, pms, log = "xy", main = "PM", ylim=c(0, y.max) )
lines(con[1, ], apply(pms, 2, mean), lwd = 3)
matplot(con, mms, log = "xy", main = "MM", ylim=c(0, y.max) )
lines(con[1, ], apply(mms, 2, mean), lwd = 3)
IMPORTANT NOTES :
[1] should represent the names of the spiked in genes and
length(spikein.genes) should equal to the number of genes spiked in.
[2] should represent the concentration of each spike in gene on each
array and should be a matrix with nrow(con) equal to
length(spikein.genes) and 42 columns. T
Here are two examples of how the 'con' matrix might look like. In both
cases assume that there are 4 spike in genes (indicated by "geneA",
"geneB", "geneC" and "geneD") and 4 arrays (Array 1 - 4).
a) Spike in - All the spike in genes at at the same concentration for
each array. i.e. your 'con' matrix might look like
Array1 Array2 Array3 Array4
geneA 0.50 0.75 1.00 1.50
geneB 0.50 0.75 1.00 1.50
geneC 0.50 0.75 1.00 1.50
geneD 0.50 0.75 1.00 1.50
In this case, you can easily generate the con matrix in R as
con <- matrix( c(0.50, 0.75, 1.00, 1.50), nc=4, nr=4, byrow=TRUE )
b) Latin square - You have 4 spike in genes and 4 arrays
Array1 Array2 Array3 Array4
geneA 0.50 0.75 1.00 1.50
geneB 0.75 1.00 1.50 0.50
geneC 1.00 1.50 0.50 0.75
geneD 1.50 0.50 0.75 1.00
In this case, I would suggest that you write the format above in an
excel file, save it as txt or csv and read it in as matrix.
I hope this is somewhat useful and I hope someone corrects me if I am
wrong in my interpretation. In future may I suggest that you read the
documentations, try out the examples they give to manipulate it to your
problem and think about the codes rather than hoping for a point and
click system. And please learn to ask your questions clearly !
Regards, Adai
On Thu, 2005-06-02 at 21:11 +0200, Mohammad Esad-Djou wrote:
> Hi,
> Thank you, your advice has me helped. Therefore I would like to go back a step! :o)
> I have further questions! I hope that you can clarify me.
>
> ramasamy at cancer.org.uk schrieb am 01.06.05 18:07:42:
> > 3. The authors of SpikeIn names (or later renamed) the array names to be
> > "0.50", "0.75" etc which is stored as character (as indicated by the
> > quotes) since names need to be character. You can coerce this to numeric
> > by using as.numeric() function. I believe that sampleNames(pset1) is
> > something like "./R/ME_cel/Expt1_R1.CEL" which you cannot coerce into
> > numerics. See my previous email about extracting info from sample names.
> >
>
> I have before also asked and I know:
> The Spike-in could be one of two experiments that were run by Affymetrix using HG-95A and HG-U133ATAG chips.
> I want to use
>
> Spike-in experiment by using HG-U133atag
>
> and CEL files of
>
> http://www.affymetrix.com/support/technical/sample_data/datasets.affx (141 MB)
>
> downloaded.
>
> I have 42 CEL files: 12_13_02_U133A_Mer_Latin_Square_ExptXX_RX.CEL
>
> I would like to use similar R program, as in
>
> Description of affy
> Laurent Gautier, Rafael Irizarry, Leslie Cope, and Ben Bolstad
> April 21, 2005
>
> page 22 (see below, previous email)
>
> was written.
>
> My previous experiments are unsuccessful. It looks in such a way that I am in wrong way.
> Therefore repeat I mz old question:
> Relationship between SpikeIn and Hg-u133atag is unclear to me. Can you explain to me?
> How can I implement from CEL files Spike-in experiments?
>
> I believe, my errors lie not in syntax of R, but rather in semantics. can you explain please coherences of this problem me?
> (or a simple example give?)
>
> Best Regards,
> Mohammad
>
> > 4. I believe the 'concentrations' refers to concentrations of the spike
> > in genes and are known prior to hybridisation. So you cannot calculate
> > the 'concentrations' from microarray data.
> > 5. 'ProbeSet' is a class not a name. You cannot turn something into a
> > 'ProbeSet' class by using probeset(). Do you know what probeset() does ?
> > Have you at least read the documentation for this via help(probeset).
> >
> > 6. To get the PM value, why just do as the example in help(probeset)
> > suggests ? i.e. pms <- pm( data.raw )
> >
> > Regards, Adai
> >
> >
> > On Wed, 2005-06-01 at 17:14 +0200, Mohammad Esad-Djou wrote:
> > > Hallo all,
> > > thank you very much for your suggestions.
> > >
> > > > Next time, please learn to ask the question more clearly (with example
> > > > of the desired output) to avoid the rest of guessing (e.g. what do you
> > > > mean by "correctly finding numeric values").
> > >
> > > Yes. You are right. I try to reformulate my question. I would like to compute concentrations for different ProbeSet.
> > > I used SpikeIn example in
> > >
> > > Description of affy
> > > Laurent Gautier, Rafael Irizarry, Leslie Cope, and Ben Bolstad
> > > April 21, 2005
> > >
> > > page 22:
> > >
> > > > data(SpikeIn)
> > > > pms <- pm(SpikeIn)
> > > > mms <- mm(SpikeIn)
> > > > par(mfrow = c(1, 2))
> > > > concentrations <- matrix(as.numeric(sampleNames(SpikeIn)), 20,
> > > + 12, byrow = TRUE)
> > > > matplot(concentrations, pms, log = "xy", main = "PM", ylim = c(30,
> > > + 20000))
> > > > lines(concentrations[1, ], apply(pms, 2, mean), lwd = 3)
> > > > matplot(concentrations, mms, log = "xy", main = "MM", ylim = c(30,
> > > + 20000))
> > > > lines(concentrations[1, ], apply(mms, 2, mean), lwd = 3)
> > >
> > >
> > > I wrote:
> > > >library(affy)
> > > >data.raw <- ReadAffy(filenames="./R/ME_cel/Expt1_R1.CEL", ....)
> > > >pset1 <- probeset(data.raw,geneNames(data.raw)[1])
> > >
> > > Test:
> > > >pset1
> > > $"1007_s_at"
> > > ProbeSet object:
> > > id=1007_s_at
> > > pm= 16 probes x 4 chips
> > >
> > > and:
> > > > SpikeIn
> > > ProbeSet object:
> > > id=AFFX-BioB-5_at
> > > pm= 20 probes x 12 chips
> > >
> > > R program calls both objects ProbeSet, but I cannot go same way as above example: (e.g.)
> > >
> > > > pms <- pm(pset1)
> > > Error in pm(pset1) : No direct or inherited method for function "pm" for this call
> > >
> > > > sampleNames(pset1)
> > > Error in sampleNames(pset1) : No direct or inherited method for function "sampleNames" for this call
> > >
> > > > sampleNames(SpikeIn)
> > > [1] "0.50" "0.75" "1.00" "1.50" "2.00" "3.00" "5.00" "12.50"
> > > [9] "25.00" "50.00" "75.00" "150.00"
> > >
> > >
> > > My main question:
> > > 1. How can I compute concentrations for different ProbeSet?
> > >
> > > 2. What didn't I consider for ProbeSet (SpikeIn and pset1)?
> > >
> > > Thanks,
> > > Mohammad Esad-Djou
> > > __________________________________________________________
> > > Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
> > > weltweit telefonieren! http://freephone.web.de/?mc=021201
> > >
> > >
> >
>
>
> __________________________________________________________
> Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
> weltweit telefonieren! http://freephone.web.de/?mc=021201
>
>
More information about the Bioconductor
mailing list