Created
April 5, 2018 01:38
-
-
Save soh-i/6735bcbdc726272129ebb996f7096aab to your computer and use it in GitHub Desktop.
Plotting gated FACS data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(ggplot2) | |
| library(RColorBrewer) | |
| d <- read.csv('BC4-R1-1.fcs_spill_applied_AID_BC_Cell_P1.txt', sep='\t', header=T, skip=1) | |
| names(d) <- c('Event', 'FSC', 'SCC', 'FITC') | |
| myPalette <- colorRampPalette(rev(brewer.pal(11, "Spectral")), space="Lab") | |
| g <- ggplot(d, aes(y=FSC, x=FITC)) + | |
| geom_hex(bins=128) + | |
| scale_x_continuous(trans=logiclescale::logicle_trans()) + | |
| scale_fill_gradientn(colours=myPalette(10)) + | |
| theme_bw() + | |
| labs(x='GFP', y='FSC-A') + | |
| ylim(0, 200000) | |
| ggsave(plot=g, filename='BC4-R1-1.pdf', h=5, w=5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment