Share an R package that makes a string: Ggbio. and code as follows. Explain the specific usage later ...
Library (Genomicranges) set.seed (1) N <-100gr <-granges (seqnames = sample (C ("Chr1", "CHR2", "CHR3"), size = N, Replac E = True), iranges (start = sample (1:300, size = N, replace = true), Width = sample (70:75,size = N, replace = TRUE), strand = Sample (C ("+", "-", "*"), size = N,replace = TRUE), value = Rnorm (n, ten, 3), score = Rnorm (n, +,), sample = sample (C ( "Normal", "tumor"), size = N, replace = TRUE), pair = sample (Letters,size = N, replace = true)) library (Ggbio) seqlengths (gr ) <-C (GR) $to. gr <-gr[sample (1:length (gr), size = Length (gr))]idx <-sample (1:length (GR), S ize =) gr <-gr[idx]ggplot () + layout_circle (gr, Geom = "Ideo", fill = "gray70", radius = 7, trackwidth = 3) +layout_ Circle (gr, Geom = "Bar", radius = ten, Trackwidth = 4,aes (fill = score, y = score)) +layout_circle (gr, Geom = "point", Colo r = "Red", radius = 14,trackwidth = 3, Grid = TRUE, aes (y = score)) +layout_circle (gr, Geom = "link", linked.to = "to.gr", Radius = 6, trackwidth= 1)
The Ggbio package can also be used to make other complex diagrams (see below), using the package's Help documentation:
Using Ggbio to make chord graphs in R