View source: R/ifcb_psd_plot.R
ifcb_psd_plot | R Documentation |
This function generates a plot for a given sample from Particle Size Distribution (PSD) data and fits from Imaging FlowCytobot (IFCB).
The PSD data and fits can be generated by ifcb_psd
(Hayashi et al. in prep).
ifcb_psd_plot(sample_name, data, fits, start_fit)
sample_name |
The name of the sample to plot in DYYYYMMDDTHHMMSS. |
data |
A data frame containing the PSD data (data output from |
fits |
A data frame containing the fit parameters for the power curve (fits output from |
start_fit |
The x-value threshold below which data should be excluded from the plot and fit. |
A ggplot object representing the PSD plot for the sample.
Hayashi, K., Walton, J., Lie, A., Smith, J. and Kudela M. Using particle size distribution (PSD) to automate imaging flow cytobot (IFCB) data quality in coastal California, USA. In prep.
ifcb_psd
https://github.com/kudelalab/PSD
## Not run:
#' # Initialize a python session if not already set up
ifcb_py_install()
# Analyze PSD
psd <- ifcb_psd(feature_folder = 'path/to/features',
hdr_folder = 'path/to/hdr_data',
save_data = TRUE,
output_file = 'psd/svea_2021',
plot_folder = NULL,
use_marker = FALSE,
start_fit = 13,
r_sqr = 0.5,
beads = 10 ** 9,
bubbles = 150,
incomplete = c(1500, 3),
missing_cells = 0.7,
biomass = 1000,
bloom = 5,
humidity = NULL)
# Plot PSD of the first sample
plot <- ifcb_psd_plot(sample_name = "D20230316T101514",
data = psd$data,
fits = psd$fits,
start_fit = 10)
# Inspect plot
print(plot)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.