A generic function for plotting the background and foreground values.

plot_FB(
  df,
  antigen_name = "antigen",
  bg_MFI = "BG_Median",
  FG_MFI = "FBG_Median",
  log_mfi = FALSE
)

Arguments

df

An object containing the data to which the plot is done.

antigen_name

The variable describing which features/proteins/ antibodies in the data should be used to plot

bg_MFI

A numeric variable describing which is the background MFI

FG_MFI

A numeric variable describing which is the foreground MFI

log_mfi

a logical value indicating whether the MFI values should be log transformed or not.

Value

a ggplot of foreground vs background MFI values

Details

Plot foreground and background values

Examples

## Not run:
#After extracting the background using \code{\link{extract_bg}} 
#we plot the data using
allData_bg <- readr::read_csv(system.file("extdata", 
"bg_example.csv", package="protGear"))
#> Rows: 126 Columns: 6
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (2): sampleID, antigen
#> dbl (4): Block, FBG_Median, BG_Median, replicate
#> 
#>  Use `spec()` to retrieve the full column specification for this data.
#>  Specify the column types or set `show_col_types = FALSE` to quiet this message.
plot_FB(allData_bg,
antigen_name = "antigen",
bg_MFI = "BG_Median", FG_MFI = "FBG_Median", log = FALSE
)

## End(Not run)