PlotRawSingle {QuICSeedR}R Documentation

Plot a Single Sample from the Cleaned Raw Data

Description

The function plots fluorescence for selected sample over time.

Usage

PlotRawSingle(
  raw,
  sample,
  legend_position = "topleft",
  xlim = NULL,
  ylim = NULL,
  custom_colors = NULL,
  xlab = "Time (h)",
  ylab = "Fluorescence",
  linetypes = NULL
)

Arguments

raw

Cleaned raw data. Output from GetCleanRaw

sample

The name of the sample to plot.

legend_position

Position of legend. Default is "topleft".

xlim

Numeric vector giving the x coordinate range (hours). If NULL (default), limits are computed from the data. Choose from "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center".

ylim

Numeric vector giving the y coordinate range (relative fluorescence units). If NULL (default), limits are computed from the data.

custom_colors

An optional vector of colors to be used for plotting. If NULL (default), the function will use the original color scheme.

xlab

Label for x-axis.

ylab

Label for y-axis.

linetypes

Vector of line types to use for each line. Can be integer codes (1:6) or character codes ("solid", "dashed", "dotted", "dotdash", "longdash", "twodash"). All lines will be solid by default.

Value

A plot displaying the fluorescence of the selected sample over time.

Examples

# Define the path to the plate data file
plate_path <- system.file("extdata/20240716_p3", 
                          file = '20240716_p3_plate.xlsx', 
                          package = "QuICSeedR")
  
# Read the plate data
plate <- readxl::read_xlsx(plate_path)

# Define the path to the raw data file
raw_path <- system.file("extdata/20240716_p3", 
                        file = '20240716_p3_raw.xlsx', 
                        package = "QuICSeedR")
# Read the raw data
raw <- readxl::read_xlsx(raw_path)

# Get replicate data
replicate <- GetReplicate(plate)

# Ensure time displayed as decimal hours
plate_time = ConvertTime(raw)

#Get metadata and display the few rows 
meta = CleanMeta(raw, plate, replicate)

#Clean data 
cleanraw <- CleanRaw(meta, raw, plate_time)

#Plot fluorescence curves from positive controls
PlotRawSingle(cleanraw, "Pos")


[Package QuICSeedR version 0.1.2 Index]