Description Usage Arguments Value See Also Examples
This constructor creates an object of class ''mtree'', which represents a mutation tree. The tree is created from a set of binary clusters computed for a patient, here a cluster is defined as the set of alterations (e.g., mutations) that are detected as present or absent in the same set of sequenced biopsies.
To create a tree a list of drivers can be provided to be annotated to an input set of binary clusters. There are a minimum amount of information and formatting fields that are required for tree construction to operate successfully. Please refer to the package vignette and the provided input datasets for more instructions.
1 2 3 |
binary_clusters |
Clusters of Cancer Cell Fractions available in the data of this patient. See the package vignette to see the format in which this should be specified. |
drivers |
A list of driver events that should be annotated to each one of the input clusters contained in the 'CCF_clusters' parameter. See the package vignette to see the format in which this should be specified. |
samples |
A vector of samples names (e.g., the biopsies sequenced for this patient). |
patient |
A string id that represent this patient. |
M |
The adjacency matrix defined to connect all the nodes of this tree. |
score |
A scalar score that can be associated to this tree. |
annotation |
Any string annotation that one wants to add to this 'ctree'. This will be used by some of the plotting functions that display 'ctree' objects. |
evaluation |
How Suppes conditions should be evaluated ('>=' or '>'). |
An object of class "mtree"
that represents this tree.
This function requires the input tree to be specified in the
format of an adjacency matrix; plese see function mtrees
if you
need to create de novo also the adjacency matrices that fit your data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | data(mtree_input)
x = mtrees(
mtree_input$binary_clusters,
mtree_input$drivers,
mtree_input$samples,
mtree_input$patient,
mtree_input$sspace.cutoff,
mtree_input$n.sampling,
mtree_input$store.max
)
x = x[[1]]
# Adj matrix inside of the objects, we remove the GL
# entry that is added as fake root by ctree
M = x$adj_mat
M = M[rownames(M) != 'GL', colnames(M) != 'GL']
print(M)
# Manual construction
y = mtree(
mtree_input$binary_clusters,
mtree_input$drivers,
mtree_input$samples,
mtree_input$patient,
M,
score = 123456,
annotation = paste0("Some mutation tree")
)
# The same
print(x)
print(y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.