项目作者: yannabraham

项目描述 :
A ggplot2 implementation of fan plots
高级语言: R
项目地址: git://github.com/yannabraham/cytofan.git
创建时间: 2018-07-20T15:21:09Z
项目社区:https://github.com/yannabraham/cytofan

开源协议:

下载


cytofan

R-CMD-check
CRAN_Release_Badge
CRAN_Download_Badge
DOI

cytofan implements the concept of fan plots (Britton, E.; Fisher, P.
& J. Whitley (1998) The Inflation Report Projections: Understanding the
Fan
Chart
)
for cytometry data in ggplot2.

The cytofan package was implemented following up on a
gist written
shortly after the fanplot
package was released. Compared to
ggfan, cytofan uses
categorical data as input on the x axis.

Installation

You can install cytofan from github with:

  1. # install.packages("devtools")
  2. devtools::install_github("yannabraham/cytofan")

Example

cytofan can be used to visualize differences between populations
identifed using mass cytometry:

  1. library(cytofan)
  2. #> Loading required package: ggplot2
  3. library(bodenmiller)
  4. library(dplyr)
  5. #>
  6. #> Attaching package: 'dplyr'
  7. #> The following objects are masked from 'package:stats':
  8. #>
  9. #> filter, lag
  10. #> The following objects are masked from 'package:base':
  11. #>
  12. #> intersect, setdiff, setequal, union
  13. library(tidyr)
  14. data("refPhenoMat")
  15. data("refAnnots")
  16. bind_cols(refAnnots,
  17. as.data.frame(refPhenoMat)) %>%
  18. filter(Cells %in% c('cd4+','cd8+','igm+','igm-')) %>%
  19. gather("Channel","value",
  20. any_of(colnames(refPhenoMat))) %>%
  21. ggplot(aes(x=Channel,y=value))+
  22. geom_fan()+
  23. facet_grid(Cells~.)