Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Depends:
R (>= 3.0.2)
Imports:
Biobase,
BiocGenerics (>= 0.29.2),
BiocGenerics (>= 0.59.5),
grDevices,
graphics,
methods,
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ export(squareroot)
export(summarizeFilter)
export(tail)
export(timeFilter)
export(transform)
export(transformList)
export(transformReference)
export(transform_gate)
Expand Down Expand Up @@ -272,6 +271,7 @@ importFrom(BiocGenerics,ncol)
importFrom(BiocGenerics,nrow)
importFrom(BiocGenerics,sort)
importFrom(BiocGenerics,toTable)
importFrom(BiocGenerics,transform)
importFrom(S4Vectors,DataFrame)
importFrom(S4Vectors,coolcat)
importFrom(cytolib,cytolib_LdFlags)
Expand Down
8 changes: 0 additions & 8 deletions R/AllGenerics.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,6 @@ setGeneric("identifier<-",function(object,value)



## ===========================================================================
## Generic for transformation (already S3 in base)
## ---------------------------------------------------------------------------
#' @export
setGeneric("transform")



## ===========================================================================
## Generics for split and Subset (split is already S3 in base)
## ---------------------------------------------------------------------------
Expand Down
14 changes: 7 additions & 7 deletions R/flowFrame-accessors.R
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ setMethod("compensate",
#'
#' @name transform
#' @aliases transform,flowFrame-method transform,flowSet-method
#' @param _data a flowFrame or flowSet object
#' @param x a flowFrame or flowSet object
#' @param translist a transformList object
#' @param ... other arguments. e.g. `FL1-H` = myFunc(`FL1-H`)
#'
Expand All @@ -861,6 +861,7 @@ setMethod("compensate",
#'
#'
#' @export
#' @importFrom BiocGenerics transform
#
# We are also making sure that the values of the dynamic range in the
# parameters slot are transformed accordingly. Note that this does not
Expand All @@ -869,8 +870,8 @@ setMethod("compensate",
# The `FL1-H` = myFunc(`FL1-H` ) form is not intended to be used in programmatic way
# since use non-standard evalution could fail to find 'myFunc' definition.
setMethod("transform",
signature=signature(`_data`="flowFrame"),
definition=function(`_data`, translist, ...)
signature=signature(x="flowFrame"),
definition=function(x, translist, ...)
{

if(!(missing(translist))){
Expand All @@ -881,18 +882,17 @@ setMethod("transform",
err_msg <- paste(err_msg, "!Please make sure the unnamed argument is a valid 'transformList' object!")
stop(err_msg)
}else
return(translist %on% `_data`)
return(translist %on% x)
}else# dispach to .transform for named argument, assuming it is like `FSC-H`=asinhTrans(`FSC-H`)
.transform(`_data`, ...)
.transform(x, ...)

})

#' take formal of transform(fs, `FSC-H`=asinhTrans(`FSC-H`))
#' which do the lazy evaluation
#' @noRd
.transform <- function(`_data`, ...){
.transform <- function(x, ...){
e <- substitute(list(...))
x <- `_data`
par <- parameters(x)
ranges <- range(x)
tranges <- as.matrix(transform(as.data.frame(ranges),...))
Expand Down
18 changes: 10 additions & 8 deletions R/flowSet-accessors.R
Original file line number Diff line number Diff line change
Expand Up @@ -427,19 +427,20 @@ setMethod("compensate",
## Transformation methods
## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#' @export
#' @importFrom BiocGenerics transform
setMethod("transform",
signature=signature(`_data`="flowSet"),
definition=function(`_data`, translist, ...)
signature=signature(x="flowSet"),
definition=function(x, translist, ...)
{
if(missing(translist))
fsApply(`_data`,transform, ...)
fsApply(x,transform, ...)
else if(is(translist, "transformList"))
fsApply(`_data`,transform, translist = translist, ...)
fsApply(x,transform, translist = translist, ...)
else if(is(translist, "list")){
sns <- sampleNames(`_data`)
sns <- sampleNames(x)
if(!setequal(sns, names(translist)))
stop("names of 'translist' must be consistent with flow data!")
fs <- copyFlowSet(`_data`)
fs <- copyFlowSet(x)
for(sn in sns)
fs[[sn]] <- transform(fs[[sn]], translist[[sn]])
fs
Expand All @@ -449,8 +450,9 @@ setMethod("transform",
})

#' @export
#' @importFrom BiocGenerics transform
setMethod("transform",
signature=signature(`_data`="missing"),
signature=signature(x="missing"),
definition=function(...)
{
funs <- list(...)
Expand Down Expand Up @@ -752,4 +754,4 @@ flowSet_to_list <- function(fs){
frs <- lapply(1:length(fs), function(idx) {fs[[idx]]})
names(frs) <- sampleNames(fs)
frs
}
}
4 changes: 2 additions & 2 deletions docs/reference/transform.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/transform.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/inPolygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
int nrd = data.nrow();
int nrv = vertices.nrow();

/* check input argument _data */
/* check input argument x */
if(nrd == 0)
{
std::vector<bool> res(nrd, false);
Expand Down