View source: R/sequence-adapters.R
| prepare_gp3tools_sequences | R Documentation |
This optional compatibility helper recognises ordinary data frames or lists containing a data-frame component and maps common sequence-column names to the neutral gp3sequences contract. It does not require a gp3tools class.
prepare_gp3tools_sequences(
data,
sequence_id_col = NULL,
order_col = NULL,
state_col = NULL,
duration_col = NULL,
metadata_cols = NULL,
...
)
data |
A data frame or list with a data-frame |
sequence_id_col, order_col, state_col |
Optional explicit mappings. |
duration_col |
Optional duration mapping. |
metadata_cols |
Optional constant-within-sequence metadata columns. |
... |
Additional arguments passed to |
A standard gp3sequences preparation result.
sequences <- data.frame(
sequence_id = rep(c("s1", "s2", "s3", "s4"), each = 4L),
sequence_order = rep(1:4, times = 4L),
state = c("A", "B", "C", "D", "A", "B", "C", "C",
"D", "C", "B", "A", "D", "C", "A", "A"),
group = rep(c("g1", "g2"), each = 8L),
stringsAsFactors = FALSE
)
names(sequences)[names(sequences) == "sequence_order"] <- "position"
names(sequences)[names(sequences) == "state"] <- "aoi_label"
prepare_gp3tools_sequences(sequences)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.