Joins a list of trees/networks as AntibodyForests into a single AntibodyForests object. The resulting network will include all joined networks as separate components. Useful for faster downstream analyses (e.g., node metrics via AntibodyForests_metrics on this object instead on each separate object, plotting multiple trees in the same plot, etc.,)

AntibodyForests_join_trees(tree.list, join.per, join.method)

Arguments

tree.list

(nested) list of AntibodyForests objects, as obtained from the AntibodyForests function.

join.per

string - 'sample' joins the objects per sample if the input is a nested list of AntibodyForests objects, resulting in a single joined graph per sample, 'global' joins all graphs in the nested list into a single object.

join.method

string - networks, especially minimum spanning trees, can be joined into a single connected graph if join.method = 'single.germline' (will pick a single germline from all available germlines and will recalculate the string distance) or 'multiple.germlines.joined' (will add inter-germline edges). Will create a single object with disconnected subgraph if join.method = 'multiple.germlines'.

Value

single AntibodyForests object consisting of the joined graphs/trees. Resulting graph can be either a single connected component (if join.method = 'single.germline' or 'multiple.germlines.joined') or multiple disconnected subgraphs (join.method = 'multiple.germlines').

Examples

if (FALSE) {
AntibodyForests_join_trees(tree.list, join.per = 'sample', join.method = 'multiple.germlines')
}