[BioC] How to modify PM/MM intensity values

James W. MacDonald jmacdon at med.umich.edu
Fri Sep 18 15:03:20 CEST 2009


Hi Javier,

Javier Perez Florido wrote:
> Dear list,
> I am trying to modify the original PM/MM values of a CEL file. The idea is
> to permute randomly the PM-MM values for a given CEL file for a control
> experiment.
> The code which tries to achieve this is the following:
> 
> geneNames<-featureNames(Dilution) # Get genenames of data set Dilution
> matrix_pm<-pm(Dilution[,1],geneNames) # Get the PM values (working with the
> first array)
> matrix_mm<-mm(Dilution[,1],geneNames) # Get the MM values
> matrix_pmmm<-cbind(matrix_pm,matrix_mm) #Merge in a unique matrix PM and MM
> values for a given probe (Column 1->PM, Column 2-> MM)
> permutation_probes<-sample(1:nrow(matrix_pmmm)) #Produce a random
> permutation of size given by the number of probes
> p_matrix_pmmm<-matrix_pmmm[permutation_probes,] # Permute the order of the
> probes
> matrix_pm[,1]<-p_matrix_pmmm[,1] #Assign to the original PM values the
> permutated PM values (the order of the probes is kept, the value is changed)
> matrix_mm[,1]<-p_matrix_pmmm[,2] #Assign to the original MM values the
> permutated MM values (the order of the probes is kept, the value is changed)
> pm(Dilution[,1],geneNames)<-matrix_pm[,1] # Modify the intensities of the PM
> values in the original CEL file
> mm(Dilution[,1],geneNames)<-matrix_mm[,1]  # Modify the intensities of the
> MM values in the original CEL file
> 
> In the last two lines, I get the following error
> Error en `pm<-`(`*tmp*`, geneNames, value = c(1852, 111, 648.5, 1436.8,  :
>   unused argument(s) (c("100_g_at", "1000_at", "1001_at", "1002_f_at",
> "1003_s_at", "1004_at", "1005_at"

You don't need the featureNames. In addition, you don't need to do 
things one column at a time.

 > pms <- pm(Dilution)
 > mms <- mm(Dilution)
 > perm <- sample(1:201800, 201800)
 > pm(Dilution) <- pms[perm,]
 > mm(Dilution) <- mms[perm,]

or if you want to permute each chip separately,

 > pms2 <- matrix(NA, ncol = 4, nrow = 201800)
 > mms2 <- pms2
 > for(i in 1:4){
+ permind <- sample(1:201800, 201800)
+ pms2[,i] <- pms[permind,i]
+ mms2[,i] <- mms[permind,i]
+ }
 > pm(Dilution) <- pms2
 > mm(Dilution) <- mms2

Best,

Jim


> 
> The error is the same if I try:
> 
> pm(Dilution[,1],geneNames)<-matrix_pm # Modify the intensities of the PM
> values in the original CEL file
> mm(Dilution[,1],geneNames)<-matrix_mm  # Modify the intensities of the MM
> values in the original CEL fil
> 
> 
> Or if I try:
> 
> pm(Dilution[,1])<-matrix_pm
> mm(Dilution[,1])<-matrix_mm
> 
> The following error comes up:
> 
> Error in phenoData(x)[i, , ...] <- phenoData(value)[i, , ..., drop = FALSE]
> :
>   the argument "i" is absent
> 
> Any tips?
> Thanks in advance,
> Javier
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> 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

-- 
James W. MacDonald, M.S.
Biostatistician
Douglas Lab
University of Michigan
Department of Human Genetics
5912 Buhl
1241 E. Catherine St.
Ann Arbor MI 48109-5618
734-615-7826



More information about the Bioconductor mailing list