Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jokergoo committed Oct 13, 2018
1 parent aa04b9f commit 6cc99d3
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 95 deletions.
168 changes: 84 additions & 84 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,89 +1,89 @@
S3method("$", CELL_META)
S3method("$", "CELL_META")
export("$.CELL_META")
S3method("print", CELL_META)
S3method("print", "CELL_META")
export("print.CELL_META")
export('circos.arrow')
export('circos.axis')
export('circos.clear')
export('circos.dendrogram')
export('circos.genomicDensity')
export('circos.genomicHeatmap')
export('circos.genomicIdeogram')
export('circos.genomicInitialize')
export('circos.genomicLabels')
export('circos.genomicLines')
export('circos.genomicLink')
export('circos.genomicPoints')
export('circos.genomicPosTransformLines')
export('circos.genomicRainfall')
export('circos.genomicRect')
export('circos.genomicText')
export('circos.genomicTrack')
export('circos.genomicTrackPlotRegion')
export('circos.info')
export('circos.initialize')
export('circos.initializeWithIdeogram')
export('circos.lines')
export('circos.link')
export('circos.nested')
export('circos.par')
export('circos.points')
export('circos.polygon')
export('circos.raster')
export('circos.rect')
export('circos.segments')
export('circos.text')
export('circos.track')
export('circos.trackHist')
export('circos.trackLines')
export('circos.trackPlotRegion')
export('circos.trackPoints')
export('circos.trackText')
export('circos.update')
export('circos.updatePlotRegion')
export('circos.xaxis')
export('circos.yaxis')
export('cytoband.col')
export('draw.sector')
export('get.all.sector.index')
export('get.all.track.index')
export('get.cell.meta.data')
export('get.current.chromosome')
export('get.current.sector.index')
export('get.current.track.index')
export('highlight.chromosome')
export('highlight.sector')
export('posTransform.default')
export('posTransform.text')
export('read.chromInfo')
export('read.cytoband')
export('reverse.circlize')
export('set.current.cell')
export('show.index')
export(CELL_META)
export(add_transparency)
export(adjacencyList2Matrix)
export(chordDiagram)
export(chordDiagramFromDataFrame)
export(chordDiagramFromMatrix)
export(circlize)
export(col2value)
export(colorRamp2)
export(convert_height)
export(convert_length)
export(convert_x)
export(convert_y)
export(degree)
export(fontsize)
export(generateRandomBed)
export(genomicDensity)
export(getI)
export(rainfallTransform)
export(rand_color)
export(smartAlign)
export(uh)
export(ux)
export(uy)
export("CELL_META")
export("add_transparency")
export("adjacencyList2Matrix")
export("chordDiagram")
export("chordDiagramFromDataFrame")
export("chordDiagramFromMatrix")
export("circlize")
export("circos.arrow")
export("circos.axis")
export("circos.clear")
export("circos.dendrogram")
export("circos.genomicDensity")
export("circos.genomicHeatmap")
export("circos.genomicIdeogram")
export("circos.genomicInitialize")
export("circos.genomicLabels")
export("circos.genomicLines")
export("circos.genomicLink")
export("circos.genomicPoints")
export("circos.genomicPosTransformLines")
export("circos.genomicRainfall")
export("circos.genomicRect")
export("circos.genomicText")
export("circos.genomicTrack")
export("circos.genomicTrackPlotRegion")
export("circos.info")
export("circos.initialize")
export("circos.initializeWithIdeogram")
export("circos.lines")
export("circos.link")
export("circos.nested")
export("circos.par")
export("circos.points")
export("circos.polygon")
export("circos.raster")
export("circos.rect")
export("circos.segments")
export("circos.text")
export("circos.track")
export("circos.trackHist")
export("circos.trackLines")
export("circos.trackPlotRegion")
export("circos.trackPoints")
export("circos.trackText")
export("circos.update")
export("circos.updatePlotRegion")
export("circos.xaxis")
export("circos.yaxis")
export("col2value")
export("colorRamp2")
export("convert_height")
export("convert_length")
export("convert_x")
export("convert_y")
export("cytoband.col")
export("degree")
export("draw.sector")
export("fontsize")
export("generateRandomBed")
export("genomicDensity")
export("get.all.sector.index")
export("get.all.track.index")
export("get.cell.meta.data")
export("get.current.chromosome")
export("get.current.sector.index")
export("get.current.track.index")
export("getI")
export("highlight.chromosome")
export("highlight.sector")
export("posTransform.default")
export("posTransform.text")
export("rainfallTransform")
export("rand_color")
export("read.chromInfo")
export("read.cytoband")
export("reverse.circlize")
export("set.current.cell")
export("show.index")
export("smartAlign")
export("uh")
export("ux")
export("uy")

import(graphics)
importFrom("GlobalOptions", setGlobalOptions)
Expand Down
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Changes in version 0.4.5
------------------------------------------------------------------------
* add `axis.labels.cex` and `labels.cex` in `circos.genomicInitialize()`.
* remove `lwd` in `circos.genomicRect()` because `lwd` is not allowed to be vector.
* fixed a bug when self.link = 1 in chordDiagram()
* add `scale` in chordDiagram()

Changes in version 0.4.4
-------------------------------------------------------------------------
Expand Down
20 changes: 12 additions & 8 deletions R/chordDiagram.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
# -link.largest.ontop pass to `chordDiagramFromMatrix` or `chordDiagramFromDataFrame`
# -link.visible pass to `chordDiagramFromMatrix` or `chordDiagramFromDataFrame`
# -link.rank order to add links to the circle, a large value means to add it later.
# -scale scale each sector to same width
# -... pass to `circos.link`.
#
# == details
Expand Down Expand Up @@ -78,7 +79,7 @@ chordDiagram = function(x, grid.col = NULL, grid.border = NA, transparency = 0.5
link.arr.type = "triangle", link.arr.lty = par("lty"),
link.arr.lwd = par("lwd"), link.arr.col = par("col"),
link.largest.ontop = FALSE, link.visible = TRUE,
link.rank = NULL, ...) {
link.rank = NULL, scale = FALSE, ...) {

if(inherits(x, "matrix")) {
chordDiagramFromMatrix(x, grid.col = grid.col, grid.border = grid.border, transparency = transparency,
Expand All @@ -89,7 +90,7 @@ chordDiagram = function(x, grid.col = NULL, grid.border = NA, transparency = 0.5
link.border = link.border, link.lwd = link.lwd, link.lty = link.lty, link.sort = link.sort, link.decreasing = link.decreasing,
link.arr.length = link.arr.length, link.arr.width = link.arr.width, link.arr.type = link.arr.type, link.arr.lty = link.arr.lty,
link.arr.lwd = link.arr.lwd, link.arr.col = link.arr.col, link.largest.ontop = link.largest.ontop,
link.visible = link.visible, link.rank = link.rank, ...)
link.visible = link.visible, link.rank = link.rank, scale = scale, ...)
} else if(inherits(x, "data.frame")) {
if(ncol(x) > 3) {
if(all(sapply(x, inherits, c("numeric", "integer")))) {
Expand All @@ -102,7 +103,7 @@ chordDiagram = function(x, grid.col = NULL, grid.border = NA, transparency = 0.5
link.border = link.border, link.lwd = link.lwd, link.lty = link.lty, link.sort = link.sort, link.decreasing = link.decreasing,
link.arr.length = link.arr.length, link.arr.width = link.arr.width, link.arr.type = link.arr.type, link.arr.lty = link.arr.lty,
link.arr.lwd = link.arr.lwd, link.arr.col = link.arr.col, link.largest.ontop = link.largest.ontop,
link.visible = link.visible, link.rank = link.rank, ...)))
link.visible = link.visible, link.rank = link.rank, scale = scale, ...)))
} else {
chordDiagramFromDataFrame(x, grid.col = grid.col, grid.border = grid.border, transparency = transparency,
col = col, order = order, directional = directional, direction.type = direction.type,
Expand All @@ -111,7 +112,7 @@ chordDiagram = function(x, grid.col = NULL, grid.border = NA, transparency = 0.5
link.border = link.border, link.lwd = link.lwd, link.lty = link.lty, link.sort = link.sort, link.decreasing = link.decreasing,
link.arr.length = link.arr.length, link.arr.width = link.arr.width, link.arr.type = link.arr.type, link.arr.lty = link.arr.lty,
link.arr.lwd = link.arr.lwd, link.arr.col = link.arr.col, link.largest.ontop = link.largest.ontop,
link.visible = link.visible, link.rank = link.rank, ...)
link.visible = link.visible, link.rank = link.rank, scale = scale, ...)
}
} else {
chordDiagramFromDataFrame(x, grid.col = grid.col, grid.border = grid.border, transparency = transparency,
Expand All @@ -121,7 +122,7 @@ chordDiagram = function(x, grid.col = NULL, grid.border = NA, transparency = 0.5
link.border = link.border, link.lwd = link.lwd, link.lty = link.lty, link.sort = link.sort, link.decreasing = link.decreasing,
link.arr.length = link.arr.length, link.arr.width = link.arr.width, link.arr.type = link.arr.type, link.arr.lty = link.arr.lty,
link.arr.lwd = link.arr.lwd, link.arr.col = link.arr.col, link.largest.ontop = link.largest.ontop,
link.visible = link.visible, link.rank = link.rank, ...)
link.visible = link.visible, link.rank = link.rank, scale = scale, ...)
}
} else {
stop("`x` can only be a matrix or a data frame.")
Expand Down Expand Up @@ -317,6 +318,7 @@ mat2df = function(mat) {
# -link.visible whether plot the link. The value is logical, if it is set to ``FALSE``, the corresponding link will not
# plotted, but the space is still ocuppied. The format of this argument is same as ``link.lwd``
# -link.rank order to add links to the circle, a large value means to add it later.
# -scale scale each sector to same width
# -... pass to `circos.link`
#
# == details
Expand All @@ -339,7 +341,7 @@ chordDiagramFromMatrix = function(mat, grid.col = NULL, grid.border = NA, transp
link.arr.type = "triangle", link.arr.lty = par("lty"),
link.arr.lwd = par("lwd"), link.arr.col = par("col"),
link.largest.ontop = FALSE, link.visible = TRUE,
link.rank = NULL, ...) {
link.rank = NULL, scale = FALSE, ...) {

if(!is.matrix(mat)) {
stop("`mat` can only be a matrix.")
Expand Down Expand Up @@ -574,6 +576,7 @@ chordDiagramFromMatrix = function(mat, grid.col = NULL, grid.border = NA, transp
link.largest.ontop = link.largest.ontop,
link.visible = link.visible,
link.rank = link.rank,
scale = scale,
...)

}
Expand Down Expand Up @@ -634,6 +637,7 @@ chordDiagramFromMatrix = function(mat, grid.col = NULL, grid.border = NA, transp
# -link.visible whether plot the link. The value is logical, if it is set to ``FALSE``, the corresponding link will not
# plotted, but the space is still ocuppied. The format of this argument is same as ``link.lwd``
# -link.rank order to add links to the circle, a large value means to add it later.
# -scale scale each sector to same width
# -... pass to `circos.link`
#
# == details
Expand All @@ -654,7 +658,7 @@ chordDiagramFromDataFrame = function(df, grid.col = NULL, grid.border = NA, tran
link.arr.width = link.arr.length/2,
link.arr.type = "triangle", link.arr.lty = par("lty"),
link.arr.lwd = par("lwd"), link.arr.col = par("col"),
link.largest.ontop = FALSE, link.visible = link.visible,
link.largest.ontop = FALSE, link.visible = TRUE,
link.rank = seq_len(nrow(df)),
scale = FALSE, ...) {

Expand Down Expand Up @@ -885,7 +889,7 @@ chordDiagramFromDataFrame = function(df, grid.col = NULL, grid.border = NA, tran
l = df$cn == nm
if(self.link == 1) {
l2 = ! df$rn[l] == nm # self link
od[[nm]] = order(od[[nm]][l2])
od[[nm]][l2] = order(od[[nm]][l2])
} else {
l2 = rep(TRUE, sum(l))
}
Expand Down
1 change: 1 addition & 0 deletions man/Subset.CELL_META.rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
\name{$.CELL_META}
\alias{$.CELL_META}
\alias{Subset.CELL_META}
\title{
Easy to way to get meta data in the current cell
}
Expand Down
3 changes: 2 additions & 1 deletion man/chordDiagram.rd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ chordDiagram(x, grid.col = NULL, grid.border = NA, transparency = 0.5,
link.arr.type = "triangle", link.arr.lty = par("lty"),
link.arr.lwd = par("lwd"), link.arr.col = par("col"),
link.largest.ontop = FALSE, link.visible = TRUE,
link.rank = NULL, ...)
link.rank = NULL, scale = FALSE, ...)
}
\arguments{

Expand Down Expand Up @@ -60,6 +60,7 @@ chordDiagram(x, grid.col = NULL, grid.border = NA, transparency = 0.5,
\item{link.largest.ontop}{pass to \code{\link{chordDiagramFromMatrix}} or \code{\link{chordDiagramFromDataFrame}}}
\item{link.visible}{pass to \code{\link{chordDiagramFromMatrix}} or \code{\link{chordDiagramFromDataFrame}}}
\item{link.rank}{order to add links to the circle, a large value means to add it later.}
\item{scale}{scale each sector to same width}
\item{...}{pass to \code{\link{circos.link}}.}

}
Expand Down
3 changes: 2 additions & 1 deletion man/chordDiagramFromDataFrame.rd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ chordDiagramFromDataFrame(df, grid.col = NULL, grid.border = NA, transparency =
link.arr.width = link.arr.length/2,
link.arr.type = "triangle", link.arr.lty = par("lty"),
link.arr.lwd = par("lwd"), link.arr.col = par("col"),
link.largest.ontop = FALSE, link.visible = link.visible,
link.largest.ontop = FALSE, link.visible = TRUE,
link.rank = seq_len(nrow(df)),
scale = FALSE, ...)
}
Expand Down Expand Up @@ -54,6 +54,7 @@ chordDiagramFromDataFrame(df, grid.col = NULL, grid.border = NA, transparency =
\item{link.largest.ontop}{controls the order of adding links, whether based on the absolute value?}
\item{link.visible}{whether plot the link. The value is logical, if it is set to \code{FALSE}, the corresponding link will not plotted, but the space is still ocuppied. The format of this argument is same as \code{link.lwd}}
\item{link.rank}{order to add links to the circle, a large value means to add it later.}
\item{scale}{scale each sector to same width}
\item{...}{pass to \code{\link{circos.link}}}
}
Expand Down
3 changes: 2 additions & 1 deletion man/chordDiagramFromMatrix.rd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ chordDiagramFromMatrix(mat, grid.col = NULL, grid.border = NA, transparency = 0.
link.arr.type = "triangle", link.arr.lty = par("lty"),
link.arr.lwd = par("lwd"), link.arr.col = par("col"),
link.largest.ontop = FALSE, link.visible = TRUE,
link.rank = NULL, ...)
link.rank = NULL, scale = FALSE, ...)
}
\arguments{

Expand Down Expand Up @@ -58,6 +58,7 @@ chordDiagramFromMatrix(mat, grid.col = NULL, grid.border = NA, transparency = 0.
\item{link.largest.ontop}{controls the order of adding links, whether based on the absolute value?}
\item{link.visible}{whether plot the link. The value is logical, if it is set to \code{FALSE}, the corresponding link will not plotted, but the space is still ocuppied. The format of this argument is same as \code{link.lwd}}
\item{link.rank}{order to add links to the circle, a large value means to add it later.}
\item{scale}{scale each sector to same width}
\item{...}{pass to \code{\link{circos.link}}}
}
Expand Down

0 comments on commit 6cc99d3

Please sign in to comment.