How to modify PM/MM intensity values
1
0
Entering edit mode
@javier-perez-florido-3121
Last seen 6.1 years ago
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" 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]]
probe probe • 923 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 7 hours ago
United States
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
ADD COMMENT

Login before adding your answer.

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