R/get.CP.polygons.R

Defines functions get.CP.polygons

get.CP.polygons <- function(clone.out, ...) {
    polygon.list <- list();

    for (j in 1:length(clone.out$clones)) {
        polygon.list[[j]] <- polygonGrob(
            name = paste0('clone.polygon.', j),
            x = clone.out$clones[[j]]$x,
            y = clone.out$clones[[j]]$y,
            default.units = 'native',
            gp = gpar(
                fill = clone.out$clones[[j]]$col,
                col = 'transparent',
                alpha = clone.out$clones[[j]]$alpha
                )
            );
        }

    clone.out$grobs <- c(clone.out$grobs, polygon.list);
    }

Try the CancerEvolutionVisualization package in your browser

Any scripts or data that you put into this service are public.

CancerEvolutionVisualization documentation built on Nov. 22, 2023, 1:08 a.m.