drawFeatures {BubbleTree} | R Documentation

## drawFeatures

### Description

draw the features

### Usage

    drawFeatures(.Object, rbd, col = NULL)

    ## S4 method for signature 'BTreePlotter'
    drawFeatures(.Object, rbd, col = "black")

### Arguments

`.Object` | the object
`rbd` | the rbd object
`col` | the col value

### Value

draw the annotation on the track

### Examples

    load(system.file("data", "allCall.lst.RData", package="BubbleTree"))
    load(system.file("data", "cancer.genes.minus2.rda", package="BubbleTree"))
    load(system.file("data", "vol.genes.rda", package="BubbleTree"))
    load(system.file("data", "gene.uni.clean.gr.rda", package="BubbleTree"))
    load(system.file("data", "cyto.gr.rda", package="BubbleTree"))

    # 77 common cancer genes merged from 2 sets
    comm <- btcompare(vol.genes, cancer.genes.minus2)

    btreeplotter <- new("BTreePlotter", branch.col="gray50")
    annotator <- new("Annotate")

    nn <- "sam12"
    cc <- allCall.lst[[nn]]
    z <- drawBTree(btreeplotter, cc@rbd.adj) +
        ggplot2::labs(title=sprintf("%s (%s)", nn, info(cc)))
    out <- cc@result$dist  %>% filter(seg.size >= 0.1 ) %>%
        arrange(gtools::mixedorder(as.character(seqnames)), start)

    ann <- with(out, {
        annoByGenesAndCyto(annotator,
                           as.character(out$seqnames),
                           as.numeric(out$start),
                           as.numeric(out$end),
                           comm$comm,
                           gene.uni.clean.gr=gene.uni.clean.gr,
                           cyto.gr=cyto.gr)
    })

    out$cyto <- ann$cyto
    out$genes <- ann$ann
    v <- z + drawFeatures(btreeplotter, out)
    print(v)

[Package BubbleTree version 2.24.0 Index]