Skip to content

Commit

Permalink
add set.current.cell()
Browse files Browse the repository at this point in the history
  • Loading branch information
jokergoo committed Apr 19, 2017
1 parent 6a0ed90 commit 5861c52
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export('print.CELL_META')
export('read.chromInfo')
export('read.cytoband')
export('reverse.circlize')
export('set.current.cell')
export('show.index')
export(CELL_META)
export(add_transparency)
Expand Down
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Changes in version 0.4.0
* add `circos.genomicIdeogram()`, `circos.genomicHeatmap()`, `circos.genomicLabels()`
* add `circos.nestes()`
* vignette has been moved to http://jokergoo.github.io/circlize_book/book/index.html
* add `set.current.cell()`

Changes in version 0.3.10
----------------------------------------------------------------------------
Expand Down
24 changes: 24 additions & 0 deletions R/global.R
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,30 @@ set.current.sector.index = function(x) {
return(invisible(NULL))
}

# == title
# Set flag to current cell
#
# == param
# -sector.index sector index
# -track.index track index
#
# == details
# After setting the current cell, all functions which need ``sector.index`` and ``track.index``
# arguments and are applied to the current cell do not need to specify the two arguments explicitly.
#
# == example
# pdf(NULL)
# circos.initialize(letters[1:8], xlim = c(0, 1))
# circos.track(ylim = c(0, 1))
# circos.info()
# set.current.cell("b", 1)
# circos.info()
# circos.clear()
# dev.off()
set.current.cell = function(sector.index, track.index) {
set.current.sector.index(sector.index)
set.current.track.index(track.index)
}

get.cell.data = function(sector.index = get.current.sector.index(), track.index = get.current.track.index()) {
.CELL.DATA = get(".CELL.DATA", envir = .CIRCOS.ENV)
Expand Down
21 changes: 21 additions & 0 deletions man/set.current.cell.rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
\name{set.current.cell}
\alias{set.current.cell}
\title{
Set flag to current cell
}
\description{
Set flag to current cell
}
\usage{
set.current.cell(sector.index, track.index)
}
\arguments{

\item{sector.index}{sector index}
\item{track.index}{track index}

}
\examples{
# There is no example
NULL
}
Expand Down

0 comments on commit 5861c52

Please sign in to comment.