Learn R Programming

treeDbalance (version 1.2.0)

qsm2phylo3D: Convert QSM format to a phylo3D object

Description

qsm2phylo3D - Wrapper function that converts the output .mat-file of the software treeQSM (version 2.0 or 2.4.x) to a rooted tree in phylo3D format.

qsmList2phylo3D - Converts a list containing QSM data to a rooted tree in phylo3D format.

Usage

qsm2phylo3D(file, version = "2.4.x", setConnection2zero = TRUE)

qsmList2phylo3D(qsm_list, setConnection2zero = TRUE)

Value

qsm2phylo3D(file) A rooted tree in phylo3D format.

qsmList2phylo3D(qsmList) A rooted tree in phylo3D format.

Arguments

file

File name (with path if not located in working directory), e.g.:
"C:/...path.../myMatlabQSMfile.mat"

version

Specifies the version of the treeQSM .mat-file. Available are
- "2.0" for version 2.0 and - "2.4.x" for version 2.4.1 and 2.4.2.

setConnection2zero

Logical value (default TRUE) indicating if the width of the edges, which connect two consecutive cylinders, should be set to zero. If FALSE, then the radius is set to the radius of the "child" cylinder.

qsm_list

List containing the QSM-data, with the attributes "radius", "length", "start", "axis", "parent" and "extension".

Author

Sophie Kersting

Examples

Run this code
mat_file <- system.file("extdata", "exampleQSM.mat",
  package = "treeDbalance"
)
new_phylo <- qsm2phylo3D(file = mat_file)
new_phylo <- qsmList2phylo3D(NULL)

Run the code above in your browser using DataLab