├── .Rbuildignore ├── .github ├── issue_template.md └── workflows │ └── build.yml ├── .travis.yml ├── DESCRIPTION ├── NAMESPACE ├── NEWS.md ├── R ├── AllClasses.R ├── AllGenerics.R ├── CytoExploreR_wrappers.R ├── FCSTransTransform.R ├── GvHD.R ├── IO.R ├── coerce.R ├── cpp11.R ├── eval-methods.R ├── filterResult-accessors.R ├── filterResultList-accessors.R ├── filterSummary-accessors.R ├── flowCore.R ├── flowFrame-accessors.R ├── flowSet-accessors.R ├── gatingML.R ├── identifier-methods.R ├── in-methods.R ├── initialize-methods.R ├── length-methods.R ├── logicalFilterResult-accessors.R ├── manyFilterResult-accessors.R ├── median-logicle-transform.R ├── multipleFilterResult-accessors.R ├── names-methods.R ├── on-methods.R ├── parameters-methods.R ├── rectangleGate-accessors.R ├── show-methods.R ├── split-methods.R ├── summarizeFilter-methods.R ├── summary-methods.R ├── transformList-accessors.R ├── transform_gate-methods.R └── utils.R ├── README.md ├── _pkgdown.yml ├── data └── GvHD.rda ├── docs ├── 404.html ├── authors.html ├── bootstrap-toc.css ├── bootstrap-toc.js ├── docsearch.css ├── docsearch.js ├── index.html ├── issue_template.html ├── link.svg ├── news │ └── index.html ├── pkgdown.css ├── pkgdown.js ├── pkgdown.yml └── reference │ ├── CytoExploreR_exports.html │ ├── EHtrans-class.html │ ├── FCSTransTransform.html │ ├── GvHD.html │ ├── Subset-methods.html │ ├── arcsinhTransform.html │ ├── asinht-class.html │ ├── asinhtGml2-class.html │ ├── biexponentialTransform-1.png │ ├── biexponentialTransform.html │ ├── boundaryFilter-class.html │ ├── characterOrNumeric-class.html │ ├── characterOrParameters-class.html │ ├── characterOrTransformation-class.html │ ├── checkOffset.html │ ├── coerce.html │ ├── collapse_desc.html │ ├── compensatedParameter-class.html │ ├── compensation-class.html │ ├── complementFilter-class.html │ ├── concreteFilter-class.html │ ├── decompensate-methods.html │ ├── decompensate.html │ ├── dg1polynomial-class.html │ ├── each_col.html │ ├── ellipsoidGate-class.html │ ├── estimateMedianLogicle.html │ ├── exponential-class.html │ ├── expressionFilter-class.html │ ├── filter-and-methods.html │ ├── filter-class.html │ ├── filter-in-methods.html │ ├── filter-methods.html │ ├── filter-on-methods.html │ ├── filterDetails-methods.html │ ├── filterList-class.html │ ├── filterReference-class.html │ ├── filterResult-class.html │ ├── filterResultList-class.html │ ├── filterSummary-class.html │ ├── filterSummaryList-class.html │ ├── filter_keywords.html │ ├── filters-class.html │ ├── flowCore-package.html │ ├── flowFrame-class-1.png │ ├── flowFrame-class-2.png │ ├── flowFrame-class-3.png │ ├── flowFrame-class-4.png │ ├── flowFrame-class-5.png │ ├── flowFrame-class.html │ ├── flowSet-class-1.png │ ├── flowSet-class.html │ ├── flowSet_to_list.html │ ├── fr_append_cols.html │ ├── fsApply.html │ ├── getChannelMarker.html │ ├── getIndexSort-methods.html │ ├── getIndexSort.html │ ├── hyperlog-class.html │ ├── hyperlogtGml2-class.html │ ├── identifier-methods.html │ ├── index.html │ ├── intersectFilter-class.html │ ├── inverseLogicleTransform.html │ ├── invsplitscale-class.html │ ├── keyword-methods.html │ ├── kmeansFilter-class.html │ ├── linearTransform.html │ ├── lintGml2-class.html │ ├── lnTransform-1.png │ ├── lnTransform.html │ ├── logTransform.html │ ├── logarithm-class.html │ ├── logicalFilterResult-class.html │ ├── logicleTransform.html │ ├── logicletGml2-class.html │ ├── logtGml2-class.html │ ├── manyFilterResult-class.html │ ├── markernames.html │ ├── multipleFilterResult-class.html │ ├── normalization-class.html │ ├── nullParameter-class.html │ ├── parameterFilter-class.html │ ├── parameterTransform-class.html │ ├── parameters-class.html │ ├── parameters-methods.html │ ├── polygonGate-class.html │ ├── polytopeGate-class.html │ ├── quadGate-class.html │ ├── quadratic-class.html │ ├── quadraticTransform.html │ ├── randomFilterResult-class.html │ ├── ratio-class.html │ ├── ratiotGml2-class.html │ ├── read.FCS.html │ ├── read.FCSheader.html │ ├── read.flowSet.html │ ├── rectangleGate-class.html │ ├── rotate_gate.html │ ├── sampleFilter-class.html │ ├── scaleTransform.html │ ├── scale_gate.html │ ├── setOperationFilter-class.html │ ├── shift_gate.html │ ├── singleParameterTransform-class.html │ ├── sinht-class.html │ ├── split-methods.html │ ├── splitScaleTransform-1.png │ ├── splitScaleTransform.html │ ├── splitscale-class.html │ ├── squareroot-class.html │ ├── subsetFilter-class.html │ ├── summarizeFilter-methods.html │ ├── timeFilter-class-1.png │ ├── timeFilter-class.html │ ├── transform-class.html │ ├── transform.html │ ├── transformFilter-class.html │ ├── transformList-class.html │ ├── transformMap-class.html │ ├── transformReference-class.html │ ├── transform_gate.html │ ├── transformation-class.html │ ├── truncateTransform.html │ ├── unionFilter-class.html │ ├── unitytransform-class.html │ ├── updateTransformKeywords.html │ ├── validFilters.html │ ├── write.FCS.html │ └── write.flowSet.html ├── examples ├── example1.r └── example2.R ├── inst ├── doc │ ├── fcs3.html │ └── hyperlog.notice.html └── extdata │ ├── 0877408774.B08 │ ├── 0877408774.E07 │ ├── 0877408774.F06 │ └── compdata │ ├── comp_match │ ├── compmatrix │ ├── compref │ ├── compref1 │ ├── compref2 │ ├── compref3 │ ├── compref4 │ └── data │ ├── 060909.001 │ ├── 060909.002 │ ├── 060909.003 │ ├── 060909.004 │ └── 060909.005 ├── man ├── CytoExploreR_exports.Rd ├── EHtrans-class.Rd ├── FCSTransTransform.Rd ├── GvHD.Rd ├── Subset-methods.Rd ├── arcsinhTransform.Rd ├── asinht-class.Rd ├── asinhtGml2-class.Rd ├── biexponentialTransform.Rd ├── boundaryFilter-class.Rd ├── characterOrNumeric-class.Rd ├── characterOrParameters-class.Rd ├── characterOrTransformation-class.Rd ├── checkOffset.Rd ├── coerce.Rd ├── collapse_desc.Rd ├── compensatedParameter-class.Rd ├── compensation-class.Rd ├── complementFilter-class.Rd ├── concreteFilter-class.Rd ├── decompensate.Rd ├── dg1polynomial-class.Rd ├── each_col.Rd ├── ellipsoidGate-class.Rd ├── estimateMedianLogicle.Rd ├── exponential-class.Rd ├── expressionFilter-class.Rd ├── filter-and-methods.Rd ├── filter-class.Rd ├── filter-in-methods.Rd ├── filter-methods.Rd ├── filter-on-methods.Rd ├── filterDetails-methods.Rd ├── filterList-class.Rd ├── filterReference-class.Rd ├── filterResult-class.Rd ├── filterResultList-class.Rd ├── filterSummary-class.Rd ├── filterSummaryList-class.Rd ├── filters-class.Rd ├── flowCore-package.Rd ├── flowFrame-class.Rd ├── flowSet-class.Rd ├── flowSet_to_list.Rd ├── fr_append_cols.Rd ├── fsApply.Rd ├── getChannelMarker.Rd ├── getIndexSort.Rd ├── hyperlog-class.Rd ├── hyperlogtGml2-class.Rd ├── identifier-methods.Rd ├── intersectFilter-class.Rd ├── inverseLogicleTransform.Rd ├── invsplitscale-class.Rd ├── keyword-methods.Rd ├── kmeansFilter-class.Rd ├── linearTransform.Rd ├── lintGml2-class.Rd ├── lnTransform.Rd ├── logTransform.Rd ├── logarithm-class.Rd ├── logicalFilterResult-class.Rd ├── logicleTransform.Rd ├── logicletGml2-class.Rd ├── logtGml2-class.Rd ├── manyFilterResult-class.Rd ├── markernames.Rd ├── multipleFilterResult-class.Rd ├── normalization-class.Rd ├── nullParameter-class.Rd ├── parameterFilter-class.Rd ├── parameterTransform-class.Rd ├── parameters-class.Rd ├── parameters-methods.Rd ├── polygonGate-class.Rd ├── polytopeGate-class.Rd ├── quadGate-class.Rd ├── quadratic-class.Rd ├── quadraticTransform.Rd ├── randomFilterResult-class.Rd ├── ratio-class.Rd ├── ratiotGml2-class.Rd ├── read.FCS.Rd ├── read.FCSheader.Rd ├── read.flowSet.Rd ├── rectangleGate-class.Rd ├── rotate_gate.Rd ├── sampleFilter-class.Rd ├── scaleTransform.Rd ├── scale_gate.Rd ├── setOperationFilter-class.Rd ├── shift_gate.Rd ├── singleParameterTransform-class.Rd ├── sinht-class.Rd ├── split-methods.Rd ├── splitScaleTransform.Rd ├── splitscale-class.Rd ├── squareroot-class.Rd ├── subsetFilter-class.Rd ├── summarizeFilter-methods.Rd ├── timeFilter-class.Rd ├── transform-class.Rd ├── transform.Rd ├── transformFilter-class.Rd ├── transformList-class.Rd ├── transformMap-class.Rd ├── transformReference-class.Rd ├── transform_gate.Rd ├── transformation-class.Rd ├── truncateTransform.Rd ├── unionFilter-class.Rd ├── unitytransform-class.Rd ├── updateTransformKeywords.Rd ├── validFilters.Rd ├── write.FCS.Rd └── write.flowSet.Rd ├── paper ├── Figure1-flowCoreFrameWork.jpg ├── Figure1.ppt ├── Figure2-flowWheel-version4.jpg ├── bmc_article.bib ├── bmc_article.bst ├── bmc_article.cls ├── bmc_article.tex ├── figure.R ├── flowCoreRef.bib ├── flowQ.jpg ├── manuscript.tex ├── outline.tex ├── response2reviewers.rtf └── xyplot.pdf ├── src ├── FastLogicle.cpp ├── Hyperlog.cpp ├── Logicle.cpp ├── Makevars ├── Makevars.ucrt ├── Makevars.win ├── biexponential.cpp ├── convertRawBytes.cpp ├── convertRawBytes.h ├── cpp11.cpp ├── fcsTextParse.cpp ├── flowCore_types.h ├── hyperlog.h ├── hyperlogTransform.cpp ├── inPolygon.cpp ├── inPolytope.cpp ├── logicle.h ├── logicleTransform.cpp ├── poly_centroid.cpp ├── sortBytes.cpp ├── uint2double.cpp ├── zeroin.cpp └── zeroin.h ├── tests ├── testthat.R └── testthat │ ├── expectRes.new.rds │ ├── expectResults.rds │ ├── helper-expectResults.R │ ├── ref_flowframes.rds │ ├── test-IO-internal.R │ ├── test-IO.R │ ├── test-classes.R │ ├── test-colnames.R │ ├── test-convertRawBytes.R │ ├── test-fcsTextParse.R │ ├── test-filter.R │ ├── test-fr-methods.R │ ├── test-gating.R │ ├── test-markernames.R │ ├── test-paramMatch.R │ ├── test-sortBytes.R │ ├── test-transform.R │ └── test-transform_gate.R └── vignettes ├── HowTo-flowCore.Rnw └── cytoref.bib /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ## Ignore travis config file 2 | ^\.travis\.yml$ 3 | ^.*\.Rproj$ 4 | ^\.Rproj\.user$ 5 | .Rhistory 6 | .gitignore 7 | .travis.yml 8 | misc 9 | R/.Rhistory 10 | vignettes/.Rhistory 11 | .Rproj.user 12 | .git 13 | vignettes/*.bbl 14 | vignettes/*.blg 15 | examples 16 | paper 17 | ^_pkgdown\.yml$ 18 | ^docs$ 19 | ^pkgdown$ 20 | -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | Steps to reproduce the behavior: please use the [reprex](https://cran.r-project.org/web/packages/reprex/index.html) package to build a reproducible example. 12 | 13 | 22 | 23 | ##### Your code here. 24 | 25 | **Expected behavior** 26 | A clear and concise description of what you expected to happen. 27 | 28 | **Screenshots** 29 | If applicable, add screenshots to help explain your problem. 30 | 31 | **sessionInfo():** 32 | - paste the output of `sessionInfo()` here: 33 | 34 | **Additional context** 35 | Add any other context about the problem here. 36 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples 2 | # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help 3 | on: 4 | push: 5 | branches: [main, master] 6 | pull_request: 7 | branches: [main, master] 8 | 9 | name: R-CMD-check 10 | 11 | jobs: 12 | R-CMD-check: 13 | runs-on: ${{ matrix.config.os }} 14 | 15 | name: ${{ matrix.config.os }} (${{ matrix.config.r }}) 16 | 17 | strategy: 18 | fail-fast: false 19 | matrix: 20 | config: 21 | - {os: macOS-latest, r: 'release'} 22 | 23 | env: 24 | GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} 25 | R_KEEP_PKG_SOURCE: yes 26 | 27 | steps: 28 | - uses: actions/checkout@v2 29 | 30 | - uses: r-lib/actions/setup-pandoc@v2 31 | 32 | - uses: r-lib/actions/setup-tinytex@v1 33 | 34 | - uses: r-lib/actions/setup-r@v2 35 | with: 36 | r-version: ${{ matrix.config.r }} 37 | http-user-agent: ${{ matrix.config.http-user-agent }} 38 | use-public-rspm: true 39 | 40 | - uses: r-lib/actions/setup-r-dependencies@v2 41 | with: 42 | extra-packages: any::rcmdcheck 43 | needs: check 44 | 45 | - name: add more tex pkgs 46 | run: | 47 | install.packages('tinytex') 48 | tinytex:::install_yihui_pkgs() 49 | shell: Rscript {0} 50 | 51 | - uses: r-lib/actions/check-r-package@v2 52 | with: 53 | upload-snapshots: true 54 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # Sample .travis.yml for R projects 2 | 3 | language: r 4 | r: 5 | - devel 6 | cache: packages 7 | 8 | before_install: 9 | - R -e 'install.packages("devtools")' 10 | - R -e 'devtools::install_github("Bioconductor/BiocGenerics", ref = "master")' 11 | 12 | install: 13 | - R -e 'devtools::install_deps(upgrade = "always")' 14 | - R -e 'install.packages("reshape2")' 15 | - R -e 'install.packages("covr")' 16 | - R -e 'devtools::install_github("RGLab/RProtoBufLib")' 17 | - R -e 'devtools::install_github("RGLab/cytolib")' 18 | 19 | script: 20 | - R CMD build . --no-build-vignettes 21 | - R -e 'install.packages(list.files(pattern="*tar.gz"), repos=NULL, type="source")' 22 | - R -e 'devtools::install_github("RGLab/flowViz")' 23 | - R -e 'devtools::install_github("RGLab/ncdfFlow")' 24 | - R -e 'devtools::install_github("RGLab/flowWorkspace")' 25 | - R -e 'devtools::install_github("RGLab/flowWorkspaceData")' 26 | - R -e 'devtools::install_github("RGLab/flowStats")' 27 | - R -e 'devtools::install_github("RGLab/flowClust")' 28 | - R -e 'devtools::install_github("RGLab/ggcyto")' 29 | - R -e 'devtools::install_github("RGLab/openCyto")' 30 | - R -e 'devtools::install_deps(dep = T, upgrade = "always")' 31 | - R CMD build . 32 | - R CMD check *tar.gz 33 | 34 | 35 | group: stable 36 | warnings_are_errors: false 37 | sudo: required 38 | 39 | bioc_required: true 40 | 41 | env: 42 | global: 43 | - CRAN: http://cran.rstudio.com 44 | 45 | notifications: 46 | email: 47 | on_success: change 48 | on_failure: change 49 | 50 | r_github_packages: 51 | - r-lib/covr 52 | 53 | after_success: 54 | - Rscript -e 'library(covr); codecov()' 55 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: flowCore 2 | Title: flowCore: Basic structures for flow cytometry data 3 | Version: 2.17.1 4 | Authors@R: personList(person("B","Ellis", role = "aut"), 5 | person("Perry", "Haaland", role = "aut"), 6 | person("Florian", "Hahne", role = "aut"), 7 | person("Nolwenn", "Le Meur", role = "aut"), 8 | person("Nishant", "Gopalakrishnan", role = "aut"), 9 | person("Josef", "Spidlen", role = "aut"), 10 | person("Mike", "Jiang", role = c("aut","cre"), email = "mike@ozette.com"), 11 | person("Greg", "Finak", role = "aut"), 12 | person("Samuel","Granjeaud", role = "ctb")) 13 | Maintainer: Mike Jiang 14 | Description: Provides S4 data structures and basic functions to deal with flow 15 | cytometry data. 16 | Depends: 17 | R (>= 3.0.2) 18 | Imports: 19 | Biobase, 20 | BiocGenerics (>= 0.29.2), 21 | grDevices, 22 | graphics, 23 | methods, 24 | stats, 25 | utils, 26 | stats4, 27 | Rcpp, 28 | matrixStats, 29 | cytolib (>= 2.13.1), 30 | S4Vectors 31 | Suggests: 32 | Rgraphviz, 33 | flowViz, 34 | flowStats (>= 3.43.4), 35 | testthat, 36 | flowWorkspace, 37 | flowWorkspaceData, 38 | openCyto, 39 | knitr, 40 | ggcyto, 41 | gridExtra 42 | Collate: 43 | AllGenerics.R 44 | AllClasses.R 45 | flowFrame-accessors.R 46 | flowSet-accessors.R 47 | transform_gate-methods.R 48 | coerce.R 49 | logicalFilterResult-accessors.R 50 | summarizeFilter-methods.R 51 | filterSummary-accessors.R 52 | manyFilterResult-accessors.R 53 | summary-methods.R 54 | multipleFilterResult-accessors.R 55 | on-methods.R 56 | transformList-accessors.R 57 | identifier-methods.R 58 | parameters-methods.R 59 | initialize-methods.R 60 | filterResult-accessors.R 61 | in-methods.R 62 | rectangleGate-accessors.R 63 | filterResultList-accessors.R 64 | IO.R 65 | show-methods.R 66 | length-methods.R 67 | names-methods.R 68 | split-methods.R 69 | eval-methods.R 70 | gatingML.R 71 | FCSTransTransform.R 72 | median-logicle-transform.R 73 | utils.R 74 | flowCore.R 75 | GvHD.R 76 | CytoExploreR_wrappers.R 77 | cpp11.R 78 | License: Artistic-2.0 79 | biocViews: ImmunoOncology, Infrastructure, FlowCytometry, CellBasedAssays 80 | LinkingTo: cpp11, BH(>= 1.81.0.0), cytolib, RProtoBufLib 81 | VignetteBuilder: knitr 82 | SystemRequirements: GNU make, C++11 83 | RoxygenNote: 7.2.3 84 | Encoding: UTF-8 85 | -------------------------------------------------------------------------------- /R/CytoExploreR_wrappers.R: -------------------------------------------------------------------------------- 1 | #' CytoExploreR exports 2 | #' 3 | #' Exported wrappers of internal functions for use by CytoExploreR 4 | #' 5 | #' @name CytoExploreR_exports 6 | NULL 7 | 8 | #' @keywords internal 9 | #' @name CytoExploreR_.estimateLogicle 10 | #' @rdname CytoExploreR_exports 11 | #' @export 12 | CytoExploreR_.estimateLogicle <- function(x, channels, ...){ 13 | .estimateLogicle(x, channels, ...) 14 | } -------------------------------------------------------------------------------- /R/GvHD.R: -------------------------------------------------------------------------------- 1 | #' Extract of a Graft versus Host Disease monitoring experiment (Rizzieri et 2 | #' al., 2007) 3 | #' 4 | #' A flow cytometry high throughput screening was used to identify biomarkers 5 | #' that would predict the development of GvHD. The GvHD dataset is an extract 6 | #' of a collection of weekly peripheral blood samples obtained from patients 7 | #' following allogenic blood and marrow transplant. Samples were taken at 8 | #' various time points before and after graft. 9 | #' 10 | #' This GvHD dataset represents the measurements of one biomarker (leukocyte) 11 | #' for 5 patients over 7 visits (7 time points). The blood samples were labeled 12 | #' with four different fluorescent probes to identify the biomarker and the 13 | #' fluorescent intensity was determined for at least ten thousand cells per 14 | #' sample. 15 | #' 16 | #' @name GvHD 17 | #' @docType data 18 | #' @usage data(GvHD) 19 | #' @format The format is an object of class \code{flowSet} composed of 35 20 | #' \code{flowFrames}. Each \code{flowFrame} corresponds to one sample at one 21 | #' time point. 22 | #' The \code{phenodata} lists: 23 | #' \describe{ 24 | #' \item{Patient}{The patient Id code } 25 | #' \item{Visit}{The number of visits to the hospital} 26 | #' \item{Days}{The number of days since the graft. Negative values correpond to 27 | #' days before the graft.} 28 | #' \item{Grade}{Grade of the cancer} 29 | #' } 30 | #' @references Rizzieri DA et al. J Clin Oncol. 2007 Jan 16; [Epub ahead of 31 | #' print] PMID: 17228020 32 | #' @source Complete dataset available at 33 | #' \url{http://www.ficcs.org/software.html#Data_Files}, the Flow Informatics 34 | #' and Computational Cytometry Society website (FICCS) 35 | #' @keywords datasets 36 | NULL -------------------------------------------------------------------------------- /R/cpp11.R: -------------------------------------------------------------------------------- 1 | # Generated by cpp11: do not edit by hand 2 | 3 | biexponential_transform <- function(input, A, B, C, D, F, W, tol, maxIt) { 4 | .Call(`_flowCore_biexponential_transform`, input, A, B, C, D, F, W, tol, maxIt) 5 | } 6 | 7 | convertRawBytes <- function(bytes, isInt, colSize, ncol, isBigEndian) { 8 | .Call(`_flowCore_convertRawBytes`, bytes, isInt, colSize, ncol, isBigEndian) 9 | } 10 | 11 | string_to_spill <- function(key) { 12 | .Call(`_flowCore_string_to_spill`, key) 13 | } 14 | 15 | spill_to_string <- function(rmat, markers) { 16 | .Call(`_flowCore_spill_to_string`, rmat, markers) 17 | } 18 | 19 | fcsTextParse <- function(txt, emptyValue) { 20 | .Call(`_flowCore_fcsTextParse`, txt, emptyValue) 21 | } 22 | 23 | hyperlog_transform <- function(input, T, W, M, A, isInverse) { 24 | .Call(`_flowCore_hyperlog_transform`, input, T, W, M, A, isInverse) 25 | } 26 | 27 | inPolygon <- function(data, vertices) { 28 | .Call(`_flowCore_inPolygon`, data, vertices) 29 | } 30 | 31 | inPolytope <- function(data, A, b) { 32 | .Call(`_flowCore_inPolytope`, data, A, b) 33 | } 34 | 35 | logicle_transform <- function(input, T, W, M, A, isInverse) { 36 | .Call(`_flowCore_logicle_transform`, input, T, W, M, A, isInverse) 37 | } 38 | 39 | poly_centroid <- function(verts) { 40 | .Call(`_flowCore_poly_centroid`, verts) 41 | } 42 | 43 | sortBytes <- function(bytes, byte_order) { 44 | .Call(`_flowCore_sortBytes`, bytes, byte_order) 45 | } 46 | 47 | uint2double <- function(input, isBigEndian) { 48 | .Call(`_flowCore_uint2double`, input, isBigEndian) 49 | } 50 | -------------------------------------------------------------------------------- /R/filterSummary-accessors.R: -------------------------------------------------------------------------------- 1 | ## ========================================================================== 2 | ## The filterSummary class provides a container for the output of summary 3 | ## on a filterResult 4 | ## ========================================================================== 5 | 6 | 7 | 8 | 9 | 10 | 11 | ## ========================================================================== 12 | ## Subsetting methods 13 | ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 14 | ## We need this to subset filterSummaries of multipleFilterResults 15 | #' @export 16 | setMethod("[[", 17 | signature=signature(x="filterSummary", 18 | i="numeric"), 19 | definition=function(x, i, j, ...) 20 | { 21 | list(name=as.vector(x@name[i]), true=as.vector(x@true[i]), 22 | false=as.vector(x@count[i]-x@true[i]), 23 | count=x@count, p=as.vector(x@p[i]), 24 | q=as.vector(1-x@p[i])) 25 | }) 26 | 27 | ## By name 28 | #' @export 29 | setMethod("[[", 30 | signature=signature(x="filterSummary", 31 | i="character"), 32 | definition=function(x,i,j,...) 33 | { 34 | i <- which(i==names(x)) 35 | x[[i]] 36 | }) 37 | 38 | 39 | 40 | ## ========================================================================== 41 | ## This allows for a list-like accessor to the slots (and more...) 42 | ## Valid values are 'n', 'count', 'true', 'false', 'name', 'p' and 'q' 43 | ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 44 | #' @export 45 | setMethod("$", 46 | signature=signature(x="filterSummary"), 47 | definition=function(x, name) 48 | { 49 | switch(name, "n"=x@count, "true"=x@true, "in"=x@true, 50 | "false"=x@count-x@true, "out"=x@count-x@true, 51 | "p"=x@p, "q"=1-x@p, "count"=x@count, "name"=x@name) 52 | }) 53 | 54 | 55 | 56 | ## ========================================================================== 57 | ## Return a more machine-readable output in form of a data.frame 58 | ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 59 | #' @importFrom BiocGenerics toTable 60 | #' @export 61 | setMethod("toTable", 62 | signature=signature(x="filterSummary"), 63 | definition=function(x, ...) { 64 | data.frame(percent=x$p*100, count=x@count, true=x@true, false=x$false, 65 | p=x$p, q=x$q) 66 | }) 67 | -------------------------------------------------------------------------------- /R/flowCore.R: -------------------------------------------------------------------------------- 1 | #' flowCore: Basic structures for flow cytometry data 2 | #' 3 | #' Provides S4 data structures and basic infrastructure and functions to deal 4 | #' with flow cytometry data. 5 | #' 6 | #' 7 | #' Define important flow cytometry data classes: 8 | #' \code{\link[flowCore:flowFrame-class]{flowFrame}}, 9 | #' \code{\link[flowCore:flowSet-class]{flowSet}} and their accessors. 10 | #' 11 | #' Provide important transformation, filter, gating, workflow, and summary 12 | #' functions for flow cytometry data analysis. 13 | #' 14 | #' Most of flow cytometry related Bioconductor packages (such as flowStats, 15 | #' flowFP, flowQ, flowViz, flowMerge, flowClust) are heavily dependent on this 16 | #' package. 17 | #' 18 | #' \tabular{ll}{ Package: \tab flowCore \cr Type: \tab Package \cr Version: 19 | #' \tab 1.11.20 \cr Date: \tab 2009-09-16 \cr License: \tab Artistic-2.0\cr } 20 | #' 21 | #' @useDynLib flowCore, .registration=TRUE 22 | #' @import methods 23 | #' @importFrom matrixStats colMins colMaxs 24 | #' @importClassesFrom Biobase AnnotatedDataFrame 25 | #' @importFrom grDevices devAskNewPage 26 | #' @importFrom graphics abline 27 | #' @importFrom stats density na.omit 28 | #' @importFrom utils read.csv 29 | #' @importMethodsFrom Biobase description "description<-" exprs "exprs<-" 30 | #' featureNames pData "pData<-" phenoData "phenoData<-" sampleNames 31 | #' "sampleNames<-" varLabels "varLabels<-" varMetadata "varMetadata<-" 32 | #' @importFrom Biobase listLen read.AnnotatedDataFrame 33 | #' @importFrom BiocGenerics colnames eval get mget nrow ncol sort 34 | #' @importFrom stats4 plot summary 35 | #' @importFrom graphics hist text 36 | #' @importFrom stats kmeans mad median qnorm quantile runif sd uniroot var 37 | #' @importFrom cytolib cytolib_LdFlags 38 | #' @importFrom utils data find head tail write.table 39 | #' 40 | #' 41 | #' @name flowCore-package 42 | #' @aliases flowCore flowCore-package 43 | #' @docType package 44 | #' @author 45 | #' Maintainer: Florian Hahne 46 | #' 47 | #' Authors: B. Ellis, P. Haaland, F. Hahne, N. Le Meur, N. Gopalakrishnan 48 | #' @keywords package 49 | NULL 50 | -------------------------------------------------------------------------------- /R/length-methods.R: -------------------------------------------------------------------------------- 1 | ## ========================================================================== 2 | ## Show the length of a (usually list-like) object. For many flowCore 3 | ## gating objects this returns the number of sub-populations. 4 | ## ========================================================================== 5 | 6 | 7 | 8 | 9 | 10 | 11 | ## ========================================================================== 12 | ## Number of populations (i.e., k) defined by a kmeansFilter 13 | ## --------------------------------------------------------------------------- 14 | #' @export 15 | setMethod("length", 16 | signature=signature(x="kmeansFilter"), 17 | definition=function(x) length(x@populations)) 18 | 19 | 20 | 21 | ## ========================================================================== 22 | ## Essentially the number of populations (in a multipleFilterResult) 23 | ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 24 | #' @export 25 | setMethod("length", 26 | signature=signature(x="filterSummary"), 27 | definition=function(x) length(x@name)) 28 | 29 | 30 | 31 | ## ========================================================================== 32 | ## The number of frames in a flowSet 33 | ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 34 | #' @export 35 | setMethod("length", 36 | signature=signature(x="flowSet"), 37 | definition=function(x) length(sampleNames(x))) 38 | 39 | 40 | 41 | ## ========================================================================== 42 | ## For logicalFilterResults we only have a single population, hence the 43 | ## length is always 1 44 | ## --------------------------------------------------------------------------- 45 | #' @export 46 | setMethod("length", 47 | signature=signature(x="logicalFilterResult"), 48 | definition=function(x) 1) 49 | 50 | 51 | 52 | ## ========================================================================== 53 | ## For manyFilterResults, length corresponds to the number of 54 | ## sub-populations defined by the various component filters 55 | ## --------------------------------------------------------------------------- 56 | #' @export 57 | setMethod("length", 58 | signature=signature(x="manyFilterResult"), 59 | definition=function(x) ncol(x@subSet)) 60 | 61 | 62 | 63 | ## ========================================================================== 64 | ## For multipleFilterResults, the number of sub-populations 65 | ## --------------------------------------------------------------------------- 66 | #' @export 67 | setMethod("length", 68 | signature=signature(x="multipleFilterResult"), 69 | definition=function(x) nlevels(x@subSet)) 70 | -------------------------------------------------------------------------------- /R/logicalFilterResult-accessors.R: -------------------------------------------------------------------------------- 1 | ## ========================================================================== 2 | ## logicalFilterResults create a single population (and the complement of it) 3 | ## ========================================================================== 4 | 5 | 6 | 7 | 8 | 9 | 10 | ## ========================================================================== 11 | ## Subset a logicalFilterResult by filterId. We treat i=1 as the population 12 | ## in the filter and 1=2 as the complement of that. Values >2 are not allowed 13 | ## -------------------------------------------------------------------------- 14 | #' @export 15 | setMethod("[[", 16 | signature=signature(x="logicalFilterResult"), 17 | definition=function(x, i, j, drop=FALSE) 18 | { 19 | if(drop) 20 | warning("Argument 'drop' is ignored", call.=FALSE) 21 | if(!missing(j)) 22 | warning("Ignoring invalid dimension", call.=FALSE) 23 | if(is.numeric(i) || is.logical(i)) { 24 | copy <- names(x)[i] 25 | }else { 26 | copy <- i 27 | i <- match(i,names(x)) 28 | } 29 | if(is.na(copy)) 30 | stop("Subset out of bounds", call.=FALSE) 31 | if(i==1){ 32 | x 33 | }else{ 34 | tmp <- x 35 | tmp@subSet <- !x@subSet 36 | fd <- filterDetails(x) 37 | ld <- length(fd) 38 | id <- identifier(fd[[ld]]$filt) 39 | fd[[ld]]$filter <- !fd[[ld]]$filt 40 | fd[[ld]]$populations <- rev(fd[[ld]]$populations) 41 | filterDetails(tmp, id) <- fd 42 | tmp@filterId <- paste("not", tmp@filterId) 43 | tmp 44 | } 45 | }) 46 | -------------------------------------------------------------------------------- /R/manyFilterResult-accessors.R: -------------------------------------------------------------------------------- 1 | ## ========================================================================== 2 | ## manyFilterResults create a multiple potentially overlapping populations 3 | ## ========================================================================== 4 | 5 | 6 | 7 | 8 | 9 | 10 | ## ========================================================================== 11 | ## Subsetting to the individual populations. We create a new 12 | ## logicalFilterResult. 13 | ## --------------------------------------------------------------------------- 14 | #' @export 15 | setMethod("[[", 16 | signature=signature(x="manyFilterResult"), 17 | definition=function(x,i,j,drop=FALSE) 18 | { 19 | if(is.numeric(i)) i <- names(x)[i] 20 | if(length(i)!=1) 21 | stop("Only a single subpopulation can be selected.") 22 | if(!i %in% names(x)) 23 | stop("Index out of bounds.") 24 | filterDetails <- x@filterDetails 25 | names(filterDetails) <- i 26 | filterDetails$population <- i 27 | filterDetails$source <- identifier(x) 28 | dat <- if(i == "rest") !apply(x@subSet, 1, any) else x@subSet[,i] 29 | new("logicalFilterResult", subSet=dat, 30 | filterDetails=filterDetails, 31 | frameId=x@frameId, filterId=i) 32 | }) 33 | 34 | 35 | 36 | ## ========================================================================== 37 | ## convert to a data frame 38 | ## --------------------------------------------------------------------------- 39 | #' @export 40 | as.data.frame.manyFilterResult <- function(x, row.names=NULL, 41 | optional=FALSE,...) 42 | { 43 | nrows <- length(x) 44 | nm <- if(nzchar(identifier(x))) identifier(x) else "filter" 45 | if(is.null(row.names)) { 46 | if(nrows == 0L) 47 | row.names <- character(0L) 48 | else if(length(row.names <- names(x)) == nrows && !any(duplicated(row.names))) { 49 | } else row.names <- .set_row_names(nrows) 50 | } 51 | values <- sapply(names(x),function(i) { 52 | m <- x[[i]] 53 | paste(deparse(as(filterDetails(m,identifier(m))$filter,"call")),sep="\n",collapse="\n") 54 | }) 55 | names(values) <- NULL 56 | values <- list(values) 57 | if(!optional) 58 | names(values) <- nm 59 | attr(values,"row.names") <- row.names 60 | class(values) <- "data.frame" 61 | values 62 | } 63 | -------------------------------------------------------------------------------- /R/median-logicle-transform.R: -------------------------------------------------------------------------------- 1 | #' Estimates a common logicle transformation for a flowSet. 2 | #' 3 | #' Of the negative values for each channel specified, the median of the specified 4 | #' quantiles are used. 5 | #' 6 | #' @param flow_set object of class 'flowSet' 7 | #' @param channels character vector of channels to transform 8 | #' @param m TODO -- default value from .lgclTrans 9 | #' @param q quantile 10 | #' @return TODO 11 | #' @export 12 | estimateMedianLogicle <- function(flow_set, channels, m = 4.5, q = 0.05) { 13 | if (!is(flow_set, "flowSet")) { 14 | stop("flow_set has to be an object of class 'flowSet'") 15 | } 16 | if (missing(channels)) { 17 | stop("Please specify the channels to be logicle transformed") 18 | } 19 | indx <- channels %in% unname(colnames(exprs(flow_set[[1]]))) 20 | if (!all(indx)) { 21 | stop(paste("Channels", channels[!indx], "were not found in flow_set ")) 22 | } 23 | 24 | neg_marker_quantiles <- fsApply(flow_set, function(sample) { 25 | apply(exprs(sample), 2, function(markers) { 26 | quantile(markers[markers < 0], probs = q) 27 | }) 28 | }) 29 | # Replaces 'r' in flowCore:::.lgclTrans 30 | neg_marker_quantiles <- apply(neg_marker_quantiles, 2, 31 | median, na.rm = TRUE)[channels] 32 | 33 | # In the case that no negative markers are present, we set this quantile to the 34 | # default value of 1/2. 35 | neg_marker_quantiles <- replace(neg_marker_quantiles, 36 | is.na(neg_marker_quantiles), 0.5) 37 | 38 | # Replaces 't' in flowCore:::.lgclTrans 39 | max_range <- do.call(rbind, lapply(fsApply(flow_set, range), function(x) { 40 | x[2, channels] 41 | })) 42 | max_range <- apply(max_range, 2, max) 43 | 44 | # Replaces 'w' in flowCore:::.lgclTrans 45 | w <- (m - log10(max_range / abs(neg_marker_quantiles))) / 2 46 | 47 | transformation <- lapply(channels, function(channel) { 48 | transId <- paste(channel, "medianLogicleTransform", sep = "_") 49 | 50 | logicleTransform(transformationId = transId, w = w[channel], 51 | t = max_range[channel], m = m, a = 0) 52 | }) 53 | 54 | transformList(channels, transformation, 55 | transformationId = "medianLogicleTransform") 56 | } 57 | -------------------------------------------------------------------------------- /R/multipleFilterResult-accessors.R: -------------------------------------------------------------------------------- 1 | ## ========================================================================== 2 | ## multipleFilterResults create a multiple non-overlapping populations 3 | ## ========================================================================== 4 | 5 | 6 | ## ========================================================================== 7 | ## Subsetting to the individual populations. We create a new 8 | ## logicalFilterResult 9 | ## --------------------------------------------------------------------------- 10 | #' @export 11 | setMethod("[[", 12 | signature=signature(x="multipleFilterResult"), 13 | definition=function(x, i, j, drop=FALSE) 14 | { 15 | if(length(i)!=1) 16 | stop("subscript out of bounds (index must have length 1)") 17 | if(is.numeric(i)) 18 | i <- names(x)[i] 19 | if(is.na(i) || !i %in% names(x)) 20 | stop("filter index out of bounds", call.=FALSE) 21 | filterDetails <- x@filterDetails 22 | filterDetails$population <- i 23 | new("logicalFilterResult",subSet=(x@subSet==i & !is.na(x@subSet)), 24 | filterDetails=filterDetails, 25 | frameId=x@frameId, filterId=paste(x@filterId,"[[",i,"]]", 26 | sep="")) 27 | }) 28 | 29 | 30 | 31 | ## ========================================================================== 32 | ## Subsetting to the a (smaller) multipleFilterResult 33 | ## --------------------------------------------------------------------------- 34 | #' @export 35 | setMethod("[", 36 | signature=signature(x="multipleFilterResult"), 37 | definition=function(x, i, j, ..., drop=FALSE) 38 | { 39 | if(is.numeric(i)) 40 | i <- names(x)[i] 41 | if(any(is.na(i)) || !all(i %in% names(x))) 42 | stop("filter index out of bounds", call.=FALSE) 43 | filterDetails <- x@filterDetails 44 | filterDetails$population <- i 45 | x@subSet <- factor(x@subSet[x@subSet %in% i & !is.na(x@subSet)]) 46 | x@filterDetails <- filterDetails 47 | return(x) 48 | }) 49 | 50 | 51 | -------------------------------------------------------------------------------- /R/rectangleGate-accessors.R: -------------------------------------------------------------------------------- 1 | ## ========================================================================== 2 | ## Methods for objects of type 'rectangleGate' 3 | ## Note: All filtering methods are stored in file 'in-methods.R' 4 | ## ========================================================================== 5 | 6 | 7 | 8 | 9 | 10 | 11 | ## ========================================================================== 12 | # Compose two rectangle gates together into a higher dimensional cube. 13 | ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 14 | #' @export 15 | setMethod("*", 16 | signature(e1="rectangleGate", 17 | e2="rectangleGate"), 18 | function(e1, e2) 19 | { 20 | if(any(parameters(e1) %in% parameters(e2))) 21 | stop("Rectangle gate parameters overlap.", call.=FALSE) 22 | new("rectangleGate", parameters=c(parameters(e1), parameters(e2)), 23 | min=c(e1@min, e2@min), max=c(e1@max, e2@max)) 24 | }) 25 | 26 | 27 | ## ========================================================================== 28 | ## subsetting by parameter name 29 | ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 30 | #' @export 31 | setMethod("[", 32 | signature=signature(x="rectangleGate", 33 | i="character"), 34 | definition=function(x, i, j, ..., drop=FALSE) 35 | { 36 | if(drop) 37 | warning("Argument 'drop' ignored for subsetting of ", 38 | "rectangelGates", call.=FALSE) 39 | mt <- i %in% parameters(x) 40 | if(!all(mt)) 41 | stop("The following parameter(s) are not defined in this gate:", 42 | paste(" ", i[!mt], collapse="\n"), call.=FALSE) 43 | x@min <- x@min[i] 44 | x@max <- x@max[i] 45 | parameters(x) <- i 46 | x 47 | }) 48 | 49 | 50 | #' @export 51 | setMethod("[", 52 | signature=signature(x="rectangleGate"), 53 | definition=function(x, i, j, ..., drop=FALSE) 54 | stop("rectangleGates may only be subset by parameter name", 55 | call.=FALSE) 56 | ) 57 | -------------------------------------------------------------------------------- /R/transformList-accessors.R: -------------------------------------------------------------------------------- 1 | ## ========================================================================== 2 | ## transformList allow us to programmatically access transformations. 3 | ## They normaly contain items of class transformMap. 4 | ## ========================================================================== 5 | 6 | 7 | 8 | 9 | 10 | 11 | ## ========================================================================== 12 | ## colnames method: This gives us the parameter names we want to transform 13 | ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 14 | #' @export 15 | setMethod("colnames", 16 | signature=signature(x="transformList"), 17 | definition=function(x, do.NULL=TRUE, prefix="col") 18 | { 19 | unique(sapply(x@transforms, slot, "input")) 20 | }) 21 | 22 | 23 | 24 | ## ========================================================================== 25 | ## Concatenate two transformLists (or one list and a transformList) 26 | ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 27 | #' @export 28 | setMethod("c", 29 | signature=signature(x="transformList"), 30 | definition=function(x, ..., recursive=FALSE) 31 | { 32 | ## Try to coerce everyone to a transformList first 33 | all.t <- lapply(list(...), as, "transformList") 34 | params <- c(sapply(x@transforms, slot, "output"), 35 | unlist(lapply(all.t, function(x) 36 | sapply(x@transforms, slot, "output")))) 37 | if(length(params) > length(unique(params))) 38 | stop("All output parameters must be unique when combining ", 39 | "transforms.", call.=FALSE) 40 | new("transformList", transforms=c(x@transforms, 41 | unlist(sapply(all.t, slot, "transforms")))) 42 | }) 43 | 44 | 45 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | NEWS 4 | ===== 5 | `spillover_match` has been added to provide simplified matching functionality between 6 | single stained controls and channels using a csv file that maps filenames to channels. 7 | 8 | This is utilized by `spillover_ng`, which has been moved to `flowStats`. 9 | 10 | 11 | 12 | flowCore 13 | ======== 14 | 15 | Core flow infrastructure 16 | 17 | Install the devtools package and then do 18 | `devtools::install_github("RGLab/flowCore")` 19 | 20 | You may need to install other dependencies as well. 21 | -------------------------------------------------------------------------------- /data/GvHD.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/data/GvHD.rda -------------------------------------------------------------------------------- /docs/bootstrap-toc.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) 3 | * Copyright 2015 Aidan Feldman 4 | * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ 5 | 6 | /* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ 7 | 8 | /* All levels of nav */ 9 | nav[data-toggle='toc'] .nav > li > a { 10 | display: block; 11 | padding: 4px 20px; 12 | font-size: 13px; 13 | font-weight: 500; 14 | color: #767676; 15 | } 16 | nav[data-toggle='toc'] .nav > li > a:hover, 17 | nav[data-toggle='toc'] .nav > li > a:focus { 18 | padding-left: 19px; 19 | color: #563d7c; 20 | text-decoration: none; 21 | background-color: transparent; 22 | border-left: 1px solid #563d7c; 23 | } 24 | nav[data-toggle='toc'] .nav > .active > a, 25 | nav[data-toggle='toc'] .nav > .active:hover > a, 26 | nav[data-toggle='toc'] .nav > .active:focus > a { 27 | padding-left: 18px; 28 | font-weight: bold; 29 | color: #563d7c; 30 | background-color: transparent; 31 | border-left: 2px solid #563d7c; 32 | } 33 | 34 | /* Nav: second level (shown on .active) */ 35 | nav[data-toggle='toc'] .nav .nav { 36 | display: none; /* Hide by default, but at >768px, show it */ 37 | padding-bottom: 10px; 38 | } 39 | nav[data-toggle='toc'] .nav .nav > li > a { 40 | padding-top: 1px; 41 | padding-bottom: 1px; 42 | padding-left: 30px; 43 | font-size: 12px; 44 | font-weight: normal; 45 | } 46 | nav[data-toggle='toc'] .nav .nav > li > a:hover, 47 | nav[data-toggle='toc'] .nav .nav > li > a:focus { 48 | padding-left: 29px; 49 | } 50 | nav[data-toggle='toc'] .nav .nav > .active > a, 51 | nav[data-toggle='toc'] .nav .nav > .active:hover > a, 52 | nav[data-toggle='toc'] .nav .nav > .active:focus > a { 53 | padding-left: 28px; 54 | font-weight: 500; 55 | } 56 | 57 | /* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ 58 | nav[data-toggle='toc'] .nav > .active > ul { 59 | display: block; 60 | } 61 | -------------------------------------------------------------------------------- /docs/docsearch.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | // register a handler to move the focus to the search bar 4 | // upon pressing shift + "/" (i.e. "?") 5 | $(document).on('keydown', function(e) { 6 | if (e.shiftKey && e.keyCode == 191) { 7 | e.preventDefault(); 8 | $("#search-input").focus(); 9 | } 10 | }); 11 | 12 | $(document).ready(function() { 13 | // do keyword highlighting 14 | /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ 15 | var mark = function() { 16 | 17 | var referrer = document.URL ; 18 | var paramKey = "q" ; 19 | 20 | if (referrer.indexOf("?") !== -1) { 21 | var qs = referrer.substr(referrer.indexOf('?') + 1); 22 | var qs_noanchor = qs.split('#')[0]; 23 | var qsa = qs_noanchor.split('&'); 24 | var keyword = ""; 25 | 26 | for (var i = 0; i < qsa.length; i++) { 27 | var currentParam = qsa[i].split('='); 28 | 29 | if (currentParam.length !== 2) { 30 | continue; 31 | } 32 | 33 | if (currentParam[0] == paramKey) { 34 | keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); 35 | } 36 | } 37 | 38 | if (keyword !== "") { 39 | $(".contents").unmark({ 40 | done: function() { 41 | $(".contents").mark(keyword); 42 | } 43 | }); 44 | } 45 | } 46 | }; 47 | 48 | mark(); 49 | }); 50 | }); 51 | 52 | /* Search term highlighting ------------------------------*/ 53 | 54 | function matchedWords(hit) { 55 | var words = []; 56 | 57 | var hierarchy = hit._highlightResult.hierarchy; 58 | // loop to fetch from lvl0, lvl1, etc. 59 | for (var idx in hierarchy) { 60 | words = words.concat(hierarchy[idx].matchedWords); 61 | } 62 | 63 | var content = hit._highlightResult.content; 64 | if (content) { 65 | words = words.concat(content.matchedWords); 66 | } 67 | 68 | // return unique words 69 | var words_uniq = [...new Set(words)]; 70 | return words_uniq; 71 | } 72 | 73 | function updateHitURL(hit) { 74 | 75 | var words = matchedWords(hit); 76 | var url = ""; 77 | 78 | if (hit.anchor) { 79 | url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; 80 | } else { 81 | url = hit.url + '?q=' + escape(words.join(" ")); 82 | } 83 | 84 | return url; 85 | } 86 | -------------------------------------------------------------------------------- /docs/link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /docs/pkgdown.yml: -------------------------------------------------------------------------------- 1 | pandoc: 2.9.2.1 2 | pkgdown: 1.5.1 3 | pkgdown_sha: ~ 4 | articles: {} 5 | last_built: 2020-06-22T22:25Z 6 | 7 | -------------------------------------------------------------------------------- /docs/reference/biexponentialTransform-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/docs/reference/biexponentialTransform-1.png -------------------------------------------------------------------------------- /docs/reference/flowFrame-class-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/docs/reference/flowFrame-class-1.png -------------------------------------------------------------------------------- /docs/reference/flowFrame-class-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/docs/reference/flowFrame-class-2.png -------------------------------------------------------------------------------- /docs/reference/flowFrame-class-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/docs/reference/flowFrame-class-3.png -------------------------------------------------------------------------------- /docs/reference/flowFrame-class-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/docs/reference/flowFrame-class-4.png -------------------------------------------------------------------------------- /docs/reference/flowFrame-class-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/docs/reference/flowFrame-class-5.png -------------------------------------------------------------------------------- /docs/reference/flowSet-class-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/docs/reference/flowSet-class-1.png -------------------------------------------------------------------------------- /docs/reference/lnTransform-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/docs/reference/lnTransform-1.png -------------------------------------------------------------------------------- /docs/reference/splitScaleTransform-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/docs/reference/splitScaleTransform-1.png -------------------------------------------------------------------------------- /docs/reference/timeFilter-class-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/docs/reference/timeFilter-class-1.png -------------------------------------------------------------------------------- /examples/example2.R: -------------------------------------------------------------------------------- 1 | ## compensation.R 2 | ## 3 | ## Read in the plates of compensation tubes, compensate and be sure it is done correctly. 4 | ## 5 | ## Author: haaland 6 | ############################################################################### 7 | library(flowCore) 8 | 9 | ## get the compensation matrix 10 | comp.mat = as.matrix(read.table("./inst/extdata/compdata/compmatrix",header=TRUE,skip=2)) 11 | colnames(comp.mat) 12 | #[1] "FL1.H" "FL2.H" "FL3.H" "FL4.H" 13 | colnames(comp.mat) = c("FL1-H","FL2-H","FL3-H","FL4-H") 14 | ## read in the compensation tubes 15 | ## I think the default linearlization is the correct thing 16 | comp.fset1 = read.flowSet(path="~/rglab/workspace/flowCore/inst/extdata/compdata/data/",dataset=2) 17 | ap = phenoData(comp.fset1) 18 | pData(ap)$Tube = 1:5 19 | phenoData(comp.fset1) = ap 20 | pData(ap) 21 | eapply(comp.fset1@frames,function(x) apply(x@exprs,2,range)) 22 | colnames(comp.fset1) 23 | apply(comp.fset1[[1]]@exprs,2,range) 24 | 25 | ## compensate the linearized data 26 | comp.fset1b = compensate(comp.fset1,comp.mat) 27 | colnames(comp.fset1b) 28 | eapply(comp.fset1b@frames,function(x) apply(x@exprs,2,range)) 29 | apply(comp.fset1b[[1]]@exprs,2,range) 30 | 31 | truncTrans = truncateTransform("truncate",a=1) 32 | linearTrans = linearTransform(transformationId="linearTransformation",a=2,b=0) 33 | transform(comp.fset1b[[1]],`FL1-H`=linearTrans(`FL1-H`)) 34 | apply(comp.fset1b[[1]]@exprs,2,range) 35 | apply(transform(comp.fset1b[[1]],`FL1-H`=linearTrans(`FL1-H`))@exprs,2,range) 36 | apply(transform(comp.fset1b[[1]],`FL1-H`=truncTrans(`FL1-H`))@exprs,2,range) 37 | 38 | linearTrans2 = linearTransform("linearTransformation",a=1,b=0) 39 | comp.fset1ba = transform(comp.fset1b,`SSC-H`=linearTrans2(`SSC-H`)) 40 | apply(comp.fset1ba[[1]]@exprs,2,range) 41 | 42 | 43 | ## truncate values 44 | comp.fset1c = transform(comp.fset1b,`FL1-H`=truncTrans(`FL1-H`),`FL2-H`=truncTrans(`FL2-H`), 45 | `FL3-H`=truncTrans(`FL3-H`),`FL4-H`=truncTrans(`FL4-H`)) 46 | colnames(comp.fset1c) 47 | eapply(comp.fset1c@frames,function(x) apply(x@exprs,2,range)) 48 | apply(comp.fset1c[[1]]@exprs,2,range) 49 | 50 | ## scale FSC and SSC to go from 0 to 1 51 | scScaleTrans = scaleTransform("scatter-scale",a=0,b=1023) 52 | comp.fset1d = transform(comp.fset1c,`SSC-H`=scScaleTrans(`SSC-H`))#,`FSC-H`=scScaleTrans(`FSC-H`)) 53 | colnames(comp.fset1d) 54 | eapply(comp.fset1d@frames,function(x) apply(x@exprs,2,range)) 55 | apply(comp.fset1d[[1]]@exprs,2,range) 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /inst/doc/fcs3.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/inst/doc/fcs3.html -------------------------------------------------------------------------------- /inst/extdata/0877408774.B08: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/inst/extdata/0877408774.B08 -------------------------------------------------------------------------------- /inst/extdata/0877408774.E07: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/inst/extdata/0877408774.E07 -------------------------------------------------------------------------------- /inst/extdata/0877408774.F06: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/inst/extdata/0877408774.F06 -------------------------------------------------------------------------------- /inst/extdata/compdata/comp_match: -------------------------------------------------------------------------------- 1 | filename,channel 2 | 060909.001,unstained 3 | 060909.002,FL1-H 4 | 060909.004,FL4-H 5 | 060909.005,FL3-H 6 | 060909.003,FL2-H 7 | -------------------------------------------------------------------------------- /inst/extdata/compdata/compmatrix: -------------------------------------------------------------------------------- 1 | Lipo088#2matrix < > FL1-H FL2-H FL3-H FL4-H 1 0.24 0.032 1.13e-3 7.77e-3 1 0.14 2.74e-3 8.69e-3 0.17 1 0.21 7.95e-4 9.95e-4 3.23e-3 1 -------------------------------------------------------------------------------- /inst/extdata/compdata/compref: -------------------------------------------------------------------------------- 1 | "FL1-H" "FL2-H" "FL3-H" "FL4-H" 2 | "FL1-H" 1 0.242022277630705 0.0320837058201989 0.0011278155536909 3 | "FL2-H" 0.00772204774835748 1 0.140788231940242 0.00263268909406355 4 | "FL3-H" 0.0150806322244329 0.175589903184424 1 0.229593859843027 5 | "FL4-H" 0.000759031864601862 0.000962045888046345 0.00321861379453393 1 6 | -------------------------------------------------------------------------------- /inst/extdata/compdata/compref1: -------------------------------------------------------------------------------- 1 | "FL1-H" "FL2-H" "FL3-H" "FL4-H" 2 | "FL1-H" 1 0.242022277630705 0.0320837058201989 0.0011278155536909 3 | "FL2-H" 0.00772204774835748 1 0.140788231940242 0.00263268909406355 4 | "FL3-H" 0.0150806322244329 0.175589903184424 1 0.229593859843027 5 | "FL4-H" 0.000759031864601862 0.000962045888046345 0.00321861379453393 1 6 | -------------------------------------------------------------------------------- /inst/extdata/compdata/compref2: -------------------------------------------------------------------------------- 1 | "FL1-H" "FL2-H" "FL3-H" "FL4-H" 2 | "FL1-H" 1 0.242022277630705 0.0320837058201989 0.0011278155536909 3 | "FL2-H" 0.00772204774835748 1 0.140788231940242 0.00263268909406355 4 | "FL3-H" 0.000759031864601862 0.000962045888046345 0.00321861379453393 1 5 | "FL4-H" 0.0150806322244329 0.175589903184424 1 0.229593859843027 6 | -------------------------------------------------------------------------------- /inst/extdata/compdata/compref3: -------------------------------------------------------------------------------- 1 | "FL1-H" "FL2-H" "FL3-H" "FL4-H" 2 | "FL1-H" 1 0.251598574635036 0.0324353807676395 0.00153675258634071 3 | "FL2-H" 0.00767390370316522 1 0.142099503927178 0.00392756538266421 4 | "FL3-H" 0.0942639732982245 0.359314988565388 1 0.657186071137018 5 | "FL4-H" 0.0068250329580495 0.00215145619464392 0.0093692209454819 1 6 | -------------------------------------------------------------------------------- /inst/extdata/compdata/compref4: -------------------------------------------------------------------------------- 1 | "FL1-H" "FL2-H" "FL3-H" "FL4-H" 2 | "FL1-H" 1 0.251598574635036 0.0324353807676395 0.00153675258634071 3 | "FL2-H" 0.00767390370316522 1 0.142099503927178 0.00392756538266421 4 | "FL3-H" 0.0942639732982245 0.359314988565388 1 0.657186071137018 5 | "FL4-H" 0.0068250329580495 0.00215145619464392 0.0093692209454819 1 6 | -------------------------------------------------------------------------------- /inst/extdata/compdata/data/060909.001: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/inst/extdata/compdata/data/060909.001 -------------------------------------------------------------------------------- /inst/extdata/compdata/data/060909.002: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/inst/extdata/compdata/data/060909.002 -------------------------------------------------------------------------------- /inst/extdata/compdata/data/060909.003: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/inst/extdata/compdata/data/060909.003 -------------------------------------------------------------------------------- /inst/extdata/compdata/data/060909.004: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/inst/extdata/compdata/data/060909.004 -------------------------------------------------------------------------------- /inst/extdata/compdata/data/060909.005: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/inst/extdata/compdata/data/060909.005 -------------------------------------------------------------------------------- /man/CytoExploreR_exports.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CytoExploreR_wrappers.R 3 | \name{CytoExploreR_exports} 4 | \alias{CytoExploreR_exports} 5 | \alias{CytoExploreR_.estimateLogicle} 6 | \title{CytoExploreR exports} 7 | \usage{ 8 | CytoExploreR_.estimateLogicle(x, channels, ...) 9 | } 10 | \description{ 11 | Exported wrappers of internal functions for use by CytoExploreR 12 | } 13 | \keyword{internal} 14 | -------------------------------------------------------------------------------- /man/EHtrans-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{EHtrans-class} 5 | \alias{EHtrans-class} 6 | \alias{EHtrans} 7 | \alias{eval,EHtrans,missing-method} 8 | \title{Class "EHtrans"} 9 | \description{ 10 | EH transformation of a parameter is defined by the function 11 | \deqn{EH(parameter,a,b)= 10^{(\frac{parameter}{a})} + 12 | \frac{b*parameter}{a}-1, parameter>=0} 13 | \deqn{-10^{(\frac{-parameter}{a})} + \frac{b*parameter}{a}+1, parameter<0} 14 | } 15 | \section{Slots}{ 16 | 17 | \describe{ 18 | \item{\code{.Data}}{Object of class \code{"function"}.} 19 | 20 | \item{\code{a}}{Object of class \code{"numeric"} -- numeric constant greater than zero.} 21 | 22 | \item{\code{b}}{Object of class \code{"numeric"} -- numeric constant greater than zero.} 23 | 24 | \item{\code{parameters}}{Object of class \code{"transformation"} -- flow parameter to be 25 | transformed.} 26 | 27 | \item{\code{transformationId}}{Object of class \code{"character"} -- unique ID to reference the transformation.} 28 | }} 29 | 30 | \note{ 31 | The transformation object can be evaluated using the eval method by 32 | passing the data frame as an argument.The transformed parameters are 33 | returned as a matrix with a single column. (See example below) 34 | } 35 | \section{Objects from the Class}{ 36 | Objects can be created by calls to the 37 | constructor \code{EHtrans(parameters,a,b,transformationId)} 38 | } 39 | 40 | \section{Extends}{ 41 | 42 | Class \code{"\linkS4class{singleParameterTransform}"}, directly. 43 | 44 | Class \code{"\linkS4class{transform}"}, by class "singleParameterTransform", distance 2. 45 | 46 | Class \code{"\linkS4class{transformation}"}, by class "singleParameterTransform", distance 3. 47 | 48 | Class \code{"\linkS4class{characterOrTransformation}"}, by class "singleParameterTransform", distance 4. 49 | } 50 | 51 | \examples{ 52 | 53 | dat <- read.FCS(system.file("extdata","0877408774.B08", 54 | package="flowCore")) 55 | eh1<-EHtrans("FSC-H",a=1250,b=4,transformationId="eh1") 56 | transOut<-eval(eh1)(exprs(dat)) 57 | 58 | } 59 | \references{ 60 | Gating-ML Candidate Recommendation for Gating Description in 61 | Flow Cytometry V 1.5 62 | } 63 | \seealso{ 64 | hyperlog 65 | 66 | Other mathematical transform classes: 67 | \code{\link{asinht-class}}, 68 | \code{\link{asinhtGml2-class}}, 69 | \code{\link{dg1polynomial-class}}, 70 | \code{\link{exponential-class}}, 71 | \code{\link{hyperlog-class}}, 72 | \code{\link{hyperlogtGml2-class}}, 73 | \code{\link{invsplitscale-class}}, 74 | \code{\link{lintGml2-class}}, 75 | \code{\link{logarithm-class}}, 76 | \code{\link{logicletGml2-class}}, 77 | \code{\link{logtGml2-class}}, 78 | \code{\link{quadratic-class}}, 79 | \code{\link{ratio-class}}, 80 | \code{\link{ratiotGml2-class}}, 81 | \code{\link{sinht-class}}, 82 | \code{\link{splitscale-class}}, 83 | \code{\link{squareroot-class}}, 84 | \code{\link{unitytransform-class}} 85 | } 86 | \author{ 87 | Gopalakrishnan N, F.Hahne 88 | } 89 | \concept{mathematical transform classes} 90 | \keyword{classes} 91 | -------------------------------------------------------------------------------- /man/FCSTransTransform.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/FCSTransTransform.R 3 | \name{FCSTransTransform} 4 | \alias{FCSTransTransform} 5 | \title{Computes a transform using the 'iplogicle' function} 6 | \usage{ 7 | FCSTransTransform(transformationId = "defaultFCSTransTransform", 8 | channelrange = 2^18, channeldecade = 4.5, 9 | range = 4096, cutoff = -111, w = NULL, rescale = TRUE) 10 | } 11 | \arguments{ 12 | \item{transformationId}{A name to assign to the transformation. Used by the 13 | transform/filter routines.} 14 | 15 | \item{channelrange}{is the range of the data. By default, 2^18 = 262144.} 16 | 17 | \item{channeldecade}{is the number of logarithmic decades. By default, it is 18 | set to 4.5.} 19 | 20 | \item{range}{the target resolution. The default value is 2^12 = 4096.} 21 | 22 | \item{cutoff}{a threshold below which the logicle transformation maps values 23 | to 0.} 24 | 25 | \item{w}{the logicle width. This is estimated by \code{iplogicle} by 26 | default. Details can be found in the Supplementary File from Quian et al.} 27 | 28 | \item{rescale}{logical parameter whether or not the data should be rescaled 29 | to the number of channels specified in \code{range}. By default, the value 30 | is \code{TRUE} but can be set to FALSE if you want to work on the 31 | transformed scale.} 32 | } 33 | \description{ 34 | Transforms FCS data using the iplogicle function from FCSTrans by Quian et 35 | al. The core functionality of FCSTrans has been imported to produce 36 | transformed FCS data rescaled and truncated as produced by FCSTrans. The 37 | \code{w} parameter is estimated by \code{iplogicle} automatically, then 38 | makes a call to \code{iplogicore} which in turn uses the logicle transform 39 | code of Wayne Moore. 40 | } 41 | \details{ 42 | For the details of the FCSTrans transformation, we recommend the excellent 43 | Supplementary File that accompanies Quian et al. (2012): 44 | \url{http://onlinelibrary.wiley.com/doi/10.1002/cyto.a.22037/suppinfo} 45 | } 46 | \examples{ 47 | 48 | data(GvHD) 49 | samp <- GvHD[[1]] 50 | ## User defined logicle function 51 | lgcl <- transformList(c('FL1-H', 'FL2-H'), FCSTransTransform()) 52 | after <- transform(samp, lgcl) 53 | 54 | } 55 | \references{ 56 | Y Quian, Y Liu, J Campbell, E Thompson, YM Kong, RH Scheuermann; 57 | FCSTrans: An open source software system for FCS file conversion and data 58 | transformation. Cytometry A, 2012 59 | } 60 | \seealso{ 61 | \code{\link[flowCore]{inverseLogicleTransform}}, 62 | \code{\link[flowCore]{estimateLogicle} }, 63 | \code{\link[flowCore]{logicleTransform}} 64 | } 65 | \author{ 66 | Wayne Moore, N Gopalakrishnan 67 | } 68 | \keyword{methods} 69 | -------------------------------------------------------------------------------- /man/GvHD.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/GvHD.R 3 | \docType{data} 4 | \name{GvHD} 5 | \alias{GvHD} 6 | \title{Extract of a Graft versus Host Disease monitoring experiment (Rizzieri et 7 | al., 2007)} 8 | \format{ 9 | The format is an object of class \code{flowSet} composed of 35 10 | \code{flowFrames}. Each \code{flowFrame} corresponds to one sample at one 11 | time point. 12 | The \code{phenodata} lists: 13 | \describe{ 14 | \item{Patient}{The patient Id code } 15 | \item{Visit}{The number of visits to the hospital} 16 | \item{Days}{The number of days since the graft. Negative values correpond to 17 | days before the graft.} 18 | \item{Grade}{Grade of the cancer} 19 | } 20 | } 21 | \source{ 22 | Complete dataset available at 23 | \url{http://www.ficcs.org/software.html#Data_Files}, the Flow Informatics 24 | and Computational Cytometry Society website (FICCS) 25 | } 26 | \usage{ 27 | data(GvHD) 28 | } 29 | \description{ 30 | A flow cytometry high throughput screening was used to identify biomarkers 31 | that would predict the development of GvHD. The GvHD dataset is an extract 32 | of a collection of weekly peripheral blood samples obtained from patients 33 | following allogenic blood and marrow transplant. Samples were taken at 34 | various time points before and after graft. 35 | } 36 | \details{ 37 | This GvHD dataset represents the measurements of one biomarker (leukocyte) 38 | for 5 patients over 7 visits (7 time points). The blood samples were labeled 39 | with four different fluorescent probes to identify the biomarker and the 40 | fluorescent intensity was determined for at least ten thousand cells per 41 | sample. 42 | } 43 | \references{ 44 | Rizzieri DA et al. J Clin Oncol. 2007 Jan 16; [Epub ahead of 45 | print] PMID: 17228020 46 | } 47 | \keyword{datasets} 48 | -------------------------------------------------------------------------------- /man/Subset-methods.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/flowFrame-accessors.R 3 | \name{Subset-methods} 4 | \alias{Subset-methods} 5 | \alias{Subset} 6 | \alias{Subset,flowFrame,filter-method} 7 | \alias{Subset,flowSet,ANY-method} 8 | \alias{Subset,flowFrame-method} 9 | \alias{Subset,flowFrame,logical-method} 10 | \alias{Subset,flowSet,list-method} 11 | \alias{Subset,flowSet,filterResultList-method} 12 | \alias{Subset,flowSet,ANY} 13 | \title{Subset a flowFrame or a flowSet} 14 | \usage{ 15 | Subset(x, subset, ...) 16 | } 17 | \arguments{ 18 | \item{x}{The flow object, frame or set, to subset.} 19 | 20 | \item{subset}{A filter object or, in the case of \code{flowSet} subsetting, 21 | a named list of filters.} 22 | 23 | \item{\dots}{Like the original \code{\link{subset}} function, you can also 24 | select columns.} 25 | } 26 | \value{ 27 | Depending on the original context, either a \code{\linkS4class{flowFrame}} 28 | or a \code{\linkS4class{flowSet}}. 29 | } 30 | \description{ 31 | An equivalent of a \code{\link{subset}} function for 32 | \code{\linkS4class{flowFrame}} or a \code{\linkS4class{flowSet}} object. 33 | Alternatively, the regular subsetting operators can be used for most of the 34 | topics documented here. 35 | } 36 | \details{ 37 | The \code{Subset} method is the recommended method for obtaining a 38 | \code{\linkS4class{flowFrame}} that only contains events consistent with a 39 | particular filter. It is functionally equivalent to 40 | \code{frame[as(filter(frame,subset),"logical"),]} when used in the 41 | \code{\linkS4class{flowFrame}} context. Used in the 42 | \code{\linkS4class{flowSet}} context, it is equivalent to using 43 | \code{\link{fsApply}} to apply the filtering operation to each 44 | \code{\linkS4class{flowFrame}}. 45 | 46 | Additionally, using \code{Subset} on a \code{\linkS4class{flowSet}} can also 47 | take a named \code{list} as the subset. In this case, the names of the list 48 | object should correspond to the \code{sampleNames} of the flowSet, allowing 49 | a different filter to be applied to each frame. If not all of the names are 50 | used or excess names are present, a warning will be generated but the valid 51 | filters will be applied for the rare instances where this is the intended 52 | operation. Note that a \code{\link{filter}} operation will generate a list 53 | of \code{\linkS4class{filterResult}} objects that can be used directly with 54 | \code{Subset} in this manner. 55 | } 56 | \examples{ 57 | 58 | sample <- read.flowSet(path=system.file("extdata", package="flowCore"), 59 | pattern="0877408774") 60 | result <- filter(sample, rectangleGate("FSC-H"=c(-Inf, 1024))) 61 | result 62 | Subset(sample,result) 63 | 64 | 65 | } 66 | \seealso{ 67 | \code{\link{split}}, \code{\link{subset}} 68 | } 69 | \author{ 70 | B. Ellis 71 | } 72 | \keyword{manip} 73 | -------------------------------------------------------------------------------- /man/arcsinhTransform.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \name{arcsinhTransform} 4 | \alias{arcsinhTransform} 5 | \title{Create the definition of an arcsinh transformation function (base specified 6 | by user) to be applied on a data set} 7 | \usage{ 8 | arcsinhTransform(transformationId="defaultArcsinhTransform", a=1, b=1, c=0) 9 | } 10 | \arguments{ 11 | \item{transformationId}{character string to identify the transformation} 12 | 13 | \item{a}{positive double that corresponds to a shift about 0.} 14 | 15 | \item{b}{positive double that corresponds to a scale factor.} 16 | 17 | \item{c}{positive double} 18 | } 19 | \value{ 20 | Returns an object of class \code{transform}. 21 | } 22 | \description{ 23 | Create the definition of the arcsinh Transformation that will be applied on 24 | some parameter via the \code{transform} method. The definition of this 25 | function is currently x<-asinh(a+b*x)+c). The transformation would normally 26 | be used to convert to a linear valued parameter to the natural logarithm 27 | scale. By default a and b are both equal to 1 and c to 0. 28 | } 29 | \examples{ 30 | 31 | samp <- read.FCS(system.file("extdata", 32 | "0877408774.B08", package="flowCore")) 33 | asinhTrans <- arcsinhTransform(transformationId="ln-transformation", a=1, b=1, c=1) 34 | translist <- transformList('FSC-H', asinhTrans) 35 | dataTransform <- transform(samp, translist) 36 | 37 | } 38 | \seealso{ 39 | \code{\link{transform-class}}, \code{\link{transform}}, 40 | \code{asinh} 41 | 42 | Other Transform functions: 43 | \code{\link{biexponentialTransform}()}, 44 | \code{\link{inverseLogicleTransform}()}, 45 | \code{\link{linearTransform}()}, 46 | \code{\link{lnTransform}()}, 47 | \code{\link{logTransform}()}, 48 | \code{\link{logicleTransform}()}, 49 | \code{\link{quadraticTransform}()}, 50 | \code{\link{scaleTransform}()}, 51 | \code{\link{splitScaleTransform}()}, 52 | \code{\link{truncateTransform}()} 53 | } 54 | \author{ 55 | B. Ellis 56 | } 57 | \concept{Transform functions} 58 | \keyword{methods} 59 | -------------------------------------------------------------------------------- /man/characterOrNumeric-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{characterOrNumeric-class} 5 | \alias{characterOrNumeric-class} 6 | \alias{characterOrNumeric} 7 | \title{Class "characterOrNumeric"} 8 | \description{ 9 | A simple union class of \code{character} and \code{numeric}. 10 | Objects will be created internally whenever necessary and the user should 11 | not need to explicitly interact with this class. 12 | } 13 | \section{Objects from the Class}{ 14 | A virtual Class: No objects may be created 15 | from it. 16 | } 17 | 18 | \examples{ 19 | 20 | showClass("characterOrNumeric") 21 | 22 | } 23 | \keyword{classes} 24 | -------------------------------------------------------------------------------- /man/characterOrParameters-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{characterOrParameters-class} 5 | \alias{characterOrParameters-class} 6 | \alias{characterOrParameters} 7 | \title{Class "characterOrParameters"} 8 | \description{ 9 | A simple union class of \code{character} and \code{\linkS4class{parameters}}. 10 | Objects will be created internally whenever necessary and the user should 11 | not need to explicitly interact with this class. 12 | } 13 | \section{Objects from the Class}{ 14 | A virtual Class: No objects may be created 15 | from it. 16 | } 17 | 18 | \examples{ 19 | 20 | showClass("characterOrParameters") 21 | 22 | } 23 | \keyword{classes} 24 | -------------------------------------------------------------------------------- /man/characterOrTransformation-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{characterOrTransformation-class} 5 | \alias{characterOrTransformation-class} 6 | \alias{characterOrTransformation} 7 | \title{Class "characterOrTransformation"} 8 | \description{ 9 | A simple union class of \code{character} and \code{\linkS4class{transformation}}. 10 | Objects will be created internally whenever necessary and the user should 11 | not need to explicitly interact with this class. 12 | } 13 | \section{Objects from the Class}{ 14 | A virtual Class: No objects may be created 15 | from it. 16 | } 17 | 18 | \examples{ 19 | 20 | showClass("characterOrTransformation") 21 | 22 | } 23 | \keyword{classes} 24 | -------------------------------------------------------------------------------- /man/checkOffset.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/IO.R 3 | \name{checkOffset} 4 | \alias{checkOffset} 5 | \title{Fix the offset when its values recorded in header and TEXT don't agree} 6 | \usage{ 7 | checkOffset(offsets, x, ignore.text.offset = FALSE, ...) 8 | } 9 | \arguments{ 10 | \item{offsets}{the named vector returned by \code{findOffsets}} 11 | 12 | \item{x}{the text segmented returned by \code{readFCStext}} 13 | 14 | \item{ignore.text.offset}{whether to ignore the offset info stored in TEXT segment} 15 | 16 | \item{...}{not used.} 17 | } 18 | \value{ 19 | the updated offsets 20 | } 21 | \description{ 22 | Fix the offset when its values recorded in header and TEXT don't agree 23 | } 24 | -------------------------------------------------------------------------------- /man/coerce.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/coerce.R 3 | \name{coerce} 4 | \alias{coerce} 5 | \alias{coerce,filter,logical-method} 6 | \alias{coerce,filterResult,logical-method} 7 | \alias{coerce,subsetFilter,logical-method} 8 | \alias{coerce,unionFilter,logical-method} 9 | \alias{coerce,complementFilter,logical-method} 10 | \alias{coerce,factor,filterResult-method} 11 | \alias{coerce,matrix,filterResult-method} 12 | \alias{coerce,logical,filterResult-method} 13 | \alias{coerce,numeric,filterResult-method} 14 | \alias{coerce,logicalFilterResult,logical-method} 15 | \alias{coerce,randomFilterResult,logical-method} 16 | \alias{coerce,environment,flowSet-method} 17 | \alias{coerce,list,flowSet-method} 18 | \alias{coerce,list,transformList-method} 19 | \alias{coerce,intersectFilter,logical-method} 20 | \alias{coerce,filter,call-method} 21 | \alias{coerce,subsetFilter,call-method} 22 | \alias{coerce,intersectFiler,call-method} 23 | \alias{coerce,unionFilter,call-method} 24 | \alias{coerce,complementFilter,call-method} 25 | \alias{coerce,filterReference,concreteFilter-method} 26 | \alias{coerce,filterReference,call-method} 27 | \alias{coerce,formula,filter-method} 28 | \alias{coerce,character,filter-method} 29 | \alias{coerce,name,filter-method} 30 | \alias{coerce,call,filter-method} 31 | \alias{coerce,list,filterResultList-method} 32 | \alias{coerce,filterResultList,list-method} 33 | \alias{coerce,flowSet,list-method} 34 | \alias{coerce,flowSet,flowFrame-method} 35 | \alias{coerce,flowFrame,flowSet-method} 36 | \alias{coerce,nullParameter,character-method} 37 | \alias{coerce,parameters,character-method} 38 | \alias{coerce,ratio,character-method} 39 | \alias{coerce,transform,character-method} 40 | \alias{coerce,unitytransform,character-method} 41 | \alias{coerce,ellipsoidGate,polygonGate-method} 42 | \alias{coerce,rectangleGate,polygonGate-method} 43 | \title{Convert an object to another class} 44 | \arguments{ 45 | \item{from, to}{The classes between which \code{def} performs coercion. (In 46 | the case of the \code{coerce} function, these are objects from the classes, 47 | not the names of the classes, but you're not expected to call \code{coerce} 48 | directly.)} 49 | } 50 | \description{ 51 | These functions manage the relations that allow coercing an object to a 52 | given class. 53 | } 54 | \details{ 55 | The function supplied as the third argument is to be called to implement 56 | \code{as(x, to)} when \code{x} has class \code{from}. Need we add that the 57 | function should return a suitable object with class \code{to}. 58 | } 59 | \examples{ 60 | 61 | samp1 <- read.FCS(system.file("extdata","0877408774.E07", package="flowCore")) 62 | samp2 <- read.FCS(system.file("extdata","0877408774.B08",package="flowCore")) 63 | samples <-list("sample1"=samp1,"sample2"=samp2) 64 | experiment <- as(samples,"flowSet") 65 | 66 | } 67 | \author{ 68 | F. Hahne, B. Ellis 69 | } 70 | \keyword{methods} 71 | -------------------------------------------------------------------------------- /man/collapse_desc.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/IO.R 3 | \name{collapse_desc} 4 | \alias{collapse_desc} 5 | \title{Coerce the list of the keywords into a character 6 | Also flatten spillover matrix into a string} 7 | \usage{ 8 | collapse_desc(d, collapse.spill = TRUE) 9 | } 10 | \arguments{ 11 | \item{d}{a named list of keywords} 12 | 13 | \item{collapse.spill}{whether to flatten spillover matrix to a string} 14 | } 15 | \value{ 16 | a list of strings 17 | } 18 | \description{ 19 | Coerce the list of the keywords into a character 20 | Also flatten spillover matrix into a string 21 | } 22 | \examples{ 23 | data(GvHD) 24 | fr <- GvHD[[1]] 25 | collapse_desc(keyword(fr)) 26 | } 27 | -------------------------------------------------------------------------------- /man/compensatedParameter-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{compensatedParameter-class} 5 | \alias{compensatedParameter-class} 6 | \alias{compensatedParameter} 7 | \alias{eval,compensatedParameter,missing-method} 8 | \title{Class "compensatedParameter"} 9 | \description{ 10 | Emission spectral overlap can be corrected by subtracting the amount of 11 | spectral overlap from the total detected signals. This compensation process 12 | can be described by using spillover matrices. 13 | } 14 | \details{ 15 | The compensatedParameter class allows for compensation of specific parameters 16 | the user is interested in by creating compensatedParameter objects and 17 | evaluating them. This allows for use of compensatedParameter in gate 18 | definitions. 19 | } 20 | \section{Slots}{ 21 | 22 | \describe{ 23 | \item{\code{.Data}}{Object of class \code{"function"}.} 24 | 25 | \item{\code{parameters}}{Object of class \code{"character"} -- the flow 26 | parameters to be compensated.} 27 | 28 | \item{\code{spillRefId}}{Object of class \code{"character"} -- the name of the 29 | compensation object (The compensation object contains the spillover Matrix).} 30 | 31 | \item{\code{searchEnv}}{Object of class \code{"environment"} -environment in 32 | which the compensation object is defined.} 33 | 34 | \item{\code{transformationId}}{Object of class \code{"character"} -- a unique Id to 35 | reference the compensatedParameter object.} 36 | }} 37 | 38 | \note{ 39 | The transformation object can be evaluated using the eval method by 40 | passing the data frame as an argument. The transformed parameters are 41 | returned as a matrix with a single column. (See example below) 42 | } 43 | \section{Objects from the Class}{ 44 | 45 | 46 | Objects can be created by calls to the constructor of the form 47 | \code{compensatedParameter(parameters,spillRefId,transformationId,searchEnv)}. 48 | } 49 | 50 | \section{Extends}{ 51 | 52 | Class \code{"\linkS4class{transform}"}, directly. 53 | Class \code{"\linkS4class{transformation}"}, by class "transform", distance 2. 54 | Class \code{"\linkS4class{characterOrTransformation}"}, by class "transform", distance 3. 55 | } 56 | 57 | \examples{ 58 | 59 | samp <- read.flowSet(path=system.file("extdata", "compdata", "data", package="flowCore")) 60 | cfile <- system.file("extdata","compdata","compmatrix", package="flowCore") 61 | comp.mat <- read.table(cfile, header=TRUE, skip=2, check.names = FALSE) 62 | comp.mat 63 | 64 | ## create a compensation object 65 | comp <- compensation(comp.mat,compensationId="comp1") 66 | ## create a compensated parameter object 67 | cPar1<-compensatedParameter(c("FL1-H","FL3-H"),"comp",searchEnv=.GlobalEnv) 68 | compOut<-eval(cPar1)(exprs(samp[[1]])) 69 | 70 | 71 | } 72 | \seealso{ 73 | compensation 74 | } 75 | \author{ 76 | Gopalakrishnan N,F.Hahne 77 | } 78 | \keyword{classes} 79 | -------------------------------------------------------------------------------- /man/complementFilter-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{complementFilter-class} 5 | \alias{complementFilter-class} 6 | \alias{complementFilter} 7 | \alias{show,complementFilter-method} 8 | \title{Class complementFilter} 9 | \description{ 10 | This class represents the logical complement of a single filter, which is 11 | itself a filter that can be incorporated in to further set operations. 12 | \code{complementFilter}s are constructed using the prefix unary set operator 13 | \code{"!"} with a single filter operand. 14 | } 15 | \section{Slots}{ 16 | 17 | \describe{ 18 | \item{\code{filters}}{Object of class \code{"list"}, containing the component filters.} 19 | 20 | \item{\code{filterId}}{Object of class \code{"character"} 21 | referencing the filter applied.} 22 | }} 23 | 24 | \section{Extends}{ 25 | 26 | 27 | Class \code{"\linkS4class{filter}"}, directly. 28 | } 29 | 30 | \seealso{ 31 | \code{\link[flowCore:filter-methods]{filter}}, \code{\linkS4class{setOperationFilter}} 32 | 33 | Other setOperationFilter classes: 34 | \code{\link{intersectFilter-class}}, 35 | \code{\link{setOperationFilter-class}}, 36 | \code{\link{subsetFilter-class}}, 37 | \code{\link{unionFilter-class}} 38 | } 39 | \author{ 40 | B. Ellis 41 | } 42 | \concept{setOperationFilter classes} 43 | \keyword{classes} 44 | -------------------------------------------------------------------------------- /man/concreteFilter-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{concreteFilter-class} 5 | \alias{concreteFilter-class} 6 | \alias{concreteFilter} 7 | \title{Class "concreteFilter"} 8 | \description{ 9 | The \code{concreteFilter} serves as a base class for all filters that 10 | actually implement a filtering process. At the moment this includes all 11 | filters except \code{\linkS4class{filterReference}}, the only non-concrete 12 | filter at present. 13 | } 14 | \section{Slots}{ 15 | 16 | \describe{ 17 | \item{\code{filterId}}{The identifier associated with this class.} 18 | }} 19 | 20 | \section{Objects from the Class}{ 21 | Objects of this class should never be 22 | created directly. It serves only as a point of inheritance. 23 | } 24 | 25 | \section{Extends}{ 26 | 27 | Class \code{"\linkS4class{filter}"}, directly. 28 | } 29 | 30 | \seealso{ 31 | \code{\linkS4class{parameterFilter}} 32 | } 33 | \author{ 34 | B. Ellis 35 | } 36 | \keyword{classes} 37 | -------------------------------------------------------------------------------- /man/decompensate.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/flowFrame-accessors.R 3 | \docType{methods} 4 | \name{decompensate} 5 | \alias{decompensate} 6 | \alias{decompensate,flowFrame,matrix-method} 7 | \alias{decompensate,flowFrame,data.frame-method} 8 | \alias{decompensate-methods} 9 | \alias{decompensate,flowFrame,compensation-method} 10 | \title{Decompensate a flowFrame} 11 | \usage{ 12 | \S4method{decompensate}{flowFrame,matrix}(x, spillover) 13 | 14 | \S4method{decompensate}{flowFrame,compensation}(x, spillover) 15 | } 16 | \arguments{ 17 | \item{x}{flowFrame.} 18 | 19 | \item{spillover}{matrix or data.frame or a compensation object} 20 | } 21 | \value{ 22 | a decompensated flowFrame 23 | } 24 | \description{ 25 | Reverse the application of a compensation matrix on a flowFrame 26 | } 27 | \examples{ 28 | library(flowCore) 29 | f = list.files(system.file("extdata", 30 | "compdata", 31 | "data", 32 | package="flowCore"), 33 | full.name=TRUE)[1] 34 | f = read.FCS(f) 35 | spill = read.csv(system.file("extdata", 36 | "compdata", "compmatrix", 37 | package="flowCore"), 38 | ,sep="\t",skip=2) 39 | colnames(spill) = gsub("\\\\.","-",colnames(spill)) 40 | f.comp = compensate(f,spill) 41 | f.decomp = decompensate(f.comp,as.matrix(spill)) 42 | sum(abs(f@exprs-f.decomp@exprs)) 43 | all.equal(decompensate(f.comp,spill)@exprs,decompensate(f.comp,as.matrix(spill))@exprs) 44 | all.equal(f@exprs,decompensate(f.comp,spill)@exprs) 45 | 46 | } 47 | -------------------------------------------------------------------------------- /man/each_col.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllGenerics.R 3 | \docType{methods} 4 | \name{each_col} 5 | \alias{each_col} 6 | \alias{each_row} 7 | \alias{each_row-methods} 8 | \alias{each_row,flowFrame-method} 9 | \alias{each_col-methods} 10 | \alias{each_col,flowFrame-method} 11 | \title{Methods to apply functions over flowFrame margins} 12 | \usage{ 13 | each_col(x, FUN, ...) 14 | each_row(x, FUN, ...) 15 | } 16 | \arguments{ 17 | \item{x}{Object of class \code{\linkS4class{flowFrame}}.} 18 | 19 | \item{FUN}{the function to be applied. In the case of functions like '+', 20 | '\%*\%', etc., the function name must be backquoted or quoted.} 21 | 22 | \item{...}{optional arguments to 'FUN'.} 23 | } 24 | \description{ 25 | Returns a vector or array of values obtained by applying a function to the 26 | margins of a flowFrame. This is equivalent of running \code{\link{apply}} on 27 | the output of \code{exprs(flowFrame)}. 28 | } 29 | \examples{ 30 | 31 | samp <- read.FCS(system.file("extdata", "0877408774.B08", package="flowCore"), 32 | transformation="linearize") 33 | each_col(samp, summary) 34 | 35 | 36 | } 37 | \seealso{ 38 | \code{\link{apply}} 39 | } 40 | \author{ 41 | B. Ellis, N. LeMeur, F. Hahne 42 | } 43 | \keyword{methods} 44 | -------------------------------------------------------------------------------- /man/estimateMedianLogicle.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/median-logicle-transform.R 3 | \name{estimateMedianLogicle} 4 | \alias{estimateMedianLogicle} 5 | \title{Estimates a common logicle transformation for a flowSet.} 6 | \usage{ 7 | estimateMedianLogicle(flow_set, channels, m = 4.5, q = 0.05) 8 | } 9 | \arguments{ 10 | \item{flow_set}{object of class 'flowSet'} 11 | 12 | \item{channels}{character vector of channels to transform} 13 | 14 | \item{m}{TODO -- default value from .lgclTrans} 15 | 16 | \item{q}{quantile} 17 | } 18 | \value{ 19 | TODO 20 | } 21 | \description{ 22 | Of the negative values for each channel specified, the median of the specified 23 | quantiles are used. 24 | } 25 | -------------------------------------------------------------------------------- /man/exponential-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{exponential-class} 5 | \alias{exponential-class} 6 | \alias{exponential} 7 | \alias{eval,exponential,missing-method} 8 | \title{Class "exponential"} 9 | \description{ 10 | Exponential transform class, which represents a transformation given by the 11 | function \deqn{f(parameter,a,b)=e^{parameter/b}*\frac{1}{a}} 12 | } 13 | \section{Slots}{ 14 | 15 | \describe{ 16 | \item{\code{.Data}}{Object of class \code{"function"}.} 17 | 18 | \item{\code{a}}{Object of class \code{"numeric"} -- non-zero constant.} 19 | 20 | \item{\code{b}}{Object of class \code{"numeric"}- non-zero constant.} 21 | 22 | \item{\code{parameters}}{Object of class \code{"transformation"} -- flow 23 | parameter to be transformed.} 24 | 25 | \item{\code{transformationId}}{Object of class \code{"character"} -- 26 | unique ID to reference the transformation} 27 | }} 28 | 29 | \note{ 30 | The exponential transformation object can be evaluated using the eval 31 | method by passing the data frame as an argument.The transformed parameters 32 | are returned as a matrix with a single column 33 | } 34 | \section{Objects from the Class}{ 35 | Objects can be created by calls to the 36 | constructor\code{exponential(parameters,a,b)}. 37 | } 38 | 39 | \section{Extends}{ 40 | 41 | Class \code{"\linkS4class{singleParameterTransform}"}, directly. 42 | 43 | Class \code{"\linkS4class{transform}"}, by class "singleParameterTransform", distance 2. 44 | 45 | Class \code{"\linkS4class{transformation}"}, by class "singleParameterTransform", distance 3. 46 | 47 | Class \code{"\linkS4class{characterOrTransformation}"}, by class "singleParameterTransform", distance 4. 48 | } 49 | 50 | \examples{ 51 | 52 | dat <- read.FCS(system.file("extdata","0877408774.B08", 53 | package="flowCore")) 54 | exp1<-exponential(parameters="FSC-H",a=1,b=37,transformationId="exp1") 55 | transOut<-eval(exp1)(exprs(dat)) 56 | 57 | } 58 | \references{ 59 | Gating-ML Candidate Recommendation for Gating Description in 60 | Flow Cytometry V 1.5 61 | } 62 | \seealso{ 63 | logarithm 64 | 65 | Other mathematical transform classes: 66 | \code{\link{EHtrans-class}}, 67 | \code{\link{asinht-class}}, 68 | \code{\link{asinhtGml2-class}}, 69 | \code{\link{dg1polynomial-class}}, 70 | \code{\link{hyperlog-class}}, 71 | \code{\link{hyperlogtGml2-class}}, 72 | \code{\link{invsplitscale-class}}, 73 | \code{\link{lintGml2-class}}, 74 | \code{\link{logarithm-class}}, 75 | \code{\link{logicletGml2-class}}, 76 | \code{\link{logtGml2-class}}, 77 | \code{\link{quadratic-class}}, 78 | \code{\link{ratio-class}}, 79 | \code{\link{ratiotGml2-class}}, 80 | \code{\link{sinht-class}}, 81 | \code{\link{splitscale-class}}, 82 | \code{\link{squareroot-class}}, 83 | \code{\link{unitytransform-class}} 84 | } 85 | \author{ 86 | Gopalakrishnan N, F.Hahne 87 | } 88 | \concept{mathematical transform classes} 89 | \keyword{classes} 90 | -------------------------------------------------------------------------------- /man/filter-and-methods.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{methods} 4 | \name{filter-and-methods} 5 | \alias{filter-and-methods} 6 | \alias{intersectFilter-method} 7 | \alias{subsetFilter-method} 8 | \alias{\%&\%} 9 | \alias{\%&\%-methods} 10 | \alias{\%&\%,ANY-method} 11 | \alias{\%&\%,filter,filter-method} 12 | \alias{\%subset\%,ANY-method} 13 | \alias{\%subset\%} 14 | \alias{&,filter,filter-method} 15 | \alias{&,filter,list-method} 16 | \alias{&,list,filter-method} 17 | \alias{\%subset\%,filter,filter-method} 18 | \alias{\%subset\%,list,filter-method} 19 | \alias{coerce,intersectFilter,call-method} 20 | \title{Take the intersection of two filters} 21 | \usage{ 22 | e1 \%&\% e2 23 | e1 \%subset\% e2 24 | } 25 | \arguments{ 26 | \item{e1, e2}{\code{\linkS4class{filter}} objects or lists of filter objects} 27 | } 28 | \description{ 29 | There are two notions of intersection in \code{flowCore}. First, there is 30 | the usual intersection boolean operator \code{&} that has been overridden to 31 | allow the intersection of two filters or of a filter and a list for 32 | convenience. There is also the \code{\%&\%} or \code{\%subset\%} operator that 33 | takes an intersection, but with subset semantics rather than simple 34 | intersection semantics. In other words, when taking a subset, calculations 35 | from \code{\link[flowCore:filterSummary-class]{summary}} and other methods 36 | are taken with respect to the right hand filter. This primarily affects 37 | calculations, which are ordinarily calculated with respect to the entire 38 | population as well as data-driven gating procedures which will operate only 39 | on elements contained by the right hand filter. This becomes especially 40 | important when using filters such as 41 | \code{\link[flowStats:norm2Filter-class]{norm2Filter}} 42 | } 43 | \author{ 44 | B. Ellis 45 | } 46 | \keyword{methods} 47 | -------------------------------------------------------------------------------- /man/filter-in-methods.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/in-methods.R 3 | \docType{methods} 4 | \name{filter-in-methods} 5 | \alias{filter-in-methods} 6 | \alias{\%in\%-methods} 7 | \alias{\%in\%} 8 | \alias{\%in\%,ANY,filterResult-method} 9 | \alias{\%in\%,ANY,multipleFilterResult-method} 10 | \alias{\%in\%,ANY,manyFilterResult-method} 11 | \alias{\%in\%,ANY,filterReference-method} 12 | \alias{\%in\%,flowFrame,rectangleGate-method} 13 | \alias{\%in\%,flowFrame,polygonGate-method} 14 | \alias{\%in\%,flowFrame,ellipsoidGate-method} 15 | \alias{\%in\%,flowFrame,norm2Filter-method} 16 | \alias{\%in\%,flowFrame,unionFilter-method} 17 | \alias{\%in\%,flowFrame,intersectFilter-method} 18 | \alias{\%in\%,flowFrame,complementFilter-method} 19 | \alias{\%in\%,flowFrame,subsetFilter-method} 20 | \alias{\%in\%,flowFrame,filterResult-method} 21 | \alias{\%in\%,flowFrame,kmeansFilter-method} 22 | \alias{\%in\%,flowFrame,sampleFilter-method} 23 | \alias{\%in\%,flowFrame,transformFilter-method} 24 | \alias{\%in\%,flowFrame,expressionFilter-method} 25 | \alias{\%in\%,flowFrame,quadGate-method} 26 | \alias{\%in\%,flowFrame,timeFilter-method} 27 | \alias{\%in\%,flowFrame,boundaryFilter-method} 28 | \alias{\%in\%,flowFrame,polytopeGate-method} 29 | \title{Filter-specific membership methods} 30 | \usage{ 31 | x \%in\% table 32 | } 33 | \arguments{ 34 | \item{x}{a \code{\linkS4class{flowFrame}}} 35 | 36 | \item{table}{an object of type \code{\linkS4class{filter}} or \code{\linkS4class{filterResult}} 37 | or one of their derived classes, representing a gate, filter, or result to check 38 | for the membership of x} 39 | } 40 | \value{ 41 | Vector of type \code{logical}, \code{numeric} or \code{factor} depending on the arguments 42 | } 43 | \description{ 44 | Membership methods must be defined for every object of type \code{filter} 45 | with respect to a \code{flowFrame} object. The operation is considered to 46 | be general and may return a \code{logical}, \code{numeric} or \code{factor} 47 | vector that will be handled appropriately. The ability to handle logical 48 | matrices as well as vectors is also planned but not yet implemented. 49 | } 50 | \author{ 51 | F.Hahne, B. Ellis 52 | } 53 | \keyword{methods} 54 | -------------------------------------------------------------------------------- /man/filter-on-methods.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/on-methods.R 3 | \docType{methods} 4 | \name{filter-on-methods} 5 | \alias{filter-on-methods} 6 | \alias{\%on\%-methods} 7 | \alias{\%on\%} 8 | \alias{\%on\%,filter,transformList-method} 9 | \alias{\%on\%,filter,transform-method} 10 | \alias{\%on\%,filter,parameterTransform-method} 11 | \alias{\%on\%,parameterTransform,flowFrame-method} 12 | \alias{\%on\%,transform,flowFrame-method} 13 | \alias{\%on\%,transformList,flowFrame-method} 14 | \alias{\%on\%,transformList,flowSet-method} 15 | \alias{\%on\%,ANY,flowSet-method} 16 | \title{Methods for Function \%on\% in Package `flowCore'} 17 | \usage{ 18 | e1 \%on\% e2 19 | } 20 | \arguments{ 21 | \item{e1}{a \code{\linkS4class{filter}}, \code{\linkS4class{transform}}, 22 | or \code{\linkS4class{transformList}} object} 23 | 24 | \item{e2}{a \code{\linkS4class{transform}}, \code{\linkS4class{transformList}}, 25 | \code{\linkS4class{flowFrame}}, or \code{\linkS4class{flowSet}} object} 26 | } 27 | \description{ 28 | This operator is used to construct a \code{transformFilter} that first 29 | applies a \code{transformList} to the data before applying the \code{filter} 30 | operation. You may also apply the operator to a \code{flowFrame} or 31 | \code{flowSet} to obtain transformed values specified in the list. 32 | } 33 | \examples{ 34 | 35 | samp <- read.FCS(system.file("extdata","0877408774.B08", package="flowCore")) 36 | plot(transform("FSC-H"=log, "SSC-H"=log) \%on\% samp) 37 | 38 | 39 | rectangle <- rectangleGate(filterId="rectangleGateI","FSC-H"=c(4.5, 5.5)) 40 | sampFiltered <- filter(samp, rectangle \%on\% transform("FSC-H"=log, "SSC-H"=log)) 41 | res <- Subset(samp, sampFiltered) 42 | 43 | plot(transform("FSC-H"=log, "SSC-H"=log) \%on\% res) 44 | 45 | 46 | } 47 | \author{ 48 | B. Ellis 49 | } 50 | \keyword{methods} 51 | -------------------------------------------------------------------------------- /man/filterDetails-methods.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/filterResult-accessors.R 3 | \docType{methods} 4 | \name{filterDetails-methods} 5 | \alias{filterDetails-methods} 6 | \alias{filterDetails} 7 | \alias{filterDetails,filterResult,missing-method} 8 | \alias{filterDetails,filterResult,ANY-method} 9 | \alias{filterDetails<-} 10 | \alias{filterDetails<-,filterResult,character,setOperationFilter-method} 11 | \alias{filterDetails<-,filterResult,character,filter-method} 12 | \alias{filterDetails<-,filterResult,character,ANY-method} 13 | \title{Obtain details about a filter operation} 14 | \description{ 15 | A filtering operation captures details about its metadata and stores it in a 16 | \code{filterDetails} slot in a \code{\linkS4class{filterResult}} object 17 | that is accessed using the \code{filterDetails} method. Each set of metadata 18 | is indexed by the \code{filterId} of the filter allowing for all the metadata 19 | in a complex filtering operation to be recovered after the final filtering. 20 | } 21 | \section{Methods}{ 22 | 23 | \describe{ 24 | 25 | \item{filterDetails(result = "filterResult", filterId = "missing")}{When no particular 26 | \code{filterId} is specified all the details are returned} 27 | 28 | \item{filterDetails(result = "filterResult", filterId = "ANY")}{You can also obtain a 29 | particular subset of details} 30 | } 31 | } 32 | 33 | \author{ 34 | B. Ellis, P.D. Haaland and N. LeMeur 35 | } 36 | \keyword{methods} 37 | -------------------------------------------------------------------------------- /man/filterList-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{filterList-class} 5 | \alias{filterList-class} 6 | \alias{filterList} 7 | \alias{show,filterList-method} 8 | \alias{identifier,filterList-method} 9 | \alias{identifier<-,filterList,character-method} 10 | \title{Class "filterList"} 11 | \usage{ 12 | filterList(x, filterId=identifier(x[[1]])) 13 | } 14 | \arguments{ 15 | \item{x}{A list of \code{\link{filter}} objects.} 16 | 17 | \item{filterId}{The global identifier of the filter list. As default, we 18 | take the filterId of the first \code{filter} object in \code{x}.} 19 | } 20 | \value{ 21 | A \code{filterList} object for the constructor. 22 | } 23 | \description{ 24 | Container for a list of \code{\link[flowCore:filter-methods]{filter}} 25 | objects. The class mainly exists for method dispatch. 26 | } 27 | \section{Slots}{ 28 | 29 | \describe{ 30 | \item{\code{.Data}}{Object of class \code{"list"}. The class 31 | directly extends \code{list}, and this slot holds the list data.} 32 | 33 | \item{\code{filterId}}{Object of class \code{"character"}. The 34 | identifier for the object.} 35 | }} 36 | 37 | \section{Objects from the Class}{ 38 | Objects are created from regular lists 39 | using the constructor \code{filterList}. 40 | } 41 | 42 | \section{Extends}{ 43 | 44 | 45 | Class \code{"\linkS4class{list}"}, from data part. 46 | } 47 | 48 | \section{Methods}{ 49 | 50 | 51 | \describe{ 52 | \item{show}{\code{signature(object = "filterList")}: Print 53 | details about the object. } 54 | 55 | \item{identifier, identifier<-}{\code{signature(object = 56 | "filterList")}: Accessor and replacement method for the object's 57 | filterId slot. } 58 | } 59 | } 60 | 61 | \examples{ 62 | 63 | f1 <- rectangleGate(FSC=c(100,200), filterId="testFilter") 64 | f2 <- rectangleGate(FSC=c(200,400)) 65 | fl <- filterList(list(a=f1, b=f2)) 66 | fl 67 | identifier(fl) 68 | 69 | 70 | } 71 | \seealso{ 72 | \code{\link[flowCore:filter-methods]{filter}}, 73 | } 74 | \author{ 75 | Florian Hahne 76 | } 77 | \keyword{classes} 78 | -------------------------------------------------------------------------------- /man/filterReference-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{filterReference-class} 5 | \alias{filterReference-class} 6 | \alias{filterReference} 7 | \alias{filterReference,environment,character-method} 8 | \alias{summary,filterReference-method} 9 | \alias{length,filterReference-method} 10 | \alias{show,filterReference-method} 11 | \alias{eval,filterReference,missing-method} 12 | \title{Class filterReference} 13 | \description{ 14 | A reference to another filter inside a reference. Users should generally not 15 | be aware that they are using this class. 16 | } 17 | \section{Slots}{ 18 | 19 | \describe{ 20 | \item{\code{name}}{The R name of the referenced filter.} 21 | 22 | \item{\code{env}}{The environment where the filter must live.} 23 | 24 | \item{\code{filterId}}{The filterId, not really used since you always resolve.} 25 | }} 26 | 27 | \section{Objects from the Class}{ 28 | Objects are generally not created by users 29 | so there is no constructor function. 30 | } 31 | 32 | \section{Extends}{ 33 | 34 | 35 | Class \code{"\linkS4class{filter}"}, directly. 36 | } 37 | 38 | \author{ 39 | B. Ellis 40 | } 41 | \keyword{classes} 42 | -------------------------------------------------------------------------------- /man/filterResult-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{filterResult-class} 5 | \alias{filterResult-class} 6 | \alias{filterResult} 7 | \alias{==,filterResult,flowFrame-method} 8 | \alias{show,filterResult-method} 9 | \alias{[[,filterResult,ANY-method} 10 | \title{Class "filterResult"} 11 | \description{ 12 | Container to store the result of applying a \code{filter} on a 13 | \code{flowFrame} object 14 | } 15 | \section{Slots}{ 16 | 17 | \describe{ 18 | \item{\code{frameId}}{Object of class \code{"character"} 19 | referencing the \code{flowFrame} object filtered. Used for sanity checking.} 20 | 21 | \item{\code{filterDetails}}{Object of class \code{"list"} 22 | describing the filter applied.} 23 | 24 | \item{\code{filterId}}{Object of class \code{"character"} 25 | referencing the filter applied.} 26 | }} 27 | 28 | \section{Extends}{ 29 | 30 | 31 | Class \code{"\linkS4class{filter}"}, directly. 32 | } 33 | 34 | \section{Methods}{ 35 | 36 | \describe{ 37 | \item{==}{test equality} 38 | } 39 | } 40 | 41 | \examples{ 42 | 43 | showClass("filterResult") 44 | 45 | } 46 | \seealso{ 47 | \code{\link[flowCore:filter-methods]{filter}}, 48 | \code{"\linkS4class{logicalFilterResult}"}, 49 | \code{"\linkS4class{multipleFilterResult}"}, 50 | \code{"\linkS4class{randomFilterResult}"} 51 | } 52 | \author{ 53 | B. Ellis, N. LeMeur 54 | } 55 | \keyword{classes} 56 | -------------------------------------------------------------------------------- /man/filterSummaryList-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{filterSummaryList-class} 5 | \alias{filterSummaryList-class} 6 | \alias{filterSummaryList} 7 | \alias{toTable,filterSummaryList-method} 8 | \title{Class "filterSummaryList"} 9 | \arguments{ 10 | \item{object}{An object of class. 11 | \code{\link[flowCore:filterResultList-class]{filterResultList}} which is to 12 | be summarized.} 13 | 14 | \item{\dots}{Further arguments that are passed to the generic.} 15 | } 16 | \value{ 17 | An object of class \code{filterSummaryList}. 18 | } 19 | \description{ 20 | Class and methods to handle summary statistics for from filtering operations 21 | on whole \code{\link[flowCore:flowSet-class]{flowSets}}. 22 | } 23 | \details{ 24 | Calling \code{summary} on a \code{\link{filterResultList}} object prints summary 25 | information on the screen, but also creates objects of class 26 | \code{filterSummaryList} for computational access. 27 | } 28 | \section{Slots}{ 29 | 30 | \describe{ 31 | \item{\code{.Data}}{Object of class \code{"list"}. The class 32 | directly extends \code{list}, and this slot holds the list data.} 33 | }} 34 | 35 | \section{Usage}{ 36 | 37 | summary(object, \dots) 38 | } 39 | 40 | \section{Objects from the Class}{ 41 | 42 | 43 | Objects are created by calling \code{summary} on a 44 | \code{link{filterResultList}} object. The user doesn't have to deal with 45 | manual object instantiation. 46 | } 47 | 48 | \section{Extends}{ 49 | 50 | Class \code{"\linkS4class{list}"}, from \code{.Data} part. 51 | } 52 | 53 | \section{Methods}{ 54 | 55 | \describe{ 56 | 57 | \item{toTable}{\code{signature(x = "filterSummaryList")}: Coerce 58 | object to \code{data.frame}. Additional factors are added to 59 | indicate list items in the original object. } 60 | 61 | } 62 | } 63 | 64 | \examples{ 65 | 66 | library(flowStats) 67 | 68 | ## Loading example data, creating and applying a curv1Filter 69 | data(GvHD) 70 | dat <- GvHD[1:3] 71 | c1f <- curv1Filter(filterId="myCurv1Filter", x=list("FSC-H"), bwFac=2) 72 | fres <- filter(dat, c1f) 73 | 74 | ## creating and showing the summary 75 | summary(fres) 76 | s <- summary(fres) 77 | 78 | ## subsetting 79 | s[[1]] 80 | 81 | ##accessing details 82 | toTable(s) 83 | 84 | 85 | } 86 | \seealso{ 87 | \code{\linkS4class{filterResult}}, \code{\linkS4class{filterResultList}}, 88 | \code{\linkS4class{logicalFilterResult}}, 89 | \code{\linkS4class{multipleFilterResult}}, \code{\linkS4class{flowFrame}} 90 | \code{\linkS4class{filterSummary}} 91 | } 92 | \author{ 93 | Florian Hahne 94 | } 95 | \keyword{classes} 96 | -------------------------------------------------------------------------------- /man/filters-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{filters-class} 5 | \alias{filters-class} 6 | \alias{filters} 7 | \alias{filtersList-class} 8 | \alias{filtersList} 9 | \alias{show,filters-method} 10 | \alias{show,filtersList-method} 11 | \title{Class "filters" and "filtersList"} 12 | \usage{ 13 | filters(x) 14 | 15 | filtersList(x) 16 | } 17 | \arguments{ 18 | \item{x}{A list of \code{filter} or \code{filters} objects.} 19 | } 20 | \value{ 21 | A \code{filters} or \code{filtersList} object from the constructor 22 | } 23 | \description{ 24 | The \code{filters} class is the container for a list of 25 | \code{\link[flowCore:filter-methods]{filter}} objects.\cr\cr 26 | The \code{filtersList} 27 | class is the container for a list of \code{filters} objects. 28 | } 29 | \details{ 30 | The \code{filters} class mainly 31 | exists for displaying multiple filters/gates on one single panel(flowFrame) 32 | of \code{\link[flowViz:xyplot]{xyplot}}. Note that it is different from 33 | \code{\link[flowCore:filterList]{filterList}} class which is to be applied to 34 | a flowSet. In other words, \code{filter} objects of a \code{fliterList} are 35 | to be applied to different flowFrames. However,all of \code{filter} objects 36 | of a \code{filters} object are for one single flowFrame, more specifically for one 37 | pair of projections(parameters).So these filters should share the common 38 | parameters.\cr\cr 39 | And \code{filtersList} is a list of \code{filters} objects, which are to be 40 | applied to a flowSet. 41 | } 42 | \section{Slots}{ 43 | 44 | \describe{ 45 | \item{\code{.Data}}{Object of class 46 | \code{"list"}. The class directly extends \code{list}, and this slot holds 47 | the list data.} 48 | }} 49 | 50 | \section{Extends}{ 51 | 52 | Class \code{"\linkS4class{list}"} 53 | } 54 | 55 | \section{Objects from the Class}{ 56 | 57 | Objects are created from regular lists using the constructors 58 | \code{filters} and \code{filtersList}: 59 | 60 | \code{filters(x)} 61 | 62 | \code{filtersList(x)} 63 | } 64 | 65 | \seealso{ 66 | \code{\link[flowCore:filter-class]{filter}}, 67 | \code{\link[flowCore:filterList-class]{filterList}} 68 | } 69 | \author{ 70 | Mike Jiang 71 | } 72 | \keyword{classes} 73 | -------------------------------------------------------------------------------- /man/flowCore-package.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/flowCore.R 3 | \docType{package} 4 | \name{flowCore-package} 5 | \alias{flowCore-package} 6 | \alias{flowCore} 7 | \title{flowCore: Basic structures for flow cytometry data} 8 | \description{ 9 | Provides S4 data structures and basic infrastructure and functions to deal 10 | with flow cytometry data. 11 | } 12 | \details{ 13 | Define important flow cytometry data classes: 14 | \code{\link[flowCore:flowFrame-class]{flowFrame}}, 15 | \code{\link[flowCore:flowSet-class]{flowSet}} and their accessors. 16 | 17 | Provide important transformation, filter, gating, workflow, and summary 18 | functions for flow cytometry data analysis. 19 | 20 | Most of flow cytometry related Bioconductor packages (such as flowStats, 21 | flowFP, flowQ, flowViz, flowMerge, flowClust) are heavily dependent on this 22 | package. 23 | 24 | \tabular{ll}{ Package: \tab flowCore \cr Type: \tab Package \cr Version: 25 | \tab 1.11.20 \cr Date: \tab 2009-09-16 \cr License: \tab Artistic-2.0\cr } 26 | } 27 | \author{ 28 | Maintainer: Florian Hahne 29 | 30 | Authors: B. Ellis, P. Haaland, F. Hahne, N. Le Meur, N. Gopalakrishnan 31 | } 32 | \keyword{package} 33 | -------------------------------------------------------------------------------- /man/flowSet_to_list.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/flowSet-accessors.R 3 | \name{flowSet_to_list} 4 | \alias{flowSet_to_list} 5 | \title{Convert a flowSet to a list of flowFrames} 6 | \usage{ 7 | flowSet_to_list(fs) 8 | } 9 | \arguments{ 10 | \item{fs}{a flowSet} 11 | } 12 | \value{ 13 | a list of flowFrames 14 | } 15 | \description{ 16 | This is a simple helper function for splitting a \code{\link[flowCore:flowSet-class]{flowSet}} 17 | in to a list of its constituent \code{\link[flowCore:flowFrame-class]{flowFrames}}. 18 | } 19 | -------------------------------------------------------------------------------- /man/fr_append_cols.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/flowFrame-accessors.R 3 | \name{fr_append_cols} 4 | \alias{fr_append_cols} 5 | \title{Append data columns to a flowFrame} 6 | \usage{ 7 | fr_append_cols(fr, cols) 8 | } 9 | \arguments{ 10 | \item{fr}{A \code{\link[flowCore:flowFrame-class]{flowFrame}}.} 11 | 12 | \item{cols}{A numeric matrix containing the new data columns to be added. 13 | Must have unique column names to be used as new channel names.} 14 | } 15 | \value{ 16 | A \code{\linkS4class{flowFrame}} 17 | } 18 | \description{ 19 | Append data columns to a flowFrame 20 | } 21 | \details{ 22 | It is used to add extra data columns to the existing flowFrame. It handles 23 | keywords and parameters properly to ensure the new flowFrame can be written 24 | as a valid FCS through the function \code{write.FCS} . 25 | } 26 | \examples{ 27 | 28 | data(GvHD) 29 | tmp <- GvHD[[1]] 30 | 31 | kf <- kmeansFilter("FSC-H"=c("Pop1","Pop2","Pop3"), filterId="myKmFilter") 32 | fres <- filter(tmp, kf) 33 | cols <- as.integer(fres@subSet) 34 | cols <- matrix(cols, dimnames = list(NULL, "km")) 35 | tmp <- fr_append_cols(tmp, cols) 36 | 37 | tmpfile <- tempfile() 38 | write.FCS(tmp, tmpfile) 39 | 40 | 41 | } 42 | \author{ 43 | Mike Jiang 44 | } 45 | \keyword{IO} 46 | -------------------------------------------------------------------------------- /man/fsApply.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/flowSet-accessors.R 3 | \name{fsApply} 4 | \alias{fsApply} 5 | \alias{fsApply,flowSet,ANY} 6 | \title{Apply a Function over values in a flowSet} 7 | \usage{ 8 | fsApply(x, FUN, \dots, simplify=TRUE, use.exprs=FALSE) 9 | } 10 | \arguments{ 11 | \item{x}{\code{\link[flowCore:flowSet-class]{flowSet}} to be used} 12 | 13 | \item{FUN}{the function to be applied to each element of \code{x}} 14 | 15 | \item{\dots}{optional arguments to \code{FUN}.} 16 | 17 | \item{simplify}{logical (default: TRUE); if all true and all objects are 18 | \code{flowFrame} objects, a \code{flowSet} object will be constructed. If 19 | all of the values are of the same type there will be an attempt to construct 20 | a vector or matrix of the appropriate type (e.g. all numeric results will 21 | return a matrix).} 22 | 23 | \item{use.exprs}{logical (default: FALSE); should the \code{FUN} be applied 24 | on the \code{\link[flowCore:flowFrame-class]{flowFrame}} object or the 25 | expression values.} 26 | } 27 | \description{ 28 | \code{fsApply}, like many of the \code{apply}-style functions in R, acts as an 29 | iterator for \code{flowSet} objects, allowing the application of a function 30 | to either the \code{flowFrame} or the data matrix itself. The output can then 31 | be reconstructed as either a \code{flowSet}, a list, or a matrix depending on 32 | options and the type of objects returned. 33 | } 34 | \examples{ 35 | 36 | fcs.loc <- system.file("extdata",package="flowCore") 37 | file.location <- paste(fcs.loc, dir(fcs.loc), sep="/") 38 | samp <- read.flowSet(file.location[1:3]) 39 | 40 | #Get summary information about each sample. 41 | fsApply(samp,summary) 42 | 43 | #Obtain the median of each parameter in each frame. 44 | fsApply(samp,each_col,median) 45 | 46 | 47 | } 48 | \seealso{ 49 | \code{\link{apply}}, \code{\link{sapply}} 50 | } 51 | \author{ 52 | B. Ellis 53 | } 54 | \keyword{iteration} 55 | -------------------------------------------------------------------------------- /man/getChannelMarker.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utils.R 3 | \name{getChannelMarker} 4 | \alias{getChannelMarker} 5 | \title{get channel and marker information from a \code{flowFrame} that matches to the given keyword} 6 | \usage{ 7 | getChannelMarker(frm, name, ...) 8 | } 9 | \arguments{ 10 | \item{frm}{\code{flowFrame} object} 11 | 12 | \item{name}{\code{character} the keyword to match} 13 | 14 | \item{...}{other arguments: not used.} 15 | } 16 | \value{ 17 | an one-row \code{data.frame} that contains "name"(i.e. channel) and "desc"(i.e. stained marker) columns. 18 | } 19 | \description{ 20 | This function tries best to guess the flow parameter based on the keyword supplied by \code{name} 21 | It first does a complete word match(case insensitive) between \code{name} and flow channels and markers. 22 | If there are duplcated matches, throw the error. If no matches, it will try the partial match. 23 | } 24 | -------------------------------------------------------------------------------- /man/getIndexSort.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/flowFrame-accessors.R 3 | \docType{methods} 4 | \name{getIndexSort} 5 | \alias{getIndexSort} 6 | \alias{getIndexSort-methods} 7 | \alias{getIndexSort,flowFrame-method} 8 | \title{Extract Index Sorted Data from an FCS File} 9 | \value{ 10 | Matrix of fluorescence intensities and sort indices for plate location. 11 | When no index sorting data is available, invisibly returns 0. Test for 0 to 12 | check success. 13 | } 14 | \description{ 15 | Retrieve a data frame of index sorted data and sort indices from an FCS 16 | file. 17 | } 18 | \details{ 19 | The input FCS file should already be compensated. Index sorting permits 20 | association of cell-level fluorescence intensities with downstream data 21 | collection on the sorted cells. Cells are sorted into a plate with 22 | \code{X,Y} coordinates, and those coordinates are stored in the FCS file. 23 | 24 | This function will extract the data frame of flow data and the \code{X,Y} 25 | coordinates for the cell-level data, which can be written to a text file, or 26 | concatenated with sample-level information and analyzed in R. The 27 | coordinates are names 'XLoc','YLoc', and a 'name' column is also prepended 28 | with the FCS file name. 29 | } 30 | \section{Methods}{ 31 | 32 | 33 | \describe{ 34 | 35 | \item{getIndexSort(x = "flowFrame")}{Return a matrix of fluorescence intensities and 36 | indices into the sorting plate for each cell.} 37 | 38 | } 39 | } 40 | 41 | \examples{ 42 | 43 | samp <- read.FCS(system.file("extdata","0877408774.B08", package="flowCore")) 44 | # This will return a message that no index sorting data is available 45 | getIndexSort(samp) 46 | 47 | 48 | } 49 | \author{ 50 | G. Finak 51 | } 52 | \keyword{methods} 53 | -------------------------------------------------------------------------------- /man/identifier-methods.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/identifier-methods.R 3 | \docType{methods} 4 | \name{identifier-methods} 5 | \alias{identifier-methods} 6 | \alias{identifier} 7 | \alias{identifier,filter-method} 8 | \alias{identifier,transform-method} 9 | \alias{identifier,filterReference-method} 10 | \alias{identifier,NULL-method} 11 | \alias{identifier,filterResult-method} 12 | \alias{identifier,flowFrame-method} 13 | \alias{identifier<-} 14 | \alias{identifier<-,flowFrame-method} 15 | \alias{identifier<-,flowFrame,ANY-method} 16 | \title{Retrieve the GUID of flowCore objects} 17 | \usage{ 18 | identifier(object) 19 | } 20 | \arguments{ 21 | \item{object}{Object of class \code{\linkS4class{flowFrame}}, 22 | \code{\linkS4class{filter}} or \code{\linkS4class{filterResult}}.} 23 | } 24 | \value{ 25 | Character vector representing the GUID or the name of the file. 26 | } 27 | \description{ 28 | Retrieve the GUID (globally unique identifier) of a \code{\link{flowFrame}} 29 | that was generated by the cytometer or the identifier of a 30 | \code{\linkS4class{filter}} or \code{\linkS4class{filterResult}} given by 31 | the analyst. 32 | } 33 | \details{ 34 | GUID or Globally Unique Identifier is a pseudo-random number used in 35 | software applications. While each generated GUID is not guaranteed to be 36 | unique, the total number of unique keys (2\^128) is so large that the 37 | probability of the same number being generated twice is very small. 38 | 39 | Note that if no GUID has been recorded along with the FCS file, the name of 40 | the file is returned. 41 | } 42 | \section{Methods}{ 43 | 44 | 45 | \describe{ 46 | 47 | \item{identifier(object = "filter")}{Return identifier of a \code{\linkS4class{filter}} 48 | object.} 49 | 50 | \item{identifier(object = "filterReference")}{Return identifier of a 51 | \code{\linkS4class{filterReference}} object.} 52 | 53 | \item{identifier(object = "filterResult")}{Return identifier of a 54 | \code{\linkS4class{filterResult}} object.} 55 | 56 | \item{identifier(object = "transform")}{Return identifier of a 57 | \code{\linkS4class{transform}} object.} 58 | 59 | \item{identifier(object = "flowFrame")}{Return GUID from the \code{description} slot of 60 | a \code{\linkS4class{flowFrame}} object or, alternatively, the name of the 61 | input \acronym{FCS} file in case none can be found. For 62 | \code{\linkS4class{flowFrame}} objects there also exists a replacement 63 | method.} 64 | 65 | } 66 | } 67 | 68 | \examples{ 69 | 70 | samp <- read.FCS(system.file("extdata","0877408774.B08", package="flowCore")) 71 | identifier(samp) 72 | 73 | 74 | } 75 | \author{ 76 | N. LeMeur 77 | } 78 | \keyword{methods} 79 | -------------------------------------------------------------------------------- /man/intersectFilter-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{intersectFilter-class} 5 | \alias{intersectFilter-class} 6 | \alias{intersectFilter} 7 | \alias{show,intersectFilter-method} 8 | \title{Class intersectFilter} 9 | \description{ 10 | This class represents the intersection of two filters, which is itself a filter 11 | that can be incorporated in to further set operations. \code{intersectFilter}s 12 | are constructed using the binary set operator \code{"&"} with operands consisting 13 | of a single filter or list of filters. 14 | } 15 | \section{Slots}{ 16 | 17 | \describe{ 18 | \item{\code{filters}}{Object of class \code{"list"}, containing the component filters.} 19 | 20 | \item{\code{filterId}}{Object of class \code{"character"} 21 | referencing the filter applied.} 22 | }} 23 | 24 | \section{Extends}{ 25 | 26 | 27 | Class \code{"\linkS4class{filter}"}, directly. 28 | } 29 | 30 | \seealso{ 31 | \code{\link[flowCore:filter-methods]{filter}}, \code{\linkS4class{setOperationFilter}} 32 | 33 | Other setOperationFilter classes: 34 | \code{\link{complementFilter-class}}, 35 | \code{\link{setOperationFilter-class}}, 36 | \code{\link{subsetFilter-class}}, 37 | \code{\link{unionFilter-class}} 38 | } 39 | \author{ 40 | B. Ellis 41 | } 42 | \concept{setOperationFilter classes} 43 | \keyword{classes} 44 | -------------------------------------------------------------------------------- /man/inverseLogicleTransform.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \name{inverseLogicleTransform} 4 | \alias{inverseLogicleTransform} 5 | \title{Computes the inverse of the transform defined by the 'logicleTransform' 6 | function or the transformList generated by 'estimateLogicle' function} 7 | \usage{ 8 | inverseLogicleTransform(trans,transformationId,...) 9 | } 10 | \arguments{ 11 | \item{trans}{An object of class 'transform' created using the 12 | 'logicleTransform' function or class 'transformList' created by 13 | 'estimateLogicle'. The parameters w, t, m, a for calculating the inverse 14 | are obtained from the 'trans' input passed to the 'inverseLogicleTransform' 15 | function.} 16 | 17 | \item{transformationId}{A name to assigned to the inverse transformation. 18 | Used by the transform routines.} 19 | 20 | \item{...}{not used.} 21 | } 22 | \description{ 23 | inverseLogicleTransform can be use to compute the inverse of the Logicle 24 | transformation. The parameters w, t, m, a for calculating the inverse are 25 | obtained from the 'trans' input passed to the 'inverseLogicleTransform' 26 | function. (The inverseLogicleTransform method makes use of the C++ 27 | implementation of the inverse logicle transform contributed by Wayne Moore 28 | et al.) 29 | } 30 | \examples{ 31 | 32 | data(GvHD) 33 | samp <- GvHD[[1]] 34 | 35 | #########inverse the transform object############### 36 | logicle <- logicleTransform(t = 10000, w = 0.5, m = 4.5 , a =0 ,"logicle") 37 | ## transform FL1-H parameter using logicle transformation 38 | after <- transform(samp, transformList('FL1-H', logicle)) 39 | 40 | ## Inverse transform the logicle transformed data to retrieve the original data 41 | invLogicle <- inverseLogicleTransform(trans = logicle) 42 | before <- transform (after, transformList('FL1-H', invLogicle)) 43 | 44 | #########inverse the transformList object############### 45 | translist <- estimateLogicle(samp, c("FL1-H", "FL2-H")) 46 | after <- transform(samp, translist) 47 | ## Inverse 48 | invLogicle <- inverseLogicleTransform(translist) 49 | before <- transform (after, invLogicle) 50 | 51 | } 52 | \references{ 53 | Parks D.R., Roederer M., Moore W.A.(2006) A new "logicle" 54 | display method avoids deceptive effects of logarithmic scaling for low 55 | signals and compensated data. CytometryA, 96(6):541-51. 56 | } 57 | \seealso{ 58 | \code{\link[flowCore]{logicleTransform}} 59 | 60 | Other Transform functions: 61 | \code{\link{arcsinhTransform}()}, 62 | \code{\link{biexponentialTransform}()}, 63 | \code{\link{linearTransform}()}, 64 | \code{\link{lnTransform}()}, 65 | \code{\link{logTransform}()}, 66 | \code{\link{logicleTransform}()}, 67 | \code{\link{quadraticTransform}()}, 68 | \code{\link{scaleTransform}()}, 69 | \code{\link{splitScaleTransform}()}, 70 | \code{\link{truncateTransform}()} 71 | } 72 | \author{ 73 | Wayne Moore, N. Gopalakrishnan 74 | } 75 | \concept{Transform functions} 76 | \keyword{methods} 77 | -------------------------------------------------------------------------------- /man/linearTransform.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \name{linearTransform} 4 | \alias{linearTransform} 5 | \title{Create the definition of a linear transformation function to be applied on a 6 | data set} 7 | \usage{ 8 | linearTransform(transformationId="defaultLinearTransform", a = 1, b = 0) 9 | } 10 | \arguments{ 11 | \item{transformationId}{character string to identify the transformation} 12 | 13 | \item{a}{double that corresponds to the multiplicative factor in the 14 | equation} 15 | 16 | \item{b}{double that corresponds to the additive factor in the equation} 17 | } 18 | \value{ 19 | Returns an object of class \code{transform}. 20 | } 21 | \description{ 22 | Create the definition of the linear Transformation that will be applied on 23 | some parameter via the \code{transform} method. The definition of this 24 | function is currently x <- a*x+b 25 | } 26 | \examples{ 27 | 28 | samp <- read.FCS(system.file("extdata", 29 | "0877408774.B08", package="flowCore")) 30 | linearTrans <- linearTransform(transformationId="Linear-transformation", a=2, b=0) 31 | dataTransform <- transform(samp, transformList('FSC-H' ,linearTrans)) 32 | 33 | 34 | } 35 | \seealso{ 36 | \code{\link{transform-class}}, \code{\link{transform}} 37 | 38 | Other Transform functions: 39 | \code{\link{arcsinhTransform}()}, 40 | \code{\link{biexponentialTransform}()}, 41 | \code{\link{inverseLogicleTransform}()}, 42 | \code{\link{lnTransform}()}, 43 | \code{\link{logTransform}()}, 44 | \code{\link{logicleTransform}()}, 45 | \code{\link{quadraticTransform}()}, 46 | \code{\link{scaleTransform}()}, 47 | \code{\link{splitScaleTransform}()}, 48 | \code{\link{truncateTransform}()} 49 | } 50 | \author{ 51 | N. LeMeur 52 | } 53 | \concept{Transform functions} 54 | \keyword{methods} 55 | -------------------------------------------------------------------------------- /man/lnTransform.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \name{lnTransform} 4 | \alias{lnTransform} 5 | \title{Create the definition of a ln transformation function (natural logarthim) to 6 | be applied on a data set} 7 | \usage{ 8 | lnTransform(transformationId="defaultLnTransform", r=1, d=1) 9 | } 10 | \arguments{ 11 | \item{transformationId}{character string to identify the transformation} 12 | 13 | \item{r}{positive double that corresponds to a scale factor.} 14 | 15 | \item{d}{positive double that corresponds to a scale factor} 16 | } 17 | \value{ 18 | Returns an object of class \code{transform}. 19 | } 20 | \description{ 21 | Create the definition of the ln Transformation that will be applied on some 22 | parameter via the \code{transform} method. The definition of this function 23 | is currently x<-log(x)*(r/d). The transformation would normally be used to 24 | convert to a linear valued parameter to the natural logarithm scale. 25 | Typically r and d are both equal to 1.0. Both must be positive. 26 | } 27 | \examples{ 28 | 29 | data(GvHD) 30 | lnTrans <- lnTransform(transformationId="ln-transformation", r=1, d=1) 31 | ln1 <- transform(GvHD, transformList('FSC-H', lnTrans)) 32 | 33 | opar = par(mfcol=c(2, 1)) 34 | plot(density(exprs(GvHD[[1]])[ ,1]), main="Original") 35 | plot(density(exprs(ln1[[1]])[ ,1]), main="Ln Transform") 36 | 37 | 38 | } 39 | \seealso{ 40 | \code{\link{transform-class}}, \code{\link{transform}} 41 | 42 | Other Transform functions: 43 | \code{\link{arcsinhTransform}()}, 44 | \code{\link{biexponentialTransform}()}, 45 | \code{\link{inverseLogicleTransform}()}, 46 | \code{\link{linearTransform}()}, 47 | \code{\link{logTransform}()}, 48 | \code{\link{logicleTransform}()}, 49 | \code{\link{quadraticTransform}()}, 50 | \code{\link{scaleTransform}()}, 51 | \code{\link{splitScaleTransform}()}, 52 | \code{\link{truncateTransform}()} 53 | } 54 | \author{ 55 | B. Ellis and N. LeMeur 56 | } 57 | \concept{Transform functions} 58 | \keyword{methods} 59 | -------------------------------------------------------------------------------- /man/logTransform.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \name{logTransform} 4 | \alias{logTransform} 5 | \title{Create the definition of a log transformation function (base specified by 6 | user) to be applied on a data set} 7 | \usage{ 8 | logTransform(transformationId="defaultLogTransform", logbase=10, r=1, d=1) 9 | } 10 | \arguments{ 11 | \item{transformationId}{character string to identify the transformation} 12 | 13 | \item{logbase}{positive double that corresponds to the base of the 14 | logarithm.} 15 | 16 | \item{r}{positive double that corresponds to a scale factor.} 17 | 18 | \item{d}{positive double that corresponds to a scale factor} 19 | } 20 | \value{ 21 | Returns an object of class \code{transform}. 22 | } 23 | \description{ 24 | Create the definition of the log Transformation that will be applied on some 25 | parameter via the \code{transform} method. The definition of this function 26 | is currently x<-log(x,logbase)*(r/d). The transformation would normally be 27 | used to convert to a linear valued parameter to the natural logarithm scale. 28 | Typically r and d are both equal to 1.0. Both must be positive. logbase = 29 | 10 corresponds to base 10 logarithm. 30 | } 31 | \examples{ 32 | 33 | samp <- read.FCS(system.file("extdata", 34 | "0877408774.B08", package="flowCore")) 35 | logTrans <- logTransform(transformationId="log10-transformation", logbase=10, r=1, d=1) 36 | trans <- transformList('FSC-H', logTrans) 37 | dataTransform <- transform(samp, trans) 38 | 39 | } 40 | \seealso{ 41 | \code{\link{transform-class}}, \code{\link{transform}} 42 | 43 | Other Transform functions: 44 | \code{\link{arcsinhTransform}()}, 45 | \code{\link{biexponentialTransform}()}, 46 | \code{\link{inverseLogicleTransform}()}, 47 | \code{\link{linearTransform}()}, 48 | \code{\link{lnTransform}()}, 49 | \code{\link{logicleTransform}()}, 50 | \code{\link{quadraticTransform}()}, 51 | \code{\link{scaleTransform}()}, 52 | \code{\link{splitScaleTransform}()}, 53 | \code{\link{truncateTransform}()} 54 | } 55 | \author{ 56 | B. Ellis, N. LeMeur 57 | } 58 | \concept{Transform functions} 59 | \keyword{methods} 60 | -------------------------------------------------------------------------------- /man/logarithm-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{logarithm-class} 5 | \alias{logarithm-class} 6 | \alias{logarithm} 7 | \alias{eval,logarithm,missing-method} 8 | \title{Class "logarithm"} 9 | \description{ 10 | Logartithmic transform class, which represents a transformation defined by 11 | the function 12 | } 13 | \details{ 14 | \deqn{f(parameter,a,b)= ln(a*prarameter)*b ~~~~a*parameter>0} \deqn{0 15 | ~~~~a*parameter<=0} 16 | } 17 | \section{Slots}{ 18 | 19 | \describe{ 20 | \item{\code{.Data}}{Object of class \code{"function"}} 21 | 22 | \item{\code{a}}{Object of class \code{"numeric"} -- non-zero multiplicative constant.} 23 | 24 | \item{\code{b}}{Object of class \code{"numeric"} -- non-zero multiplicative constant.} 25 | 26 | \item{\code{parameters}}{Object of class \code{"transformation"} -- flow parameters to be transformed.} 27 | 28 | \item{\code{transformationId}}{Object of class \code{"character"} -- unique ID to reference the transformation.} 29 | }} 30 | 31 | \note{ 32 | The logarithm transformation object can be evaluated using the eval 33 | method by passing the data frame as an argument.The transformed parameters 34 | are returned as a matrix with a single column. (See example below) 35 | } 36 | \section{Objects from the Class}{ 37 | Objects can be created by calls to the 38 | constructor \code{logarithm(parameters,a,b,transformationId)} 39 | } 40 | 41 | \section{Extends}{ 42 | 43 | Class \code{"\linkS4class{singleParameterTransform}"}, directly. 44 | 45 | Class \code{"\linkS4class{transform}"}, by class "singleParameterTransform", distance 2. 46 | 47 | Class \code{"\linkS4class{transformation}"}, by class "singleParameterTransform", distance 3. 48 | 49 | Class \code{"\linkS4class{characterOrTransformation}"}, by class "singleParameterTransform", distance 4. 50 | } 51 | 52 | \examples{ 53 | 54 | dat <- read.FCS(system.file("extdata","0877408774.B08", 55 | package="flowCore")) 56 | lg1<-logarithm(parameters="FSC-H",a=2,b=1,transformationId="lg1") 57 | transOut<-eval(lg1)(exprs(dat)) 58 | 59 | } 60 | \references{ 61 | Gating-ML Candidate Recommendation for Gating Description in 62 | Flow Cytometry V 1.5 63 | } 64 | \seealso{ 65 | exponential, quadratic 66 | 67 | Other mathematical transform classes: 68 | \code{\link{EHtrans-class}}, 69 | \code{\link{asinht-class}}, 70 | \code{\link{asinhtGml2-class}}, 71 | \code{\link{dg1polynomial-class}}, 72 | \code{\link{exponential-class}}, 73 | \code{\link{hyperlog-class}}, 74 | \code{\link{hyperlogtGml2-class}}, 75 | \code{\link{invsplitscale-class}}, 76 | \code{\link{lintGml2-class}}, 77 | \code{\link{logicletGml2-class}}, 78 | \code{\link{logtGml2-class}}, 79 | \code{\link{quadratic-class}}, 80 | \code{\link{ratio-class}}, 81 | \code{\link{ratiotGml2-class}}, 82 | \code{\link{sinht-class}}, 83 | \code{\link{splitscale-class}}, 84 | \code{\link{squareroot-class}}, 85 | \code{\link{unitytransform-class}} 86 | } 87 | \author{ 88 | Gopalakrishnan N, F.Hahne 89 | } 90 | \concept{mathematical transform classes} 91 | \keyword{classes} 92 | -------------------------------------------------------------------------------- /man/logicalFilterResult-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{logicalFilterResult-class} 5 | \alias{logicalFilterResult-class} 6 | \alias{logicalFilterResult} 7 | \alias{summary,logicalFilterResult-method} 8 | \alias{names,logicalFilterResult-method} 9 | \alias{length,logicalFilterResult-method} 10 | \alias{[[,logicalFilterResult,ANY-method} 11 | \title{Class "logicalFilterResult"} 12 | \description{ 13 | Container to store the result of applying a \code{filter} on a 14 | \code{flowFrame} object 15 | } 16 | \section{Slots}{ 17 | 18 | \describe{ 19 | \item{\code{subSet}}{Object of class \code{"numeric"}, which is a logical 20 | vector indicating the population membership of the data in the gated 21 | flowFrame.} 22 | 23 | \item{\code{frameId}}{Object of class \code{"character"} referencing the 24 | \code{flowFrame} object filtered. Used for sanity checking.} 25 | 26 | \item{\code{filterDetails}}{Object of class \code{"list"} describing the filter 27 | applied.} 28 | 29 | \item{\code{filterId}}{Object of class \code{"character"} referencing the filter 30 | applied.} 31 | }} 32 | 33 | \section{Extends}{ 34 | 35 | 36 | Class \code{"\linkS4class{filterResult}"}, directly. 37 | Class \code{"\linkS4class{filter}"}, by class "filterResult", distance 2. 38 | } 39 | 40 | \examples{ 41 | 42 | showClass("logicalFilterResult") 43 | 44 | } 45 | \seealso{ 46 | \code{\link[flowCore:filter-methods]{filter}} 47 | } 48 | \author{ 49 | B. Ellis 50 | } 51 | \keyword{classes} 52 | -------------------------------------------------------------------------------- /man/manyFilterResult-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{manyFilterResult-class} 5 | \alias{manyFilterResult-class} 6 | \alias{length,manyFilterResult-method} 7 | \alias{names,manyFilterResult-method} 8 | \alias{[[,manyFilterResult-method} 9 | \alias{[[,manyFilterResult,ANY-method} 10 | \alias{summary,manyFilterResult-method} 11 | \alias{show,manyFilterResult-method} 12 | \alias{as.data.frame.manyFilterResult} 13 | \alias{manyFilterResult} 14 | \alias{parameters,manyFilterResult-method} 15 | \title{Class "manyFilterResult"} 16 | \description{ 17 | The result of a several related, but possibly overlapping filter results. 18 | The usual creator of this object will usually be a \code{\link{filter}} 19 | operation on a \code{\link{flowFrame}} object. 20 | } 21 | \section{Slots}{ 22 | 23 | \describe{ 24 | \item{\code{subSet}}{Object of class \code{"matrix"}.} 25 | 26 | \item{\code{frameId}}{Object of class \code{"character"} referencing the 27 | \code{flowFrame} object filtered. Used for sanity checking.} 28 | 29 | \item{\code{filterDetails}}{Object of class \code{"list"} describing the 30 | filter applied.} 31 | 32 | \item{\code{filterId}}{Object of class \code{"character"} referencing the 33 | filter applied.} 34 | 35 | \item{\code{dependency}}{Any dependencies between the filters. Currently 36 | not used.} 37 | }} 38 | 39 | \section{Extends}{ 40 | 41 | 42 | Class \code{"\linkS4class{filterResult}"}, directly. 43 | Class \code{"\linkS4class{filter}"}, by class "filterResult", distance 2. 44 | } 45 | 46 | \section{Methods}{ 47 | 48 | 49 | \describe{ 50 | \item{[, [[}{subsetting. If \code{x} is \code{manyFilterResult}, 51 | then \code{x[[i]]} a \code{filterResult} object. The semantics is 52 | similar to the behavior of the subsetting operators for lists.} 53 | \item{length}{number of \code{filterResult} objects in the set.} 54 | \item{names}{names of the \code{filterResult} objects in the set.} 55 | \item{summary}{summary \code{filterResult} objects in the set.} 56 | } 57 | } 58 | 59 | \examples{ 60 | 61 | showClass("manyFilterResult") 62 | 63 | } 64 | \seealso{ 65 | \code{\link[flowCore:filterResult-class]{filterResult}} 66 | } 67 | \author{ 68 | B. Ellis 69 | } 70 | \keyword{classes} 71 | -------------------------------------------------------------------------------- /man/markernames.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/flowFrame-accessors.R, R/flowSet-accessors.R 3 | \name{markernames} 4 | \alias{markernames} 5 | \alias{markernames,flowFrame-method} 6 | \alias{markernames<-} 7 | \alias{markernames<-,flowFrame-method} 8 | \alias{markernames,flowSet-method} 9 | \alias{markernames<-,flowSet-method} 10 | \title{get or update the marker names} 11 | \usage{ 12 | markernames(object, ...) 13 | 14 | \S4method{markernames}{flowFrame}(object) 15 | 16 | markernames(object) <- value 17 | 18 | \S4method{markernames}{flowFrame}(object) <- value 19 | 20 | \S4method{markernames}{flowSet}(object) 21 | 22 | \S4method{markernames}{flowSet}(object) <- value 23 | } 24 | \arguments{ 25 | \item{object}{flowFrame or flowSet} 26 | 27 | \item{...}{not used} 28 | 29 | \item{value}{a named list or character vector. the names corresponds to the name(channel) and actual values are the desc(marker).} 30 | } 31 | \value{ 32 | marker names as a character vector. The marker names for FSC,SSC and Time channels are automatically excluded in the returned value. 33 | When object is a flowSet and the marker names are not consistent across flowFrames, it returns a list of unique marker sets. 34 | } 35 | \description{ 36 | marker names corresponds to the 'desc' column of the phenoData of the flowFrame. 37 | } 38 | \details{ 39 | When extract marker names from a flowSet, it throws the warning if the marker names are not all the same across samples. 40 | } 41 | \examples{ 42 | 43 | data(GvHD) 44 | fr <- GvHD[[1]] 45 | markernames(fr) 46 | 47 | chnls <- c("FL1-H", "FL3-H") 48 | markers <- c("CD15", "CD14") 49 | names(markers) <- chnls 50 | markernames(fr) <- markers 51 | markernames(fr) 52 | 53 | fs <- GvHD[1:3] 54 | markernames(fs) 55 | } 56 | -------------------------------------------------------------------------------- /man/multipleFilterResult-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{multipleFilterResult-class} 5 | \alias{multipleFilterResult-class} 6 | \alias{multipleFilterResult} 7 | \alias{length,multipleFilterResult-method} 8 | \alias{names,multipleFilterResult-method} 9 | \alias{names<-,multipleFilterResult-method} 10 | \alias{names<-,multipleFilterResult,ANY-method} 11 | \alias{[[,multipleFilterResult-method} 12 | \alias{[[,multipleFilterResult,ANY-method} 13 | \alias{[,multipleFilterResult,ANY-method} 14 | \alias{summary,multipleFilterResult-method} 15 | \alias{show,multipleFilterResult-method} 16 | \title{Class "multipleFilterResult"} 17 | \description{ 18 | Container to store the result of applying \code{filter} on set of 19 | \code{flowFrame} objects 20 | } 21 | \section{Slots}{ 22 | 23 | \describe{ 24 | \item{\code{subSet}}{Object of class \code{"factor"} indicating the population 25 | membership of the data in the gated flowFrame.} 26 | 27 | \item{\code{frameId}}{Object of class \code{"character"} 28 | referencing the \code{flowFrame} object filtered. Used for 29 | sanity checking.} 30 | 31 | \item{\code{filterDetails}}{Object of class \code{"list"} 32 | describing the filter applied.} 33 | 34 | \item{\code{filterId}}{Object of class \code{"character"} 35 | referencing the filter applied.} 36 | }} 37 | 38 | \section{Extends}{ 39 | 40 | 41 | Class \code{"\linkS4class{filterResult}"}, directly. 42 | Class \code{"\linkS4class{filter}"}, by class "filterResult", distance 2. 43 | } 44 | 45 | \section{Methods}{ 46 | 47 | 48 | \describe{ 49 | \item{[, [[}{subsetting. If \code{x} is \code{multipleFilterResult}, 50 | then \code{x[[i]]} a \code{FilterResult} object. The semantics is 51 | similar to the behavior of the subsetting operators for lists.} 52 | \item{length}{number of \code{FilterResult} objects in the set.} 53 | \item{names}{names of the \code{FilterResult} objects in the set.} 54 | \item{summary}{summary \code{FilterResult} objects in the set.} 55 | } 56 | } 57 | 58 | \examples{ 59 | 60 | showClass("multipleFilterResult") 61 | 62 | } 63 | \seealso{ 64 | \code{\link[flowCore:filterResult-class]{filterResult}} 65 | } 66 | \author{ 67 | B. Ellis 68 | } 69 | \keyword{classes} 70 | -------------------------------------------------------------------------------- /man/nullParameter-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{nullParameter-class} 5 | \alias{nullParameter-class} 6 | \alias{nullParameter} 7 | \title{Class "nullParameter"} 8 | \description{ 9 | A class used internally for coercing transforms to characters for a return 10 | value when a coercion cannot be performed. The user should never need to 11 | interact with this class. 12 | } 13 | \section{Objects from the Class}{ 14 | Objects will be created internally whenever 15 | necessary and this should not be of any concern to the user. 16 | } 17 | 18 | \keyword{classes} 19 | -------------------------------------------------------------------------------- /man/parameterFilter-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{parameterFilter-class} 5 | \alias{parameterFilter-class} 6 | \alias{initialize,parameterFilter-method} 7 | \title{Class "parameterFilter"} 8 | \description{ 9 | A concrete filter that acts on a set of parameters. 10 | } 11 | \section{Slots}{ 12 | 13 | \describe{ 14 | \item{\code{parameters}}{The names of the parameters employed by this filter.} 15 | 16 | \item{\code{filterId}}{The filter identifier.} 17 | }} 18 | 19 | \section{Objects from the Class}{ 20 | \code{parameterFilter} objects are never 21 | created directly. This class serves as an inheritance point for filters that 22 | depends on particular parameters. 23 | } 24 | 25 | \section{Extends}{ 26 | 27 | Class \code{"\linkS4class{concreteFilter}"}, directly. 28 | Class \code{"\linkS4class{filter}"}, by class "concreteFilter", distance 2. 29 | } 30 | 31 | \author{ 32 | B. Ellis 33 | } 34 | \keyword{classes} 35 | -------------------------------------------------------------------------------- /man/parameterTransform-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{parameterTransform-class} 5 | \alias{parameterTransform-class} 6 | \alias{parameterTransform} 7 | \title{Class "parameterTransform"} 8 | \description{ 9 | Link a transformation to particular flow parameters 10 | } 11 | \section{Slots}{ 12 | 13 | \describe{ 14 | \item{\code{.Data}}{Object of class \code{"function"}, the 15 | transformation function.} 16 | 17 | \item{\code{parameters}}{Object of class \code{"character"} The 18 | parameters the transformation is applied to.} 19 | 20 | \item{\code{transformationId}}{Object of class 21 | \code{"character"}. The identifier for the object.} 22 | }} 23 | 24 | \section{Objects from the Class}{ 25 | 26 | 27 | Objects are created by using the \code{\%on\%} operator and are usually not 28 | directly instantiated by the user. 29 | } 30 | 31 | \section{Extends}{ 32 | 33 | 34 | Class \code{"\linkS4class{transform}"}, directly. 35 | Class \code{"\linkS4class{function}"}, by class "transform", distance 2. 36 | } 37 | 38 | \section{Methods}{ 39 | 40 | 41 | \describe{ 42 | \item{\%on\%}{\code{signature(e1 = "filter", e2 = 43 | "parameterTransform")}: Apply the transformation. } 44 | \item{\%on\%}{\code{signature(e1 = "parameterTransform", e2 = 45 | "flowFrame")}: see above } 46 | \item{parameters}{\code{signature(object = "parameterTransform")}: 47 | Accessor to the parameters slot } 48 | } 49 | } 50 | 51 | \author{ 52 | Byron Ellis 53 | } 54 | \keyword{classes} 55 | -------------------------------------------------------------------------------- /man/parameters-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{parameters-class} 5 | \alias{parameters-class} 6 | \title{Class "parameters"} 7 | \description{ 8 | A representation of flow parameters that allows for referencing. 9 | } 10 | \section{Slots}{ 11 | 12 | \describe{ 13 | \item{\code{.Data}}{A list of the individual parameters.} 14 | }} 15 | 16 | \section{Objects from the Class}{ 17 | Objects will be created internally whenever 18 | necessary and this should not be of any concern to the user. 19 | } 20 | 21 | \section{Extends}{ 22 | 23 | Class \code{"\linkS4class{list}"}, from data part. 24 | Class \code{"\linkS4class{vector}"}, by class "list", distance 2. 25 | } 26 | 27 | \author{ 28 | Nishant Gopalakrishnan 29 | } 30 | \keyword{classes} 31 | -------------------------------------------------------------------------------- /man/polytopeGate-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{polytopeGate-class} 5 | \alias{polytopeGate-class} 6 | \alias{polytopeGate} 7 | \alias{show,polytopeGate-method} 8 | \title{Define filter boundaries} 9 | \usage{ 10 | polytopeGate(\dots, .gate, b, filterId="defaultPolytopeGate") 11 | } 12 | \arguments{ 13 | \item{filterId}{An optional parameter that sets the \code{filterId} of this 14 | gate.} 15 | 16 | \item{.gate}{A definition of the gate. This can be either a list, vector or 17 | matrix, described below.} 18 | 19 | \item{b}{Need documentation} 20 | 21 | \item{\dots}{You can also directly describe a gate without wrapping it in a 22 | list or matrix, as described below.} 23 | } 24 | \value{ 25 | Returns a \code{\link{rectangleGate}} or \code{\link{polygonGate}} object 26 | for use in filtering \code{\link{flowFrame}}s or other flow cytometry 27 | objects. 28 | } 29 | \description{ 30 | Convenience methods to facilitate the construction of \code{\link{filter}} 31 | objects 32 | } 33 | \details{ 34 | These functions are designed to be useful in both direct and programmatic 35 | usage. 36 | 37 | For rectangle gate in n dimensions, if n=1 the gate correspond to a range 38 | gate. If n=2, the gate is a rectangle gate. To use this function 39 | programmatically, you may either construct a list or you may construct a 40 | matrix with \code{n} columns and \code{2} rows. The first row corresponds 41 | to the minimal value for each parameter while the second row corresponds to 42 | the maximal value for each parameter. The names of the parameters are taken 43 | from the column names as in the third example. 44 | 45 | Rectangle gate objects can also be multiplied together using the \code{*} 46 | operator, provided that both gate have orthogonal axes. 47 | 48 | For polygon gate, the boundaries are specified as vertices in 2 dimensions, 49 | for polytope gate objects as vertices in n dimensions. 50 | 51 | Polytope gate objects will represent the convex polytope determined 52 | by the vertices and parameter b which together specify the polytope as 53 | an intersection of half-spaces represented as a system of linear inequalities, 54 | \eqn{Ax\le b} 55 | 56 | For quadrant gates, the boundaries are specified as a named list or vector 57 | of length two. 58 | } 59 | \seealso{ 60 | \code{\link{flowFrame}}, \code{\link{filter}} 61 | 62 | Other Gate classes: 63 | \code{\link{ellipsoidGate-class}}, 64 | \code{\link{polygonGate-class}}, 65 | \code{\link{quadGate-class}}, 66 | \code{\link{rectangleGate-class}} 67 | } 68 | \author{ 69 | F.Hahne, B. Ellis N. Le Meur 70 | } 71 | \concept{Gate classes} 72 | \keyword{methods} 73 | -------------------------------------------------------------------------------- /man/quadratic-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{quadratic-class} 5 | \alias{quadratic-class} 6 | \alias{quadratic} 7 | \alias{eval,quadratic,missing-method} 8 | \title{Class "quadratic"} 9 | \description{ 10 | Quadratic transform class which represents a transformation defined by the 11 | function \deqn{f(parameter,a)=a*parameter^2} 12 | } 13 | \section{Slots}{ 14 | 15 | \describe{ 16 | \item{\code{.Data}}{Object of class \code{"function"}.} 17 | 18 | \item{\code{a}}{Object of class \code{"numeric"} -- non-zero multiplicative 19 | constant.} 20 | 21 | \item{\code{parameters}}{Object of class \code{"transformation"} -- flow 22 | parameter to be transformed.} 23 | 24 | \item{\code{transformationId}}{Object of class \code{"character"} -- unique 25 | ID to reference the transformation.} 26 | }} 27 | 28 | \note{ 29 | The quadratic transformation object can be evaluated using the eval 30 | method by passing the data frame as an argument.The transformed parameters 31 | are returned as a column vector. (See example below) 32 | } 33 | \section{Objects from the Class}{ 34 | Objects can be created by calls to the 35 | constructor \code{quadratic(parameters,a,transformationId)} 36 | } 37 | 38 | \section{Extends}{ 39 | 40 | Class \code{"\linkS4class{singleParameterTransform}"}, directly. 41 | 42 | Class \code{"\linkS4class{transform}"}, by class "singleParameterTransform", 43 | distance 2. 44 | 45 | Class \code{"\linkS4class{transformation}"}, by class "singleParameterTransform", 46 | distance 3. 47 | 48 | Class \code{"\linkS4class{characterOrTransformation}"}, by class "singleParameterTransform", 49 | distance 4. 50 | } 51 | 52 | \examples{ 53 | 54 | dat <- read.FCS(system.file("extdata","0877408774.B08", 55 | package="flowCore")) 56 | quad1<-quadratic(parameters="FSC-H",a=2,transformationId="quad1") 57 | transOut<-eval(quad1)(exprs(dat)) 58 | 59 | } 60 | \references{ 61 | Gating-ML Candidate Recommendation for Gating Description in 62 | Flow Cytometry V 1.5 63 | } 64 | \seealso{ 65 | dg1polynomial,ratio,squareroot 66 | 67 | Other mathematical transform classes: 68 | \code{\link{EHtrans-class}}, 69 | \code{\link{asinht-class}}, 70 | \code{\link{asinhtGml2-class}}, 71 | \code{\link{dg1polynomial-class}}, 72 | \code{\link{exponential-class}}, 73 | \code{\link{hyperlog-class}}, 74 | \code{\link{hyperlogtGml2-class}}, 75 | \code{\link{invsplitscale-class}}, 76 | \code{\link{lintGml2-class}}, 77 | \code{\link{logarithm-class}}, 78 | \code{\link{logicletGml2-class}}, 79 | \code{\link{logtGml2-class}}, 80 | \code{\link{ratio-class}}, 81 | \code{\link{ratiotGml2-class}}, 82 | \code{\link{sinht-class}}, 83 | \code{\link{splitscale-class}}, 84 | \code{\link{squareroot-class}}, 85 | \code{\link{unitytransform-class}} 86 | } 87 | \author{ 88 | Gopalakrishnan N, F.Hahne 89 | } 90 | \concept{mathematical transform classes} 91 | \keyword{classes} 92 | -------------------------------------------------------------------------------- /man/quadraticTransform.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \name{quadraticTransform} 4 | \alias{quadraticTransform} 5 | \title{Create the definition of a quadratic transformation function to be applied 6 | on a data set} 7 | \usage{ 8 | quadraticTransform(transformationId="defaultQuadraticTransform", a = 1, b = 1, c = 0) 9 | } 10 | \arguments{ 11 | \item{transformationId}{character string to identify the transformation} 12 | 13 | \item{a}{double that corresponds to the quadratic coefficient in the 14 | equation} 15 | 16 | \item{b}{double that corresponds to the linear coefficient in the equation} 17 | 18 | \item{c}{double that corresponds to the intercept in the equation} 19 | } 20 | \value{ 21 | Returns an object of class \code{transform}. 22 | } 23 | \description{ 24 | Create the definition of the quadratic Transformation that will be applied 25 | on some parameter via the \code{transform} method. The definition of this 26 | function is currently x <- a*x\^2 + b*x + c 27 | } 28 | \examples{ 29 | 30 | samp <- read.FCS(system.file("extdata", 31 | "0877408774.B08", package="flowCore")) 32 | quadTrans <- quadraticTransform(transformationId="Quadratic-transformation", a=1, b=1, c=0) 33 | dataTransform <- transform(samp, transformList('FSC-H', quadTrans)) 34 | 35 | 36 | } 37 | \seealso{ 38 | \code{\link{transform-class}}, \code{\link{transform}} 39 | 40 | Other Transform functions: 41 | \code{\link{arcsinhTransform}()}, 42 | \code{\link{biexponentialTransform}()}, 43 | \code{\link{inverseLogicleTransform}()}, 44 | \code{\link{linearTransform}()}, 45 | \code{\link{lnTransform}()}, 46 | \code{\link{logTransform}()}, 47 | \code{\link{logicleTransform}()}, 48 | \code{\link{scaleTransform}()}, 49 | \code{\link{splitScaleTransform}()}, 50 | \code{\link{truncateTransform}()} 51 | } 52 | \author{ 53 | N. Le Meur 54 | } 55 | \concept{Transform functions} 56 | \keyword{methods} 57 | -------------------------------------------------------------------------------- /man/randomFilterResult-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{randomFilterResult-class} 5 | \alias{randomFilterResult-class} 6 | \alias{randomFilterResult} 7 | \title{Class "randomFilterResult"} 8 | \description{ 9 | Container to store the result of applying a \code{filter} on a 10 | \code{flowFrame} object, with the population membership considered to be 11 | stochastic rather than absolute. Currently not utilized. 12 | } 13 | \section{Slots}{ 14 | 15 | \describe{ 16 | \item{\code{subSet}}{Object of class \code{"numeric"}, which is a logical vector 17 | indicating the population membership of the data in the gated flowFrame.} 18 | 19 | \item{\code{frameId}}{Object of class \code{"character"} referencing the 20 | \code{flowFrame} object filtered. Used for sanity checking.} 21 | 22 | \item{\code{filterDetails}}{Object of class \code{"list"} describing the filter applied.} 23 | 24 | \item{\code{filterId}}{Object of class \code{"character"} referencing the filter applied.} 25 | }} 26 | 27 | \section{Extends}{ 28 | 29 | 30 | Class \code{"\linkS4class{filterResult}"}, directly. 31 | Class \code{"\linkS4class{filter}"}, by class "filterResult", distance 2. 32 | } 33 | 34 | \seealso{ 35 | \code{\link[flowCore:filter-methods]{filter}} 36 | } 37 | \author{ 38 | B. Ellis 39 | } 40 | \keyword{classes} 41 | -------------------------------------------------------------------------------- /man/ratio-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{ratio-class} 5 | \alias{ratio-class} 6 | \alias{ratio} 7 | \alias{eval,ratio,missing-method} 8 | \alias{initialize,ratio-method} 9 | \title{Class "ratio"} 10 | \description{ 11 | ratio transform calculates the ratio of two parameters defined by the 12 | function \deqn{f(parameter_1,parameter_2)=\frac{parameter_1}{parameter_2}} 13 | } 14 | \section{Slots}{ 15 | 16 | \describe{ 17 | \item{\code{.Data}}{Object of class \code{"function"}.} 18 | 19 | \item{\code{numerator}}{Object of class \code{"transformation"} -- flow parameter 20 | to be transformed} 21 | 22 | \item{\code{denominator}}{Object of class \code{"transformation"} -- flow parameter 23 | to be transformed.} 24 | 25 | \item{\code{transformationId}}{Object of class \code{"character"} -- unique ID to 26 | reference the transformation.} 27 | }} 28 | 29 | \note{ 30 | The ratio transformation object can be evaluated using the eval method 31 | by passing the data frame as an argument.The transformed parameters are 32 | returned as matrix with one column. (See example below) 33 | } 34 | \section{Objects from the Class}{ 35 | Objects can be created by calls to the 36 | constructor \code{ratio(parameter1,parameter2,transformationId) }. 37 | } 38 | 39 | \section{Extends}{ 40 | 41 | Class \code{"\linkS4class{transform}"}, directly. 42 | 43 | Class \code{"\linkS4class{transformation}"}, by class "transform", distance 2. 44 | 45 | Class \code{"\linkS4class{characterOrTransformation}"}, by class "transform", distance 3. 46 | } 47 | 48 | \examples{ 49 | 50 | dat <- read.FCS(system.file("extdata","0877408774.B08", 51 | package="flowCore")) 52 | rat1<-ratio("FSC-H","SSC-H",transformationId="rat1") 53 | transOut<-eval(rat1)(exprs(dat)) 54 | 55 | } 56 | \references{ 57 | Gating-ML Candidate Recommendation for Gating Description in 58 | Flow Cytometry V 1.5 59 | } 60 | \seealso{ 61 | dg1polynomial,quadratic,squareroot 62 | 63 | Other mathematical transform classes: 64 | \code{\link{EHtrans-class}}, 65 | \code{\link{asinht-class}}, 66 | \code{\link{asinhtGml2-class}}, 67 | \code{\link{dg1polynomial-class}}, 68 | \code{\link{exponential-class}}, 69 | \code{\link{hyperlog-class}}, 70 | \code{\link{hyperlogtGml2-class}}, 71 | \code{\link{invsplitscale-class}}, 72 | \code{\link{lintGml2-class}}, 73 | \code{\link{logarithm-class}}, 74 | \code{\link{logicletGml2-class}}, 75 | \code{\link{logtGml2-class}}, 76 | \code{\link{quadratic-class}}, 77 | \code{\link{ratiotGml2-class}}, 78 | \code{\link{sinht-class}}, 79 | \code{\link{splitscale-class}}, 80 | \code{\link{squareroot-class}}, 81 | \code{\link{unitytransform-class}} 82 | } 83 | \author{ 84 | Gopalakrishnan N, F.Hahne 85 | } 86 | \concept{mathematical transform classes} 87 | \keyword{classes} 88 | -------------------------------------------------------------------------------- /man/read.FCSheader.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/IO.R 3 | \name{read.FCSheader} 4 | \alias{read.FCSheader} 5 | \title{Read the TEXT section of a FCS file} 6 | \usage{ 7 | read.FCSheader(files, path = ".", keyword = NULL, ...) 8 | } 9 | \arguments{ 10 | \item{files}{Character vector of filenames.} 11 | 12 | \item{path}{Directory where to look for the files.} 13 | 14 | \item{keyword}{An optional character vector that specifies the FCS keyword 15 | to read.} 16 | 17 | \item{...}{other arguments passed to \code{link[flowCore]{read.FCS}}} 18 | } 19 | \value{ 20 | A list of character vectors. Each element of the list correspond to 21 | one FCS file. 22 | } 23 | \description{ 24 | Read (part of) the TEXT section of a Data File Standard for Flow Cytometry 25 | that contains FACS keywords. 26 | } 27 | \details{ 28 | The function \code{read.FCSheader} works with the output of the FACS machine 29 | software from a number of vendors (FCS 2.0, FCS 3.0 and List Mode Data LMD). 30 | The output of the function is the TEXT section of the FCS files. The user 31 | can specify some keywords to limit the output to the information of 32 | interest. 33 | } 34 | \examples{ 35 | 36 | samp <- read.FCSheader(system.file("extdata", 37 | "0877408774.B08", package="flowCore")) 38 | samp 39 | 40 | samp <- read.FCSheader(system.file("extdata", 41 | "0877408774.B08", package="flowCore"), keyword=c("$DATE", "$FIL")) 42 | samp 43 | 44 | } 45 | \seealso{ 46 | \code{link[flowCore]{read.flowSet}}, 47 | \code{link[flowCore]{read.FCS}} 48 | } 49 | \author{ 50 | N.Le Meur 51 | } 52 | \keyword{IO} 53 | -------------------------------------------------------------------------------- /man/rotate_gate.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/transform_gate-methods.R 3 | \name{rotate_gate} 4 | \alias{rotate_gate} 5 | \alias{rotate_gate.default} 6 | \title{Simplified geometric rotation of gates} 7 | \usage{ 8 | \method{rotate_gate}{default}(obj, deg = NULL, rot_center = NULL, ...) 9 | } 10 | \arguments{ 11 | \item{obj}{An \code{\linkS4class{ellipsoidGate}} or \code{\linkS4class{polygonGate}}} 12 | 13 | \item{deg}{An angle in degrees by which the gate should be rotated in the counter-clockwise direction} 14 | 15 | \item{rot_center}{A separate 2-dimensional center of rotation for the gate, if desired. By default, this will 16 | be the center for \code{ellipsoidGate} objects or the centroid for \code{polygonGate} objects. The \code{rot_center} argument 17 | is currently only supported for \code{polygonGate} objects.} 18 | 19 | \item{\dots}{Additional arguments not used} 20 | } 21 | \value{ 22 | A Gate-type \code{filter} object of the same type as \code{gate}, with the rotation applied 23 | } 24 | \description{ 25 | Rotate a Gate-type filter object through a specified angle 26 | } 27 | \details{ 28 | This method allows for 2-dimensional geometric rotation of filter types defined by simple geometric gates 29 | (\code{\linkS4class{ellipsoidGate}}, and \code{\linkS4class{polygonGate}}). The method is not defined 30 | for \code{rectangleGate} or \code{quadGate} objects, due to their definition as having 1-dimensional boundaries. 31 | Further, keep in mind that the 2-dimensional rotation takes place in the plane where the dimensions 32 | of the two variables are evenly linearly scaled. Displaying a rotated ellipse in a plot where the axes are not scaled 33 | evenly may make it appear that the ellipse has been distorted even though this is not the case. 34 | 35 | The angle provided in the \code{deg} argument should be in degrees rather than radians. By default, the rotation 36 | will be performed around the center of an \code{ellipsoidGate} or the centroid of the area encompassed by 37 | a \code{polygonGate}. The \code{rot_center} argument allows for specification of a different center of rotation 38 | for \code{polygonGate} objects (it is not yet implemented for \code{ellipsoidGate} objects) but 39 | it is usually simpler to perform a rotation and a translation individually than to manually specify 40 | the composition as a rotation around a shifted center. 41 | } 42 | \examples{ 43 | \dontrun{ 44 | #' # Rotates the original gate 15 degrees counter-clockwise 45 | rotated_gate <- rotate_gate(original_gate, deg = 15) 46 | # Rotates the original gate 270 degrees counter-clockwise 47 | rotated_gate <- rotate_gate(original_gate, 270) 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /man/scaleTransform.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \name{scaleTransform} 4 | \alias{scaleTransform} 5 | \title{Create the definition of a scale transformation function to be applied on a 6 | data set} 7 | \usage{ 8 | scaleTransform(transformationId="defaultScaleTransform", a, b) 9 | } 10 | \arguments{ 11 | \item{transformationId}{character string to identify the transformation} 12 | 13 | \item{a}{double that corresponds to the value that will be transformed to 0} 14 | 15 | \item{b}{double that corresponds to the value that will be transformed to 1} 16 | } 17 | \value{ 18 | Returns an object of class \code{transform}. 19 | } 20 | \description{ 21 | Create the definition of the scale Transformation that will be applied on 22 | some parameter via the \code{transform} method. The definition of this 23 | function is currently x = (x-a)/(b-a). The transformation would normally be 24 | used to convert to a 0-1 scale. In this case, b would be the maximum 25 | possible value and a would be the minimum possible value. 26 | } 27 | \examples{ 28 | 29 | samp <- read.FCS(system.file("extdata", 30 | "0877408774.B08", package="flowCore")) 31 | scaleTrans <- scaleTransform(transformationId="Truncate-transformation", a=1, b=10^4) 32 | dataTransform <- transform(samp, transformList('FSC-H', scaleTrans)) 33 | 34 | } 35 | \seealso{ 36 | \code{\link{transform-class}}, \code{\link{transform}} 37 | 38 | Other Transform functions: 39 | \code{\link{arcsinhTransform}()}, 40 | \code{\link{biexponentialTransform}()}, 41 | \code{\link{inverseLogicleTransform}()}, 42 | \code{\link{linearTransform}()}, 43 | \code{\link{lnTransform}()}, 44 | \code{\link{logTransform}()}, 45 | \code{\link{logicleTransform}()}, 46 | \code{\link{quadraticTransform}()}, 47 | \code{\link{splitScaleTransform}()}, 48 | \code{\link{truncateTransform}()} 49 | } 50 | \author{ 51 | P. Haaland 52 | } 53 | \concept{Transform functions} 54 | \keyword{methods} 55 | -------------------------------------------------------------------------------- /man/scale_gate.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/transform_gate-methods.R 3 | \name{scale_gate} 4 | \alias{scale_gate} 5 | \alias{scale_gate.default} 6 | \title{Simplified geometric scaling of gates} 7 | \usage{ 8 | \method{scale_gate}{default}(obj, scale = NULL, ...) 9 | } 10 | \arguments{ 11 | \item{obj}{A Gate-type \code{\link{filter}} object (\code{\linkS4class{quadGate}}, 12 | \code{\linkS4class{rectangleGate}}, \code{\linkS4class{ellipsoidGate}}, or \code{\linkS4class{polygonGate}})} 13 | 14 | \item{scale}{Either a numeric scalar (for uniform scaling in all dimensions) or numeric vector specifying the factor by 15 | which each dimension of the gate should be expanded (absolute value > 1) or contracted (absolute value < 1). Negative values 16 | will result in a reflection in that dimension.} 17 | 18 | \item{\dots}{Additional arguments not used} 19 | } 20 | \value{ 21 | A Gate-type \code{filter} object of the same type as \code{gate}, with the scaling applied 22 | } 23 | \description{ 24 | Scale a Gate-type filter object in one or more dimensions 25 | } 26 | \details{ 27 | This method allows uniform or non-uniform geometric scaling of filter types defined by simple geometric gates 28 | (\code{\linkS4class{quadGate}}, \code{\linkS4class{rectangleGate}}, \code{\linkS4class{ellipsoidGate}}, and 29 | \code{\linkS4class{polygonGate}}) Note that these methods are for manually altering 30 | the geometric definition of a gate. To easily transform the definition of a gate with an accompanyging scale 31 | transformation applied to its underlying data, see \code{\link[ggcyto]{rescale_gate}}. 32 | 33 | The \code{scale} argument passed to \code{scale_gate} should be either a scalar or a vector of the same length 34 | as the number of dimensions of the gate. If it is scalar, all dimensions will be multiplicatively scaled uniformly 35 | by the scalar factor provided. If it is a vector, each dimension will be scaled by its corresponding entry in the vector. 36 | 37 | The scaling behavior of \code{scale_gate} depends on the type of gate passed to it. For \code{rectangleGate} 38 | and \code{quadGate} objects, this amounts to simply scaling the values of the 1-dimensional boundaries. 39 | For \code{polygonGate} objects, the values of \code{scale} will be used to determine scale factors 40 | in the direction of each of the 2 dimensions of the gate (\code{scale_gate} is not yet defined 41 | for higher-dimensional \code{polytopeGate} objects). \strong{Important: } For \code{ellipsoidGate} objects, \code{scale} 42 | determines scale factors for the major and minor axes of the ellipse, \emph{in that order}. Scaling by a negative factor 43 | will result in a reflection in the corresponding dimension. 44 | } 45 | \examples{ 46 | \dontrun{ 47 | # Scales both dimensions by a factor of 5 48 | scaled_gate <- scale_gate(original_gate, 5) 49 | 50 | # Shrinks the gate in the first dimension by factor of 1/2 51 | # and expands it in the other dimension by factor of 3 52 | scaled_gate <- scale_gate(original_gate, c(0.5,3)) 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /man/setOperationFilter-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{setOperationFilter-class} 5 | \alias{setOperationFilter-class} 6 | \alias{setOperationFilter} 7 | \title{Class "setOperationFilter"} 8 | \description{ 9 | This is a Superclass for the unionFilter, intersectFilter, complementFilter 10 | and subsetFilter classes, which all consist of two or more component filters 11 | and are constructed using set operators (\code{&}, \code{|}, \code{!}, and 12 | \code{\%&\%} or \code{\%subset\%} respectively). 13 | } 14 | \section{Slots}{ 15 | 16 | \describe{ 17 | \item{\code{filters}}{Object of class \code{"list"}, containing the component filters.} 18 | 19 | \item{\code{filterId}}{Object of class \code{"character"} 20 | referencing the filter applied.} 21 | }} 22 | 23 | \section{Extends}{ 24 | 25 | 26 | Class \code{"\linkS4class{filter}"}, directly. 27 | } 28 | 29 | \seealso{ 30 | \code{\link[flowCore:filter-methods]{filter}} 31 | 32 | Other setOperationFilter classes: 33 | \code{\link{complementFilter-class}}, 34 | \code{\link{intersectFilter-class}}, 35 | \code{\link{subsetFilter-class}}, 36 | \code{\link{unionFilter-class}} 37 | } 38 | \author{ 39 | B. Ellis 40 | } 41 | \concept{setOperationFilter classes} 42 | \keyword{classes} 43 | -------------------------------------------------------------------------------- /man/singleParameterTransform-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{singleParameterTransform-class} 5 | \alias{singleParameterTransform-class} 6 | \alias{initialize,singleParameterTransform-method} 7 | \alias{parameters,singleParameterTransform-method} 8 | \title{Class "singleParameterTransform"} 9 | \description{ 10 | A transformation that operates on a single parameter 11 | } 12 | \section{Slots}{ 13 | 14 | \describe{ 15 | \item{\code{.Data}}{Object of class \code{"function"}. The transformation.} 16 | 17 | \item{\code{parameters}}{Object of class \code{"transformation"}. The 18 | parameter to transform. Can be a derived parameter from another 19 | transformation.} 20 | 21 | \item{\code{transformationId}}{Object of class \code{"character"}. An 22 | identifier for the object.} 23 | }} 24 | 25 | \section{Objects from the Class}{ 26 | 27 | 28 | Objects can be created by calls of the form 29 | \code{new("singleParameterTransform", ...)}. 30 | } 31 | 32 | \section{Extends}{ 33 | 34 | Class \code{"\linkS4class{transform}"}, directly. 35 | Class \code{"\linkS4class{transformation}"}, by class "transform", distance 2. 36 | Class \code{"\linkS4class{characterOrTransformation}"}, by class "transform", distance 3. 37 | } 38 | 39 | \examples{ 40 | 41 | showClass("singleParameterTransform") 42 | 43 | } 44 | \author{ 45 | F Hahne 46 | } 47 | \keyword{classes} 48 | -------------------------------------------------------------------------------- /man/splitScaleTransform.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \name{splitScaleTransform} 4 | \alias{splitScaleTransform} 5 | \title{Compute the split-scale transformation describe by FL. Battye} 6 | \usage{ 7 | splitScaleTransform(transformationId="defaultSplitscaleTransform", 8 | maxValue=1023, transitionChannel=64, r=192) 9 | } 10 | \arguments{ 11 | \item{transformationId}{A name to assign to the transformation. Used by the 12 | transform/filter integration routines.} 13 | 14 | \item{maxValue}{Maximum value the transformation is applied to, e.g., 1023} 15 | 16 | \item{transitionChannel}{Where to split the linear versus the logarithmic 17 | transformation, e.g., 64} 18 | 19 | \item{r}{Range of the logarithm part of the display, ie. it may be expressed 20 | as the maxChannel - transitionChannel considering the maxChannel as the 21 | maximum value to be obtained after the transformation.} 22 | } 23 | \value{ 24 | Returns values giving the inverse of the biexponential within a 25 | certain tolerance. This function should be used with care as numerical 26 | inversion routines often have problems with the inversion process due to the 27 | large range of values that are essentially 0. Do not be surprised if you end 28 | up with population splitting about \code{w} and other odd artifacts. 29 | } 30 | \description{ 31 | The split scale transformation described by Francis L. Battye [B15] (Figure 32 | 13) consists of a logarithmic scale at high values and a linear scale at low 33 | values with a fixed transition point chosen so that the slope (first 34 | derivative) of the transform is continuous at that point. The scale extends 35 | to the negative of the transition value that is reached at the bottom of the 36 | display. 37 | } 38 | \examples{ 39 | 40 | data(GvHD) 41 | ssTransform <- splitScaleTransform("mySplitTransform") 42 | after.1 <- transform(GvHD, transformList('FSC-H', ssTransform)) 43 | 44 | opar = par(mfcol=c(2, 1)) 45 | plot(density(exprs(GvHD[[1]])[, 1]), main="Original") 46 | plot(density(exprs(after.1[[1]])[, 1]), main="Split-scale Transform") 47 | 48 | } 49 | \references{ 50 | Battye F.L. A Mathematically Simple Alternative to the 51 | Logarithmic Transform for Flow Cytometric Fluorescence Data Displays. 52 | http://www.wehi.edu.au/cytometry/Abstracts/AFCG05B.html. 53 | } 54 | \seealso{ 55 | \code{\link{transform}} 56 | 57 | Other Transform functions: 58 | \code{\link{arcsinhTransform}()}, 59 | \code{\link{biexponentialTransform}()}, 60 | \code{\link{inverseLogicleTransform}()}, 61 | \code{\link{linearTransform}()}, 62 | \code{\link{lnTransform}()}, 63 | \code{\link{logTransform}()}, 64 | \code{\link{logicleTransform}()}, 65 | \code{\link{quadraticTransform}()}, 66 | \code{\link{scaleTransform}()}, 67 | \code{\link{truncateTransform}()} 68 | } 69 | \author{ 70 | N. LeMeur 71 | } 72 | \concept{Transform functions} 73 | \keyword{methods} 74 | -------------------------------------------------------------------------------- /man/squareroot-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{squareroot-class} 5 | \alias{squareroot-class} 6 | \alias{squareroot} 7 | \alias{eval,squareroot,missing-method} 8 | \title{Class "squareroot"} 9 | \description{ 10 | Square root transform class, which represents a transformation defined by the 11 | function \deqn{f(parameter,a)= \sqrt{ |{\frac{parameter}{a}|}}} 12 | } 13 | \section{Slots}{ 14 | 15 | \describe{ 16 | \item{\code{.Data}}{Object of class \code{"function"}} 17 | 18 | \item{\code{a}}{Object of class \code{"numeric"} -- non-zero multiplicative 19 | constant} 20 | 21 | \item{\code{parameters}}{Object of class \code{"transformation"} -- flow 22 | parameter to be transformed.} 23 | 24 | \item{\code{transformationId}}{Object of class \code{"character"} -- unique 25 | ID to reference the transformation.} 26 | }} 27 | 28 | \note{ 29 | The squareroot transformation object can be evaluated using the eval 30 | method by passing the data frame as an argument.The transformed parameters 31 | are returned as a column vector. (See example below) 32 | } 33 | \section{Objects from the Class}{ 34 | Objects can be created by calls to the 35 | constructor \code{squareroot(parameters,a,transformationId)} 36 | } 37 | 38 | \section{Extends}{ 39 | 40 | Class \code{"\linkS4class{singleParameterTransform}"}, directly. 41 | 42 | Class \code{"\linkS4class{transform}"}, by class "singleParameterTransform", distance 2. 43 | 44 | Class \code{"\linkS4class{transformation}"}, by class "singleParameterTransform", distance 3. 45 | 46 | Class \code{"\linkS4class{characterOrTransformation}"}, by class "singleParameterTransform", distance 4. 47 | } 48 | 49 | \examples{ 50 | 51 | dat <- read.FCS(system.file("extdata","0877408774.B08", 52 | package="flowCore")) 53 | sqrt1<-squareroot(parameters="FSC-H",a=2,transformationId="sqrt1") 54 | transOut<-eval(sqrt1)(exprs(dat)) 55 | 56 | } 57 | \references{ 58 | Gating-ML Candidate Recommendation for Gating Description in 59 | Flow Cytometry 60 | } 61 | \seealso{ 62 | dg1polynomial, ratio, quadratic 63 | 64 | Other mathematical transform classes: 65 | \code{\link{EHtrans-class}}, 66 | \code{\link{asinht-class}}, 67 | \code{\link{asinhtGml2-class}}, 68 | \code{\link{dg1polynomial-class}}, 69 | \code{\link{exponential-class}}, 70 | \code{\link{hyperlog-class}}, 71 | \code{\link{hyperlogtGml2-class}}, 72 | \code{\link{invsplitscale-class}}, 73 | \code{\link{lintGml2-class}}, 74 | \code{\link{logarithm-class}}, 75 | \code{\link{logicletGml2-class}}, 76 | \code{\link{logtGml2-class}}, 77 | \code{\link{quadratic-class}}, 78 | \code{\link{ratio-class}}, 79 | \code{\link{ratiotGml2-class}}, 80 | \code{\link{sinht-class}}, 81 | \code{\link{splitscale-class}}, 82 | \code{\link{unitytransform-class}} 83 | } 84 | \author{ 85 | Gopalakrishnan N, F.Hahne 86 | } 87 | \concept{mathematical transform classes} 88 | \keyword{classes} 89 | -------------------------------------------------------------------------------- /man/subsetFilter-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{subsetFilter-class} 5 | \alias{subsetFilter-class} 6 | \alias{subsetFilter} 7 | \alias{show,subsetFilter-method} 8 | \alias{summary,subsetFilter-method} 9 | \title{Class subsetFilter} 10 | \description{ 11 | This class represents the action of applying a filter on the subset of 12 | data resulting from another filter. This is itself a filter that can be 13 | incorporated in to further set operations. This is similar to an 14 | intersectFilter, with behavior only differing if the component filters 15 | are data-driven. 16 | } 17 | \details{ 18 | \code{subsetFilter}s are constructed using the equivalent binary set operators 19 | \code{"\%&\%"} or \code{"\%subset\%"}. The operator is not symmetric, as the 20 | filter on the right-hand side will take the subset of the filter on the 21 | left-hand side as input. Left-hand side operands can be a filter or list of 22 | filters, while the right-hand side operand must be a single 23 | filter. 24 | } 25 | \section{Slots}{ 26 | 27 | \describe{ 28 | \item{\code{filters}}{Object of class \code{"list"}, containing the component filters.} 29 | 30 | \item{\code{filterId}}{Object of class \code{"character"} 31 | referencing the filter applied.} 32 | }} 33 | 34 | \section{Extends}{ 35 | 36 | 37 | Class \code{"\linkS4class{filter}"}, directly. 38 | } 39 | 40 | \seealso{ 41 | \code{\link[flowCore:filter-methods]{filter}}, \code{\linkS4class{setOperationFilter}} 42 | 43 | Other setOperationFilter classes: 44 | \code{\link{complementFilter-class}}, 45 | \code{\link{intersectFilter-class}}, 46 | \code{\link{setOperationFilter-class}}, 47 | \code{\link{unionFilter-class}} 48 | } 49 | \author{ 50 | B. Ellis 51 | } 52 | \concept{setOperationFilter classes} 53 | \keyword{classes} 54 | -------------------------------------------------------------------------------- /man/summarizeFilter-methods.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/summarizeFilter-methods.R 3 | \docType{methods} 4 | \name{summarizeFilter-methods} 5 | \alias{summarizeFilter-methods} 6 | \alias{summarizeFilter} 7 | \alias{summarizeFilter,filterResult,filter-method} 8 | \alias{summarizeFilter,filterResult,filterReference-method} 9 | \alias{summarizeFilter,filterResult,parameterFilter-method} 10 | \alias{summarizeFilter,filterResult,subsetFilter-method} 11 | \alias{summarizeFilter,logicalFilterResult,norm2Filter-method} 12 | \alias{summarizeFilter,logicalFilterResult,parameterFilter-method} 13 | \alias{summarizeFilter,multipleFilterResult,parameterFilter-method} 14 | \title{Methods for function summarizeFilter} 15 | \usage{ 16 | summarizeFilter(result, filter) 17 | } 18 | \arguments{ 19 | \item{result}{A \code{\linkS4class{filterResult}} (or one of its derived classes) 20 | representing the result of a filtering operation in whose 21 | \code{filterDetails} slot the information will be stored.} 22 | 23 | \item{filter}{The corresponding \code{\linkS4class{filter}} (or one of its 24 | derived classes).} 25 | } 26 | \description{ 27 | Internal methods to populate the \code{filterDetails} slot of a 28 | \code{\link{filterResult}} object. 29 | } 30 | \section{Methods}{ 31 | 32 | \describe{ 33 | 34 | \item{summarizeFilter(result = "filterResult", filter = "filter")}{ \code{summarizeFilter} 35 | methods are called during the process of filtering. Their output is a list, 36 | and it can be arbitrary data that should be stored along with the results of 37 | a filtering operation. } 38 | 39 | \item{summarizeFilter(result = "filterResult", filter = "filterReference")}{ see above } 40 | 41 | \item{summarizeFilter(result = "filterResult", filter = "parameterFilter")}{ see above } 42 | 43 | \item{summarizeFilter(result = "filterResult", filter = "subsetFilter")}{ see above } 44 | 45 | \item{summarizeFilter(result = "logicalFilterResult", filter = "norm2Filter")}{ see above } 46 | 47 | \item{summarizeFilter(result = "logicalFilterResult", filter = "parameterFilter")}{ see above 48 | } 49 | 50 | \item{summarizeFilter(result = "multipleFilterResult", filter = "parameterFilter")}{ see 51 | above } } 52 | } 53 | 54 | \keyword{methods} 55 | -------------------------------------------------------------------------------- /man/transform-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{transform-class} 5 | \alias{transform-class} 6 | \alias{transform,missing-method} 7 | \alias{summary,transform-method} 8 | \alias{show,transform-method} 9 | \title{'transform': a class for transforming flow-cytometry data by applying scale 10 | factors.} 11 | \description{ 12 | Transform objects are simply functions that have been extended to allow for 13 | specialized dispatch. All of the ``...Transform'' constructors return 14 | functions of this type for use in one of the transformation modalities. 15 | } 16 | \section{Slots}{ 17 | 18 | \describe{ 19 | \item{\code{.Data}}{Object of class \code{"function"}} 20 | 21 | \item{\code{transformationId}}{A name for the transformation 22 | object} 23 | }} 24 | 25 | \section{Methods}{ 26 | 27 | \describe{ 28 | \item{\code{summary}}{Return the parameters} 29 | } 30 | } 31 | 32 | \examples{ 33 | 34 | cosTransform <- function(transformId, a=1, b=1){ 35 | t = new("transform", .Data = function(x) cos(a*x+b)) 36 | t@transformationId = transformId 37 | t 38 | } 39 | 40 | cosT <- cosTransform(transformId="CosT",a=2,b=1) 41 | 42 | summary(cosT) 43 | 44 | } 45 | \seealso{ 46 | \code{\link[flowCore]{linearTransform}}, 47 | \code{\link[flowCore]{lnTransform}}, 48 | \code{\link[flowCore]{logicleTransform}}, 49 | \code{\link[flowCore]{biexponentialTransform}}, 50 | \code{\link[flowCore]{arcsinhTransform}}, 51 | \code{\link[flowCore]{quadraticTransform}}, 52 | \code{\link[flowCore]{logTransform}} 53 | } 54 | \author{ 55 | N LeMeur 56 | } 57 | \keyword{classes} 58 | -------------------------------------------------------------------------------- /man/transform.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/flowFrame-accessors.R 3 | \name{transform} 4 | \alias{transform} 5 | \alias{transform,flowFrame-method} 6 | \alias{transform,flowSet-method} 7 | \title{Transform a flowFrame or flowSet} 8 | \usage{ 9 | \S4method{transform}{flowFrame}(`_data`, translist, ...) 10 | } 11 | \arguments{ 12 | \item{_data}{a flowFrame or flowSet object} 13 | 14 | \item{translist}{a transformList object} 15 | 16 | \item{...}{other arguments. e.g. `FL1-H` = myFunc(`FL1-H`)} 17 | } 18 | \description{ 19 | Similar to the base transform method, this will transform the values of 20 | a flowFrame or flowSet object according to the transformations specified 21 | in one of two ways: 22 | 1. a [transformList][flowCore::transformList-class] or list of [transform][flowCore::transform-class] objects 23 | 2. named arguments specifying transformations to be applied to channels (see details) 24 | } 25 | \details{ 26 | To specify the transformations in the second way, the names of these arguments 27 | should correspond to the new channel names and the values should be functions applied to 28 | channels currently present in the flowFrame or flowSet. There are a few examples below. 29 | } 30 | \examples{ 31 | data(GvHD) 32 | # logarithmically transform FL1-H and FL2-H for the entire flowSet 33 | # using a transformList 34 | fs <- transform(GvHD, 35 | transformList(c("FL1-H", "FL2-H"), list(log, log))) 36 | 37 | # transform a single flowFrame using named arguments. Note the first 38 | # transformation will overwrite FL1-H while the second will create a new 39 | # channel 40 | fr <- transform(GvHD[[1]], 41 | `FL1-H`=log(`FL1-H`), 42 | `logFL2`=log(`FL2-H`)) 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /man/transformFilter-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{transformFilter-class} 5 | \alias{transformFilter-class} 6 | \alias{transformFilter} 7 | \alias{show,transformFilter-method} 8 | \title{A class for encapsulating a filter to be performed on transformed parameters} 9 | \description{ 10 | The \code{transformFilter} class is a mechanism for including one or more 11 | variable transformations into the filtering process. Using a special case of 12 | \code{\link[flowCore:transform-class]{transform}} we can introduce 13 | transformations inline with the filtering process eliminating the need to 14 | process \code{\link[flowCore:flowFrame-class]{flowFrame}} objects before 15 | applying a filter. 16 | } 17 | \section{Slots}{ 18 | 19 | \describe{ 20 | \item{\code{transforms}}{A list of transforms to perform on the 21 | target \code{\link[flowCore:flowFrame-class]{flowFrame}}} 22 | 23 | \item{\code{filter}}{The filter to be applied to the transformed 24 | frame} 25 | 26 | \item{\code{filterId}}{The name of the filter (chosen 27 | automatically)} 28 | }} 29 | 30 | \section{Objects from the Class}{ 31 | 32 | 33 | Objects of this type are not generally created ``by hand''. They are a side 34 | effect of the use of the \code{\link[flowCore:filter-on-methods]{\%on\%}} 35 | method with a \code{\link[flowCore:filter-methods]{filter}} object on the 36 | left hand side and a 37 | \code{\link[flowCore:transformList-class]{transformList}} on the right hand 38 | side. 39 | } 40 | 41 | \section{Extends}{ 42 | 43 | Class \code{"\linkS4class{filter}"}, directly. 44 | } 45 | 46 | \examples{ 47 | require(flowStats) 48 | samp <- read.FCS(system.file("extdata", "0877408774.B08", package="flowCore")) 49 | 50 | ## Gate this object after log transforming the forward and side 51 | ## scatter variables 52 | filter(samp, norm2Filter("FSC-H", "SSC-H", scale.factor=2) 53 | \%on\% transform("FSC-H"=log,"SSC-H"=log)) 54 | 55 | 56 | } 57 | \seealso{ 58 | \code{"\linkS4class{filter}"}, \code{"\linkS4class{transform}"}, 59 | \code{\link[flowCore:transform-class]{transform}} 60 | } 61 | \author{ 62 | B. Ellis 63 | } 64 | \keyword{classes} 65 | -------------------------------------------------------------------------------- /man/transformList-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{transformList-class} 5 | \alias{transformList-class} 6 | \alias{transformList} 7 | \alias{colnames,transformList-method} 8 | \alias{c,transformList-method} 9 | \alias{identifier,transformList-method} 10 | \alias{identifier<-,transformList,character-method} 11 | \title{Class "transformList"} 12 | \usage{ 13 | transformList(from, tfun, to=from, transformationId = 14 | "defaultTransformation") 15 | } 16 | \arguments{ 17 | \item{from, to}{Characters giving the names of the measurement parameter on 18 | which to transform on and into which the result is supposed to be stored. If 19 | both are equal, the existing parameters will be overwritten.} 20 | 21 | \item{tfun}{A list if functions or a character vector of the names of the 22 | functions used to transform the data. R's recycling rules apply, so a single 23 | function can be given to be used on all parameters.} 24 | 25 | \item{transformationId}{The identifier for the object.} 26 | } 27 | \description{ 28 | A list of transformMaps to be applied to a list of parameters. 29 | } 30 | \section{Slots}{ 31 | 32 | \describe{ 33 | \item{\code{transforms}}{Object of class \code{"list"}, where each 34 | list item is of class \code{\link{transformMap}}.} 35 | 36 | \item{\code{transformationId}}{Object of class \code{"character"}, 37 | the identifier for the object.} 38 | }} 39 | 40 | \section{Objects from the Class}{ 41 | 42 | 43 | Objects can be created by calls of the form \code{new("transformList", 44 | ...)}, by calling the \code{\link{transform}} method with key-value pair 45 | arguments of the form \code{key} equals character and \code{value} equals 46 | function, or by using the constructor \code{transformList}. See below for 47 | details 48 | } 49 | 50 | \section{Methods}{ 51 | 52 | 53 | \describe{ 54 | \item{colnames}{\code{signature(x = "transformList")}: This returns 55 | the names of the parameters that are to be transformed. } 56 | 57 | \item{c}{\code{signature(x = "transformList")}: Concatenate 58 | \code{transformList}s or regular lists and \code{transformLists}. } 59 | 60 | \item{\%on\%}{\code{signature(e1 = "transformList", e2 = 61 | "flowFrame")}: Perform a transformation using the 62 | \code{transformList} on a \code{\link{flowFrame}} or 63 | \code{\link{flowSet}}. } 64 | } 65 | } 66 | 67 | \examples{ 68 | 69 | tl <- transformList(c("FSC-H", "SSC-H"), list(log, asinh)) 70 | colnames(tl) 71 | c(tl, transformList("FL1-H", "linearTransform")) 72 | data(GvHD) 73 | transform(GvHD[[1]], tl) 74 | 75 | 76 | } 77 | \seealso{ 78 | \code{\link{transform}}, \code{\link{transformMap}} 79 | } 80 | \author{ 81 | B. Ellis, F. Hahne 82 | } 83 | \keyword{classes} 84 | -------------------------------------------------------------------------------- /man/transformMap-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{transformMap-class} 5 | \alias{transformMap-class} 6 | \alias{transformMap} 7 | \alias{show,transformMap-method} 8 | \title{A class for mapping transforms between parameters} 9 | \description{ 10 | This class provides a mapping between parameters and transformed parameters 11 | via a function. 12 | } 13 | \section{Slots}{ 14 | 15 | \describe{ 16 | \item{\code{output}}{Name of the transformed parameter.} 17 | 18 | \item{\code{input}}{Name of the parameter to transform.} 19 | 20 | \item{\code{f}}{Function used to accomplish the transform.} 21 | }} 22 | 23 | \section{Objects from the Class}{ 24 | 25 | 26 | Objects of this type are not usually created by the user, except perhaps in 27 | special circumstances. They are generally automatically created by the 28 | inline \code{\link[flowCore:transform-class]{transform}} process during the 29 | creation of a \code{\link{transformFilter}}, or by a call to the 30 | \code{\link{transformList}} constructor. 31 | } 32 | 33 | \section{Methods}{ 34 | 35 | \describe{ 36 | \item{show}{\code{signature(object = "transformList")}: Print details 37 | about the object. } 38 | } 39 | } 40 | 41 | \examples{ 42 | 43 | new("transformMap", input="FSC-H", output="FSC-H", f=log) 44 | 45 | 46 | } 47 | \seealso{ 48 | \code{\link{transform}}, \code{\link{transformList}} 49 | } 50 | \author{ 51 | B. Ellis, F. Hahne 52 | } 53 | \keyword{classes} 54 | -------------------------------------------------------------------------------- /man/transformReference-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{transformReference-class} 5 | \alias{transformReference-class} 6 | \alias{transformReference} 7 | \alias{parameters,transformReference-method} 8 | \alias{eval,transformReference,missing-method} 9 | \title{Class "transformReference"} 10 | \description{ 11 | Class allowing for reference of transforms, for instance as parameters. 12 | } 13 | \section{Slots}{ 14 | 15 | \describe{ 16 | \item{\code{.Data}}{The list of references.} 17 | 18 | \item{\code{searchEnv}}{The environment into which the reference points.} 19 | 20 | \item{\code{transformationId}}{The name of the transformation.} 21 | }} 22 | 23 | \section{Objects from the Class}{ 24 | Objects will be created internally whenever 25 | necessary and this should not be of any concern to the user. 26 | } 27 | 28 | \section{Extends}{ 29 | 30 | Class \code{"\linkS4class{transform}"}, directly. 31 | Class \code{"\linkS4class{transformation}"}, by class "transform", distance 2. 32 | Class \code{"\linkS4class{characterOrTransformation}"}, by class "transform", distance 3. 33 | } 34 | 35 | \author{ 36 | N. Gopalakrishnan 37 | } 38 | \keyword{classes} 39 | -------------------------------------------------------------------------------- /man/transformation-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \docType{class} 4 | \name{transformation-class} 5 | \alias{transformation-class} 6 | \alias{transformation} 7 | \title{Class "transformation"} 8 | \description{ 9 | A virtual class to abstract transformations. 10 | } 11 | \section{Objects from the Class}{ 12 | A virtual Class: No objects may be created 13 | from it. 14 | } 15 | 16 | \section{Extends}{ 17 | 18 | Class \code{"\linkS4class{characterOrTransformation}"}, directly. 19 | } 20 | 21 | \author{ 22 | N. Gopalakrishnan 23 | } 24 | \keyword{classes} 25 | -------------------------------------------------------------------------------- /man/truncateTransform.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AllClasses.R 3 | \name{truncateTransform} 4 | \alias{truncateTransform} 5 | \title{Create the definition of a truncate transformation function to be applied on 6 | a data set} 7 | \usage{ 8 | truncateTransform(transformationId="defaultTruncateTransform", a=1) 9 | } 10 | \arguments{ 11 | \item{transformationId}{character string to identify the transformation} 12 | 13 | \item{a}{double that corresponds to the value at which to truncate} 14 | } 15 | \value{ 16 | Returns an object of class \code{transform}. 17 | } 18 | \description{ 19 | Create the definition of the truncate Transformation that will be applied on 20 | some parameter via the \code{transform} method. The definition of this 21 | function is currently x[x 3 | #include 4 | 5 | #include 6 | #include "zeroin.h" 7 | 8 | struct biexponential_info { 9 | double a,b,c,d,f,w,y; 10 | }; 11 | 12 | double biexponential_fn(double x,void*info) { 13 | struct biexponential_info *p = (struct biexponential_info *)info; 14 | double B = p->a*exp(p->b*(x-p->w))-p->c*exp(-p->d*(x-p->w))+p->f -p-> y; 15 | return (B); 16 | } 17 | 18 | struct sfun_info{ 19 | double m,w,p,t,a,r; 20 | }; 21 | 22 | /* 23 | Logicle function calculation 24 | 25 | double strans_fn(double y,void*info){ 26 | struct sfun_info *k = (struct sfun_info *)info; 27 | double tmp ; 28 | tmp = (y < (k->w +k->a)) ? (k->w + k->a - y) : (y - k->w - k->a) ; 29 | tmp = k->t*pow(10,-1*(k->m - k->w - k->a ))*(pow(10,tmp)-k->p*k->p*pow(10,-tmp/k->p)+ k->p*k->p-1); 30 | return((y < (k->w +k->a)) ? -1*tmp -k->r :tmp-k->r); 31 | } 32 | */ 33 | /*10/15/09 ngopalak: Updated biexponential transform so that it now calculates 34 | the solution of a generic biexponential function 35 | S(x,a,b,c,d,f) = ae^(bx) -ce^(-dx) +f instead of the logicle function 36 | it was calculating earlier 37 | */ 38 | 39 | [[cpp11::register]] std::vector biexponential_transform(std::vector input,double A,double B,double C,double D,double F,double W,double tol,int maxIt) { 40 | 41 | struct biexponential_info params; 42 | 43 | unsigned i; 44 | int fail=0; 45 | double step; 46 | params.a = A; 47 | params.b = B; 48 | params.c = C; 49 | params.d = D; 50 | params.f = F; 51 | params.w = W; 52 | 53 | unsigned nLen = input.size(); 54 | for(i=0;i0;step*=1.5,j+=1){ 60 | if(j > MaxIt){ 61 | break; 62 | } 63 | } 64 | input.at(i) = R_zeroin(-step,step,biexponential_fn,(void*)¶ms,&Tol,&MaxIt); 65 | if(MaxIt==-1){ 66 | fail=fail+1; 67 | } 68 | } 69 | if(fail>0) 70 | Rf_warning("%d values of %d have not converged.",fail,nLen); 71 | 72 | return input; 73 | } 74 | 75 | -------------------------------------------------------------------------------- /src/convertRawBytes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * convertRawBytes.h 3 | * 4 | * Created on: Nov 24, 2015 5 | * Author: wjiang2 6 | */ 7 | 8 | #ifndef CONVERTRAWBYTES_H_ 9 | #define CONVERTRAWBYTES_H_ 10 | #include 11 | typedef unsigned char BYTE; 12 | typedef std::vector BYTES; 13 | 14 | 15 | 16 | #endif /* CONVERTRAWBYTES_H_ */ 17 | -------------------------------------------------------------------------------- /src/flowCore_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * flowCore_types.h 3 | * 4 | * Created on: Nov 24, 2015 5 | * Author: wjiang2 6 | */ 7 | 8 | #ifndef FLOWCORE_TYPES_H_ 9 | #define FLOWCORE_TYPES_H_ 10 | 11 | 12 | #include "convertRawBytes.h" 13 | #include 14 | 15 | #endif /* FLOWCORE_TYPES_H_ */ 16 | -------------------------------------------------------------------------------- /src/hyperlogTransform.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | Hyperlog transformation added by Josef Spidlen. 3 | This hyperlog implementation is based on Java reference 4 | implementation that is part of the full Gating-ML 2.0 5 | specification. The Java reference implementation has 6 | been provided by Wayne Moore, see hyperlog.notice.html 7 | for details. Josef Spidlen ported it to C/CPP and 8 | integrated it with R/flowCore. 9 | */ 10 | 11 | #include "cpp11.hpp" 12 | #include "hyperlog.h" 13 | #include 14 | 15 | /** 16 | * Hyperlog tranform/inverse transform wrapper function, makes use of the Hyperlog 17 | * class adapted from Wayne Moore's Java Hyperlog implementation for the underlying 18 | * calculation of the transformation. 19 | **/ 20 | [[cpp11::register]] std::vector hyperlog_transform(std::vector input, double T, double W, double M, double A, bool isInverse) { 21 | unsigned nLen = input.size(); 22 | 23 | try{ 24 | Hyperlog lg = Hyperlog(T, W, M, A); 25 | for (unsigned i = 0; i < nLen; i++) { 26 | if(isInverse) 27 | input.at(i) = lg.inverse(input.at(i)); 28 | else 29 | input.at(i) = lg.scale(input.at(i)); 30 | } 31 | } 32 | catch(const char * str){ 33 | std::string tmp= "Hyperlog Exception: "; 34 | 35 | cpp11::stop(tmp.append(str)); 36 | } 37 | 38 | return(input); 39 | } 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/inPolygon.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * F. Hahne 12/10/2005 3 | */ 4 | #include "cpp11.hpp" 5 | 6 | #include 7 | 8 | 9 | 10 | /*----------------------------------------------------------------- 11 | interface to R with arguments: 12 | data : matrix of numerics 13 | vertices: matrix with vertices 14 | ------------------------------------------------------------------*/ 15 | [[cpp11::register]] std::vector inPolygon( 16 | cpp11::doubles_matrix<> data, cpp11::doubles_matrix<> vertices) { 17 | 18 | 19 | int nrd = data.nrow(); 20 | int nrv = vertices.nrow(); 21 | 22 | /* check input argument _data */ 23 | if(nrd == 0) 24 | { 25 | std::vector res(nrd, false); 26 | return(res); 27 | }else 28 | { 29 | 30 | if(data.ncol() != 2) 31 | cpp11::stop("Argument 'points' must be numeric matrix of two columns and at least\none row specifiying points on a two-dimensional plane"); 32 | 33 | if(nrv < 2 || vertices.ncol() != 2) 34 | cpp11::stop("Argument 'vertices' must be numeric matrix of two columns and at least\ntwo rows specifying vertices of a polygon on a two-dimensional plane"); 35 | 36 | /* Do it! */ 37 | vector points(nrv); 38 | for(int i = 0; i < nrv; i++) 39 | { 40 | points[i].x = vertices(i, 0); // vertices must have two columns 41 | points[i].y = vertices(i, 1); 42 | } 43 | double * xdata = REAL(data); 44 | double * ydata = xdata + nrd; 45 | INDICE_TYPE parentInd(nrd); 46 | for(int i = 0; i < nrd; i++) 47 | parentInd[i] = i; 48 | INDICE_TYPE resInd; 49 | resInd.reserve(nrd); 50 | cytolib::in_polygon(xdata, ydata, points, parentInd, false, resInd); 51 | std::vector res(nrd); 52 | for(unsigned i = 0; i < resInd.size(); i++) 53 | res[resInd[i]] = true; 54 | return(res); 55 | } 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/inPolytope.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Gopalakrishnan N 10/14/2008 3 | */ 4 | 5 | #include "cpp11.hpp" 6 | #include 7 | #include 8 | 9 | void inPolytope_c(double *data, double *A, double *b, int nRowData, int nRowA, int nColA, 10 | std::vector & result) { 11 | 12 | int i, j, k; 13 | float sigma[nRowA*nRowData]; 14 | float temp=0; 15 | 16 | for(i=0;i0) //if(sigma[i][k]>0) 37 | { 38 | result[k]=0; 39 | break; 40 | } 41 | 42 | } 43 | } 44 | 45 | 46 | } 47 | 48 | 49 | /*----------------------------------------------------------------- 50 | interface to R with arguments: 51 | data : matrix of numerics 52 | A: matrix , number of columns = number of columns of data 53 | b: matrix with 1 column,number of rows = number of rows of A 54 | ------------------------------------------------------------------*/ 55 | [[cpp11::register]] std::vector inPolytope(cpp11::doubles_matrix<> data, 56 | cpp11::doubles_matrix<> A, 57 | cpp11::doubles b) 58 | { 59 | int nRowData = data.nrow(); 60 | std::vector result(nRowData); 61 | int nRowA = A.nrow(); 62 | int nColA = A.ncol(); 63 | 64 | 65 | if(b.size()!=nRowA) 66 | cpp11::stop("Invalid argument 'b': must be a real vector of length 'nrow(A)'."); 67 | 68 | inPolytope_c(REAL(data), REAL(A), REAL(b), nRowData, nRowA, nColA, result); 69 | 70 | 71 | return result; 72 | } 73 | -------------------------------------------------------------------------------- /src/logicleTransform.cpp: -------------------------------------------------------------------------------- 1 | //#include 2 | #include "logicle.h" 3 | #include "cpp11.hpp" 4 | #include 5 | using namespace std; 6 | /** 7 | * Logicle tranform/inverse transform wrapper function, makes use of the Logicle 8 | * class provided Wayne Moore for the underlying calculation of the transformation. 9 | * 10 | * */ 11 | [[cpp11::register]] std::vector logicle_transform(std::vector input, double T, double W, double M, double A, bool isInverse) { 12 | 13 | unsigned nLen = input.size(); 14 | 15 | try{ 16 | Logicle lg = Logicle(T, W, M, A); 17 | for (unsigned i = 0; i < nLen; i++) { 18 | if(std::isnan(input.at(i))) 19 | continue; 20 | 21 | if(isInverse) 22 | input.at(i) = lg.inverse(input.at(i)/M); 23 | else 24 | input.at(i) = lg.scale(input.at(i)) * M; 25 | } 26 | } 27 | catch(const char * str){ 28 | std::string tmp= "Logicle Exception: "; 29 | tmp += "T = " + to_string(T) + ", W = " + to_string(W) + ", M = " + to_string(M) + ", A = " + to_string(A) + "\n"; 30 | cpp11::stop(tmp.append(str)); 31 | } 32 | 33 | 34 | return(input); 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/poly_centroid.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | [[cpp11::register]] cpp11::doubles_matrix<> poly_centroid( 5 | cpp11::doubles_matrix<> verts) { 6 | int nrv = verts.nrow(); 7 | if(nrv < 2 || verts.ncol() != 2) 8 | cpp11::stop("Argument 'vertices' must be numeric matrix of two columns and at least\ntwo rows specifying vertices of a polygon on a two-dimensional plane"); 9 | double area = 0.0, cx = 0.0, cy = 0.0, cross = 0.0; 10 | for(int i = 0; i < nrv; i++){ 11 | cross = (verts(i, 0)*verts((i+1) % nrv, 1) - verts((i+1) % nrv, 0)*verts(i, 1)); 12 | area += cross; 13 | cx += (verts(i, 0) + verts((i+1) % nrv, 0))*cross; 14 | cy += (verts(i, 1) + verts((i+1) % nrv, 1))*cross; 15 | } 16 | cx /= (3*area); 17 | cy /= (3*area); 18 | cpp11::writable::doubles_matrix<> centroid(1, 2); // a 1 x 2 matrix 19 | centroid(0, 0) = cx; 20 | centroid(0, 1) = cy; 21 | return centroid; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/sortBytes.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "convertRawBytes.h" 3 | 4 | /* 5 | * sort each element based on the byte order 6 | * The input is from readBin call 7 | */ 8 | [[cpp11::register]] cpp11::raws sortBytes(cpp11::raws bytes, 9 | cpp11::doubles byte_order) 10 | { 11 | 12 | 13 | int elementSize = byte_order.size(); 14 | int nTotalBytes = bytes.size(); 15 | //how many element to return 16 | int nElement = nTotalBytes / elementSize ; 17 | cpp11::writable::raws output(nTotalBytes); 18 | for(int ind = 0; ind < nElement; ind++){ 19 | for(int i = 0; i < elementSize; i++){ 20 | auto j = byte_order.at(i); 21 | 22 | int pos_old = ind * elementSize + i; 23 | int pos_new = ind * elementSize + j; 24 | output.at(pos_new) = bytes.at(pos_old);; 25 | } 26 | 27 | } 28 | return output; 29 | 30 | } 31 | 32 | -------------------------------------------------------------------------------- /src/uint2double.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * combine two uint16 (from readBin()) into one uint32 and convert it to double 3 | * so that the original uint32 value won't overflow R's INT_MAX 2^31-1 4 | * 5 | * Created on: Sept 30, 2015 6 | * Author: wjiang2 7 | */ 8 | 9 | #include 10 | #include 11 | //#include 12 | 13 | [[cpp11::register]] std::vector uint2double(std::vector input, bool isBigEndian){ 14 | unsigned nInput = input.size(); 15 | unsigned nOut = nInput/2; 16 | std::vector output(nOut); 17 | for(unsigned i = 0, j = 0; i < nInput - 1; i = i + 2, j++){ 18 | unsigned left, right; 19 | if(isBigEndian) 20 | { 21 | left = input.at(i); 22 | right = input.at(i+1); 23 | 24 | 25 | }else 26 | { 27 | left = input.at(i+1); 28 | right = input.at(i); 29 | 30 | } 31 | left = left << 16; 32 | output.at(j) = left | right; 33 | } 34 | 35 | 36 | return (output); 37 | } 38 | -------------------------------------------------------------------------------- /src/zeroin.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021 Ozette Technologies 2 | /* 3 | Header file added to flowCore by John Ramey 4 | The `R_zeroin` function used to be and is no longer apart of the R API. 5 | See the following link for more information: 6 | http://developer.r-project.org/blosxom.cgi/R-devel/2012/08/15#n2012-08-15 7 | */ 8 | #ifndef ZEROIN_H_ 9 | #define ZEROIN_H_ 10 | 11 | #include 12 | #include /* F77_... */ 13 | #include 14 | #include 15 | #include 16 | 17 | 18 | 19 | 20 | double R_zeroin(double ax, double bx, double (*f)(double, void *), void *info, double *Tol, int *Maxit); 21 | double R_zeroin2(double ax,double bx,double fa, double fb,double (*f)(double x, void *info),void *info,double *Tol,int *Maxit); 22 | #endif /* ZEROIN_H_ */ 23 | -------------------------------------------------------------------------------- /tests/testthat.R: -------------------------------------------------------------------------------- 1 | library(testthat) 2 | library(flowCore) 3 | library(flowStats) 4 | 5 | 6 | test_check("flowCore") 7 | 8 | #devtools::test("~/rglab/workspace/flowCore") 9 | -------------------------------------------------------------------------------- /tests/testthat/expectRes.new.rds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/tests/testthat/expectRes.new.rds -------------------------------------------------------------------------------- /tests/testthat/expectResults.rds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/tests/testthat/expectResults.rds -------------------------------------------------------------------------------- /tests/testthat/helper-expectResults.R: -------------------------------------------------------------------------------- 1 | library(Biobase) 2 | expectRes <- readRDS("expectResults.rds") 3 | data(GvHD) 4 | -------------------------------------------------------------------------------- /tests/testthat/ref_flowframes.rds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RGLab/flowCore/152b8e4903039aceb32e7393a98ee2dc69f89759/tests/testthat/ref_flowframes.rds -------------------------------------------------------------------------------- /tests/testthat/test-classes.R: -------------------------------------------------------------------------------- 1 | #Make sure our special generics are actually defined as generic. 2 | test_that("generics", { 3 | expect_true(isGeneric("transform")) 4 | expect_true(isGeneric("%in%")) 5 | #Actually resolve a method 6 | expect_true(hasMethod("%in%",c("flowFrame","rectangleGate"))) 7 | expect_true(hasMethod("%in%",c("flowFrame","rectangleGate"))) 8 | 9 | }) -------------------------------------------------------------------------------- /tests/testthat/test-colnames.R: -------------------------------------------------------------------------------- 1 | data(GvHD) 2 | fs <- GvHD[1:2] 3 | fr <- GvHD[[1]] 4 | 5 | test_that("change colnames separately through parameter or exprs", { 6 | expect_error(pData(parameters(fr))[["name"]][[1]] <- "A", "don't match") 7 | expect_error(colnames(exprs(fr))[1] <- "A", "unable to replace") 8 | colnames(fr@exprs)[1] <- "A" 9 | expect_error(fr[, "FSC-H"], "out of bounds") 10 | expect_error(fr[, "A"], "out of bounds") 11 | }) 12 | 13 | test_that("colnames", { 14 | channels <- c('FSC-H', 'SSC-H', 'FL1-H', 'FL2-H', 'FL3-H', 'FL2-A', 'FL4-H', 'Time') 15 | expect_equal(colnames(fr), channels) 16 | 17 | expect_equal(colnames(fs), channels) 18 | expect_equal(colnames(fr[, c(3,5)]), channels[c(3,5)]) 19 | 20 | }) 21 | 22 | test_that("colnames<-", { 23 | chnls <- c("A", "B") 24 | 25 | #update colnames for flowFrame 26 | colnames(fr)[c(1,3)] <- chnls 27 | expect_equal(colnames(fr)[c(1,3)], chnls) 28 | expect_equivalent(unlist(keyword(fr)[c("$P1N", "$P3N")]), chnls) 29 | 30 | #update fs 31 | expect_error(fs[[1]] <- fr, "don't match") 32 | 33 | #update colnames for flowSet 34 | colnames(fs)[c(1,3)] <- chnls 35 | expect_equal(colnames(fs)[c(1,3)], chnls) 36 | expect_equivalent(unlist(keyword(fs[[1]])[c("$P1N", "$P3N")]), chnls) 37 | 38 | #now [[<- succeeds 39 | newmarker <- "fsc-h" 40 | markernames(fr) <- c(A = newmarker) 41 | fs[[1]] <- fr 42 | expect_equivalent(markernames(fs[[1]])[1], newmarker) 43 | 44 | #swap cols 45 | colnames(fr)[c(1,3)] <- rev(chnls) 46 | expect_error(fs[[1]] <- fr, "don't match") 47 | 48 | }) 49 | -------------------------------------------------------------------------------- /tests/testthat/test-convertRawBytes.R: -------------------------------------------------------------------------------- 1 | context("converting raw vector to integer or numeric that has different bitwidths") 2 | origVec <- c(1:10) 3 | origVec_num <- as.numeric(c(1:10)) 4 | 5 | test_that("raw to int", { 6 | # Integer 7 | 8 | nPar <- 5 9 | nByteSize <- 4 10 | size <- rep(nByteSize, nPar) 11 | rawVec <- writeBin(origVec, raw(), size = nByteSize, endian = "little") 12 | # wrong size vec 13 | expect_error(convertRawBytes(rawVec, isInt = T, colSize = 4L, ncol = as.integer(nPar), isBigEndian = F), "length of 'colSize'", class = "error") 14 | 15 | expect_identical(origVec_num, convertRawBytes(rawVec, isInt = T, colSize = as.integer(size), ncol = as.integer(nPar), isBigEndian = F)) 16 | 17 | #byte size other than 4 18 | nByteSize <- 2 19 | size <- rep(nByteSize, nPar) 20 | rawVec <- writeBin(origVec, raw(), size = nByteSize, endian = "little") 21 | expect_identical(origVec_num, convertRawBytes(rawVec, isInt = T, colSize = as.integer(size), ncol = as.integer(nPar), isBigEndian = F)) 22 | 23 | nByteSize <- 1 24 | size <- rep(nByteSize, nPar) 25 | origVec1 <- origVec 26 | origVec1[1] <- 255L #test max uint8 27 | rawVec <- writeBin(origVec1, raw(), size = nByteSize, endian = "little") 28 | expect_identical(as.numeric(origVec1), convertRawBytes(rawVec, isInt = T, colSize = as.integer(size), ncol = as.integer(nPar), isBigEndian = F)) 29 | 30 | 31 | 32 | #big endian 33 | rawVec <- writeBin(origVec, raw(), size = nByteSize, endian = "big") 34 | expect_identical(origVec_num, convertRawBytes(rawVec, isInt = T, colSize = as.integer(size), ncol = as.integer(nPar), isBigEndian = T)) 35 | 36 | #mixed sizes 37 | size <- c(2,2,2,4,4) 38 | rawVec1 <- writeBin(origVec[c(1:3,6:8)], raw(), size = 2, endian = "little") 39 | rawVec2 <- writeBin(origVec[c(4:5,9:10)], raw(), size = 4, endian = "little") 40 | rawVec <- c(rawVec1[1:6], rawVec2[1:8], rawVec1[7:12], rawVec2[9:16]) 41 | expect_identical(origVec_num, convertRawBytes(rawVec, isInt = T, colSize = as.integer(size), ncol = as.integer(nPar), isBigEndian = F)) 42 | 43 | 44 | }) 45 | 46 | test_that("raw to numeric", { 47 | # double 48 | 49 | nPar <- 5 50 | nByteSize <- 8 51 | size <- rep(nByteSize, nPar) 52 | rawVec <- writeBin(origVec_num, raw(), size = nByteSize, endian = "little") 53 | expect_identical(origVec_num,convertRawBytes(rawVec, isInt = F, colSize = as.integer(size), ncol = as.integer(nPar), isBigEndian = F)) 54 | 55 | #big endian 56 | rawVec <- writeBin(origVec_num, raw(), size = nByteSize, endian = "big") 57 | expect_identical(origVec_num,convertRawBytes(rawVec, isInt = F, colSize = as.integer(size), ncol = as.integer(nPar), isBigEndian = T)) 58 | 59 | nByteSize <- 4 60 | size <- rep(nByteSize, nPar) 61 | rawVec <- writeBin(origVec_num, raw(), size = nByteSize, endian = "little") 62 | expect_identical(origVec_num,convertRawBytes(rawVec, isInt = F, colSize = as.integer(size), ncol = as.integer(nPar), isBigEndian = F)) 63 | 64 | 65 | 66 | }) 67 | -------------------------------------------------------------------------------- /tests/testthat/test-filter.R: -------------------------------------------------------------------------------- 1 | test_that("filter", { 2 | set.seed(123) 3 | ## create the data to be used 4 | ## these are three interesting wells from a BD FACS CAP(TM) plate 5 | ## with PBMS (perpheral blood monocytes) on the plate 6 | b08 = read.FCS(system.file("extdata","0877408774.B08",package="flowCore"),transformation="scale") 7 | e07 = read.FCS(system.file("extdata","0877408774.E07",package="flowCore"),transformation="scale") 8 | f06 = read.FCS(system.file("extdata","0877408774.F06",package="flowCore"),transformation="scale") 9 | 10 | filter1 = rectangleGate("FSC-H"=c(.2,.8),"SSC-H"=c(0,.8)) 11 | 12 | b08.result1 = filter(b08,filter1) 13 | expect_is(b08.result1, "filterResult") 14 | expect_equal(sum(b08 %in% filter1), 8291) 15 | 16 | e07.result1 = filter(e07,filter1) 17 | expect_equal(sum(e07 %in% filter1), 8514) 18 | 19 | f06.result1 = filter(f06,filter1) 20 | expect_equal(sum(f06 %in% filter1), 8765) 21 | 22 | 23 | }) 24 | 25 | -------------------------------------------------------------------------------- /tests/testthat/test-fr-methods.R: -------------------------------------------------------------------------------- 1 | context("flowFrame methods...") 2 | data("GvHD") 3 | fr <- GvHD[[1]] 4 | 5 | test_that("flowFrame constructor", { 6 | mat <- matrix(1:30,ncol = 3, dimnames = list(NULL, letters[1:3])) 7 | fr <- flowFrame(mat) 8 | markernames(fr)[1] <- "A" 9 | expect_equal(markernames(fr)[1] , c(a = "A")) 10 | }) 11 | test_that("range", { 12 | rng1 <- data.frame("FSC-H" = c(0,1023) 13 | ,"SSC-H" = c(0,1023) 14 | ,"FL1-H" = c(1,10000) 15 | ,"FL2-H" = c(1,10000) 16 | ,"FL3-H" = c(1,10000) 17 | ,"FL2-A" = c(0,1023) 18 | ,"FL4-H" = c(1,10000) 19 | ,"Time" = c(0,1023) 20 | , row.names = c("min", "max") 21 | , check.names = FALSE 22 | ) 23 | expect_equal(range(fr), rng1) 24 | 25 | expect_equal(range(fr, "instrument"), rng1) 26 | 27 | expect_equal(range(fr, type = "instrument"), rng1) 28 | 29 | expect_error(range(fr, "FSC-H"), "only accept two") 30 | 31 | rng2 <- data.frame("FSC-H" = c(59,1023) 32 | ,"SSC-H" = c(6,1023) 33 | ,"FL1-H" = c(1,10000) 34 | ,"FL2-H" = c(1.000,9221.666) 35 | ,"FL3-H" = c(1.000,1131.784) 36 | ,"FL2-A" = c(0,1023) 37 | ,"FL4-H" = c(1,1162.77) 38 | ,"Time" = c(1, 755) 39 | , row.names = c("min", "max") 40 | , check.names = FALSE 41 | ) 42 | expect_equal(range(fr, type = "data") ,rng2, tolerance = 4e-7) 43 | expect_equal(range(fr, "data") ,rng2, tolerance = 4e-7) 44 | expect_error(range(fr, "FSC-H", type = "data"), "only accept two") 45 | 46 | #swap cols of fr 47 | origcol <- colnames(fr) 48 | colnames(fr@exprs)[7:8] <- origcol[8:7] 49 | rg <- as.matrix(range(fr, "data")[7:8]) 50 | rownames(rg) <- NULL 51 | expect_equal(apply(exprs(fr)[,7:8], 2, range), rg) 52 | }) 53 | 54 | test_that("fr_remove_redundant_pnx_kw", { 55 | 56 | expect_equal(length(keyword(fr[,c(1:6,8)])), length(keyword(fr[,-7]))) 57 | 58 | }) 59 | 60 | 61 | test_that("fr_append_cols", { 62 | 63 | n <- matrix(1:(nrow(fr)), ncol = 1) 64 | colnames(n) <- "A" 65 | m <- matrix(1:(2*nrow(fr)), ncol = 2) 66 | colnames(m) <- c("B", "C") 67 | 68 | # Add single column and make sure min/max keywords set appropriately 69 | fr_plus <- fr_append_cols(fr, n) 70 | key_range <- keyword(fr_plus)[c("flowCore_$P9Rmin", "flowCore_$P9Rmax")] 71 | expect_equal(unname(unlist(key_range)), range(n[,"A"])) 72 | 73 | # Add multiple columns 74 | fr_plus <- fr_append_cols(fr, m) 75 | key_range <- keyword(fr_plus)[c("flowCore_$P9Rmin", "flowCore_$P9Rmax")] 76 | expect_equal(unname(unlist(key_range)), range(m[,"B"])) 77 | key_range <- keyword(fr_plus)[c("flowCore_$P10Rmin", "flowCore_$P10Rmax")] 78 | expect_equal(unname(unlist(key_range)), range(m[,"C"])) 79 | 80 | }) 81 | -------------------------------------------------------------------------------- /tests/testthat/test-markernames.R: -------------------------------------------------------------------------------- 1 | data(GvHD) 2 | fs <- GvHD[1:2] 3 | fr <- GvHD[[1]] 4 | 5 | test_that("markernames", { 6 | markers <- c('CD15 FITC','CD45 PE','CD14 PerCP','CD33 APC') 7 | expect_equivalent(markernames(fr), markers) 8 | 9 | expect_equivalent(markernames(fs), markers) 10 | 11 | markers.new <- c("15", "14") 12 | names(markers.new) <- c("FL1-H", "FL3-H") 13 | markernames(fs[[1]]) <- markers.new 14 | 15 | expect_warning(res <- markernames(fs), "not consistent") 16 | expect_equal(unique(fsApply(fs, markernames, simplify = FALSE)), res) 17 | }) 18 | 19 | test_that("markernames<-", { 20 | chnls <- c("FL1-H", "FL3-H") 21 | markers <- c("CD15", "CD14") 22 | names(markers) <- chnls 23 | #invalid type 24 | expect_error(markernames(fr) <- data.frame(name = chnls, desc = markers) , "named character") 25 | 26 | #update markers for flowFrame 27 | markernames(fr) <- markers 28 | expect_equivalent(markernames(fr)[c(1,3)], markers) 29 | expect_equivalent(unlist(keyword(fr)[c("$P3S", "$P5S")]), markers) 30 | 31 | #update markers for flowSet 32 | markernames(fs) <- markers 33 | expect_equivalent(markernames(fs)[c(1,3)], markers) 34 | expect_equivalent(unlist(keyword(fr)[c("$P3S", "$P5S")]), markers) 35 | 36 | #incorrect channel name 37 | names(markers)[1] <- "FL1" 38 | expect_error(markernames(fr) <- markers , "not found") 39 | 40 | #NA value in names 41 | names(markers)[1] <- NA 42 | expect_error(markernames(fr) <- markers , "not found") 43 | 44 | #not named character 45 | names(markers) <- NULL 46 | expect_error(markernames(fr) <- markers , "named character") 47 | 48 | 49 | }) 50 | -------------------------------------------------------------------------------- /tests/testthat/test-sortBytes.R: -------------------------------------------------------------------------------- 1 | context("sort bytes that are stored as mixed endian") 2 | origVec <- c(1:10) 3 | origVec_num <- as.numeric(c(1:10)) 4 | 5 | test_that("raw to int", { 6 | # Integer 7 | 8 | 9 | nByteSize <- 4 10 | rawVec <- writeBin(origVec, raw(), size = nByteSize, endian = "little") 11 | byte_order <- c(3,2,0,1) 12 | 13 | expect_equal(sortBytes(rawVec, byte_order), sortBytes1(rawVec, byte_order)) 14 | }) 15 | --------------------------------------------------------------------------------