This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Cmd+Shift+Enter.
plot(cars)
NA
NA
install.packages("circlize")
Error in install.packages : Updating loaded packages
library(circlize)
mat = matrix(sample(1:100, 18, replace = TRUE), 3, 6)
rownames(mat) = letters[1:3]
colnames(mat) = LETTERS[1:6]
par(cex = 2, mar = c(0, 0, 0, 0))
chordDiagram(mat)
install.packages("readxl")
Error in install.packages : Updating loaded packages
library(readxl)
# Specify sheet with a number or name
figure_5_A <- read_excel("Table_5.xlsx", sheet = "Fig5 panel a")
print(theData)
chordDiagram(theData)
figure_5_B <- read_excel("Table_5.xlsx", sheet = "Fig 5 panel b")
figure_5_B
library(gridExtra)
chordDiagram(figure_5_B, grid.col = grid.col, annotationTrack = "grid", cl = "table")
Error in chordDiagramFromDataFrame(x, grid.col = grid.col, grid.border = grid.border, :
object 'grid.col' not found
layout(matrix(1:9, 3, 3))
for(i in 1:9) {
sectors = 1:8
par(mar = c(0.5, 0.5, 0.5, 0.5))
circos.par(cell.padding = c(0, 0, 0, 0))
circos.initialize(sectors, xlim = c(0, 1))
circos.track(ylim = c(0, 1), track.height = 0.05,
bg.col = rand_color(8), bg.border = NA)
for(i in 1:20) {
se = sample(1:8, 2)
circos.link(se[1], runif(2), se[2], runif(2),
col = rand_color(1, transparency = 0.4), border = NA)
}
circos.clear()
}
circos.initializeCircularGenome(figure_5_B)
Error in data.frame(name, 0, genome_size) :
argument "genome_size" is missing, with no default
{rcos.par(cell.padding = c(0, 0, 0, 0))} circos.initialize(sectors, xlim = c(0, 1)) circos.track(ylim = c(0, 1), track.height = 0.05, bg.col = rand_color(8), bg.border = NA) for(i in 1:20) { se = sample(1:8, 2) circos.link(se[1], runif(2), se[2], runif(2), col = rand_color(1, transparency = 0.4), border = NA) } circos.clear() }
{chordDiagram(figure_5_B, grid.col = grid.col, annota}
df <-figure_5_B[order(-figure_5_B$"Number of shared GCFs"),]
head(df)
df <-figure_5_B[order(-figure_5_B$"Number of shared GCFs"),]
head(df)
df2 <-figure_5_A[order(figure_5_A$"Number of shared GCFs"),]
head(df2)