Description Usage Arguments Details Note See Also Examples
Merge additional information about the sample conditions into a chromatogram.
1 2 3 4 5 | annotate_chromatogram(chr_data, sample_info)
list_IDs(chr_data)
create_annotation(chr_data, Sample = NULL, ...)
|
chr_data |
Chromatogram data imported via |
sample_info |
Sample information data frame. |
Sample |
Obligatory |
... |
Additional columns for the sample information data frame. |
UNICORN sometimes codes sample information into file names using a funny
naming scheme. In such cases, adding sample information during import via
read_unicorn
is not straightforward. An easier approach is to parse
the data without sample names, list sample IDs, build a data frame
accordingly, and finally merge it with the chromatogram.
The information is supplied in a data frame called sample_info
. This
data frame must have at least two columns: ID
and Sample
(case
sensitive). Merging is done based on the ID
column. Sample
and
all other columns are added accordingly. Missing ID
s in
sample_info
get an NA
as a sample name but this is reported as
as warning.
This function may overwrite some of the annotation from chromatogram
data if sample_names
was already used during import via
read_unicorn
. All other columns are be added accordingly.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
chr_data <- read_unicorn("Chromatogram.xls")
list_IDs(chr_data)
# ID
# 1 Manual run 10:1
# 2 Manual run 10:5
# 3 Manual run 10:3
sample_info <- create_annotation(
chr_data,
Sample = c("Negative control", "Positive control", "Test"),
Run = c(1, 2, 3))
annotate_chromatogram(chr_data, sample_info)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.