SegmentPlotWrite {ADaCGH} | R Documentation |
Wrapper to do in a single call the segmentation, plotting, and writing out of results from segmentation.
SegmentPlotWrite(data, chrom, mergeSegs, Pos, idtype, organism, method, geneNames, commondata, ...)
data |
The aCGH data; genes in rows, subjects or arrays in columns. Data should be ordered by chromosome and position within chromosome. |
chrom |
The (numeric) vector with the chromosome indicator |
mergeSegs |
Merge (genome-wide) the resulting segments using mergeLevels ? |
Pos |
The location (e.g., position in kbases) of each probe in
the chromosome. A vector of the same length as the number of rows in
data |
idtype |
The type of id of the gene name; one of ('None', 'cnio', 'affy', 'clone', 'acc', 'ensembl', 'entrez', 'ug') corresponding, respectively to None, CNIO ID, Affymetrix, Clone ID, Accession Number, Ensembl ID, Entrez ID, UniGene. |
organism |
The organism; one of ('None', 'Hs', 'Mm', 'Rn') corresponding, respectively, to None, Homo sapiens, Mus musculus (mouse) and Rattus norvegicus (rat). |
method |
The segmentation method. One of "ACE", "HMM", "BioHMM", "GLAD", "DNAcopy", "CGHseg", "PSW", "Wavelets". |
geneNames |
A vector with the names of the genes or probes, as you want to use them to label figures and output. |
commondata |
A data frame with columns that contain the common information about the clones/genes. We do nothing with this, except it is part of the output. It is common practice that this data frame contains columns ID, Chrosome (need not be numeric, can be a factor), Start (the initial position of a clone or gene), End (the final position of a clone or gene) and MidPoint (often, the mid point or whatever you regard as appropriate representative of the "center" of the clone). But you can use something else. |
... |
Additional arguments passed to the underlying pSegment* and segmentPlot functions. |
Just a convenience wrapper.
This function is used for its side effects. Produce plots and write
out results to a file. See writeResults
and segmentPlot
.
Ramon Diaz-Uriarte rdiaz02@gmail.com
Diaz-Uriarte, R. and Rueda, O.M. (2006). ADaCGH: an R package and web-based application for the analysis of aCGH data. Tech. report. http://www.ligarto.org/rdiaz/Papers/adacgh.pdf, http://adacgh.bioinfo.cnio.es.
writeResults
, segmentPlot
, pSegment
## Not run: ## This will not work unless you have a working Python installation setwd("/tmp/o3") ## all slaves need a common dir to read and write. mpiInit() data(cghE1) tmpchr <- sub("chr", "", cghE1$Chromosome) chrom.numeric <- as.numeric(as.character(tmpchr)) chrom.numeric[tmpchr == "X"] <- 23 chrom.numeric[tmpchr == "Y"] <- 24 rm(tmpchr) reorder <- order(chrom.numeric, cghE1$UG.Start, cghE1$UG.End, cghE1$Name) cghE1 <- cghE1[reorder, ] chrom.numeric <- chrom.numeric[reorder] ## one example SegmentPlotWrite(cghE1[, 5:7], chrom.numeric, merge = FALSE, Pos = cghE1$UG.Start, idtype = "ug", organism = "Hs", method = "Wavelets", geneNames = cghE1[, 1], commondata = cghE1[, 1:4]) ## all other methods except PSW and ACE for(mm in c("DNAcopy", "GLAD", "HMM", "BioHMM", "CGHseg")) { cat("\n\n mm is ", mm, "\n\n") SegmentPlotWrite(cghE1[, 5:7], chrom.numeric, merge = TRUE, Pos = cghE1$UG.Start, idtype = "ug", organism = "Hs", method = mm, geneNames = cghE1[, 1], commondata = cghE1[, 1:4]) } ## End(Not run)