ap_agresults | R Documentation |
Plot beeswarm, density and frequency plots for each antigen.
Based on output from Autoimmunity Profiling wrapper function ap_norm2()
.
ap_agresults( x, samplegroups = NULL, groupcolors = 2:6, agtoplot = NULL, percdec = 1, cofisher = 0.05, shouldpdf = TRUE, filename = "AntigenResults.pdf", height = 18, useDingbats = FALSE, check.names = FALSE )
x |
list with at least nine elements, see Deatils for naming and content. |
samplegroups |
factor vector of groupings. NB! Do not include . (period) in names.
Only samples with an assigned level are included in plots.
If left as |
groupcolors |
A matrix or data.frame with a column named "group" with group names and a column named "color" with a color for each group (one row per group, ie. factor level). Alternatively, a vector with colors (will be assigned to the factor levels in order). |
agtoplot |
indices for which antigens to plot, default is all. Character vector with column names of what to plot also ok. |
percdec |
integer indicating the number of decimal places in percentage value. |
cofisher |
Cutoff in fisher plot. |
shouldpdf |
Logical, should it plot to pdf? |
filename |
string with filename and desired path, end with .pdf |
height |
height for pdf, see |
useDingbats |
logical, altered default from |
check.names |
logical, altered default from |
the x list needs to include at least the element
MADs = assay MADs,
SCORE = scored data
BINARY = list with one data.frame per cutoff,
BINARY_CO = binary table based on antigen specific cutoffs.
ANTIGEN_CUTOFFS = calculated antigen specific cutoffs, translated into the descrete cutoff steps,
CUTOFF_KEY = cutoff key as data.frame with cutoff values, scores and colors.
SAMPLES = sample info. Including column "sample_name" with sample names, preferably LIMS-IDs, where replicates (named with one of pool|rep|mix|commercial) and blanks (named with one of empty|blank|buffer) are also stated, If any wells should be excluded then these should be annotated in a column called "Filtered". Any samples with no text (ie. "" or NA) in such column will be included.
BEADS = beads info, if any should be excluded then these should be annotated in a column called "Filtered". Any beads with no text (ie. "" or NA) will be included in the transformation.
DENS = Density output used for cutoff selection,
Note: The function plots to a layout containing up to 16 areas.
A list with the elements (output from ap_reactsummary2()
)
SAMPLEGROUPS = annnotation of which group each sample has been assigned,
REACTSUM_AG = number of reactive samples per antigen and sample group,
REACTFREQ_AG = reactivity frequency per antigen and sample group,
REACTSUM_SAMP = number of reactive antigens per sample,
REACTFREQ_SAMP = reactivity frequency per sample,
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.