Modified qc.affy code for chip type: soybeancdf
0
0
Entering edit mode
@alvord-greg-dms-contr-1603
Last seen 10.2 years ago
Hello All - Previously we experienced difficulty in obtaining quality control statistics from the library 'simpleaffy' for the soybean genome with chip type: soybeancdf. See our query of 9/14/06 to the list. After reading Crispin Miller's post to the list on 8/2/06 and following some useful suggestions by Jenny Drnevich (9/14/06), in response to our query, we have successfully modified the code to qc.affy to obtain scale factors, percent.present, average.background, minimum.background and maximum.background quality control statistics. Many thanks to Jenny for her inputs. We have chosen to name this function: soybean.mod.qc.affy. It may be useful for other chip types that the function qc( ) does not recognize, as well. Explanatory comments we have made are delimited by three pound signs (###). Specific parts of the qc.affy( ) function (what qc( ) actually uses), are indicated by single pound signs (#). You may download this from our web address: http://css.ncifcrf.gov/services/download/soybean.mod.qc.affy.zip or from the attached text file: soybean.mod.qc.affy.txt Note: We suggest you load libraries 'affy' and 'simpleaffy' before executing the function. The code follows: soybean.mod.qc.affy <- function (unnormalised, normalised = NULL, tau = 0.015, logged = TRUE, cdfn = cleancdfname(cdfName(unnormalised))) { if (is.null(normalised)) { getAllSpikeProbes("hgu133acdf") normalised <- call.exprs(unnormalised, "mas5") } ### ### All lines that have been removed from Crispin Miller's ### original qc.affy() function are delimited with a pound sign ### #if (!haveQCParams(cleancdfname(cdfName(unnormalised)))) { # stop(paste("I'm sorry, I do not know about chip type:", # cleancdfname(cdfName(unnormalised)))) # } ### ### x <- exprs(normalised) ### ### ### Crispin Miller's orginal qc.affy() function contains the following statement: ### det <- detection.p.val(unnormalised, tau = tau, alpha1 = getAlpha1(cdfn), ### alpha2 = getAlpha2(cdfn)) ### ### At this point, hardcode values of your choice for alpha1 and alpha2. ### Note: mas5calls() uses a generic values of 0.04 and 0.06, respectively, ### for alpha1 and alpha2. ### det <- detection.p.val(unnormalised, tau = tau, alpha1 = .04, alpha2 = .06) dpv <- apply(det$call, 2, function(x) { x[x != "P"] <- 0 x[x == "P"] <- 1 x <- as.numeric(x) return(100 * sum(x)/length(x)) }) sfs <- normalised at description@preprocessing$sfs target <- normalised at description@preprocessing$tgt if (!logged) { x <- log2(x) } bgsts <- .bg.stats(unnormalised)$zonebg meanbg <- apply(bgsts, 1, mean) minbg <- apply(bgsts, 1, min) maxbg <- apply(bgsts, 1, max) stdvbg <- sqrt(apply(bgsts, 1, var)) ### ### More code to be commented out... ### # qc.probenames <- getAllQCProbes(cdfn) # qc.probe.vals <- rbind(c(), (sapply(qc.probenames, function(y) { # x[y, ] # }))) # rownames(qc.probe.vals) <- colnames(x) # spike.probenames <- getAllSpikeProbes(cdfn) # spike.vals <- rbind(c(), (sapply(spike.probenames, function(y) { # x[y, ] # }))) # rownames(spike.vals) <- colnames(x) # bb <- getBioB(cdfn) # if (!is.na(bb)) { # biobcalls <- det$call[bb, ] # } # else { # biobcalls <- NULL # } ### ### The original return function from Crispin Miller's qc.affy() function is: ### return(new("QCStats", scale.factors = sfs, target = target, ### percent.present = dpv, average.background = meanbg, minimum.background = minbg, ### maximum.background = maxbg, spikes = spike.vals, qc.probes = qc.probe.vals, ### bioBCalls = biobcalls)) ### ### The return function has been modified as follows: ### return(new("QCStats", scale.factors = sfs, target = target, percent.present = dpv, average.background = meanbg, minimum.background = minbg, maximum.background = maxbg)) } We hope this may be useful to some other users who may have encountered problems with the function qc( ) with their chips. Greg W. Gregory Alvord, Ph.D. Director, Statistical Consulting Services Computer and Statistical Services National Cancer Institute at Frederick Post Office Box B Frederick, MD 21702-1201 Phone: 301.846.5101 Facsimile: 301.846.6196 E-Mail gwa at css.ncifcrf.gov <mailto:gwa at="" css.ncifcrf.gov=""> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: soybean.mod.qc.affy.txt Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070103/ 5d8c584f/attachment.txt
Cancer cdf Cancer cdf • 905 views
ADD COMMENT

Login before adding your answer.

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