set_parents | R Documentation |
Given a list of jellyfish input tables and a named list of parents for each sample, set the parent for each sample.
set_parents(tables, parents, unset_missing = FALSE)
tables |
A list of tables (samples, phylogeny, compositions, ranks) |
parents |
A named list of parents for each sample. Keys are the samples and values are their new parents |
unset_missing |
If TRUE, unset the parent for samples that are not in the parent list |
By default, all samples that have no explicit parent are children of the
inferred root sample. You can customize the parent-child relationships by
modifying the parent
column in the samples
data frame before plotting.
You can also modify the relationships using the set_parents
function.
For example, if you have three samples, A, B, and C, they will have the following relationships by default:
Root / | \ A B C
With the explicit parents, you can customize the relationships:
tables |> set_parents(list( # The parent of C is B C = "B" ) |> jellyfisher()
Root / \ A B \ C
A list of tables with parents set for each sample
jellyfisher_example_tables |>
select_patients("EOC809") |>
set_parents(list("EOC809_r1Bow1_DNA1" = "EOC809_p2Per1_cO_DNA2")) |>
jellyfisher()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.