Generates a list of various counts of the major elements that comprise a nexml object, such as number of different kinds of blocks, characters, states, OTUs (taxa), etc.
Usage
# S4 method for class 'nexml'
summary(object)
Arguments
- object
the nexml object
Value
A list with the following elements:
nblocks
the number of trees, otus, and characters blocksncharacters
the number of characters in each characters blocknstates
summary statistics of the number of character states per state set defined for each characters blocknnonstdstatedefs
the number of polymorphic and uncertain states defined for each character blocknmatrixrows
the number of rows in the matrix for each character blockntrees
the number of trees contained in each trees blocknotus
the number of OTUs defined in each OTUs blocknmeta
a list of the number of the number of metadata annotations at several levels, specifically:nexml
at the top (nexml) levelotu
at the OTU level, for each OTUs blockchar
at the character level, for each characters blockstate
at the character state level, for each characters block
Details
The show method uses this summary for pretty-printing a summary of the NeXML object, but it can be used on its own as well, in particular for quick inspection of key properties of a NeXML file.
Examples
nex <- nexml_read(system.file("examples", "comp_analysis.xml", package = "RNeXML"))
s <- summary(nex)
# number of major blocks:
s$nblocks
#> trees otus characters
#> 1 1 2
# each characters block defines 1 character:
s$ncharacters
#> block.1 block.2
#> 1 1
# summary stats of states per character (for morphological matrices there is
# typically one state set per character)
s$nstates # note that first block is of continuous type, so no stats there
#> block.1 block.2
#> Min. NA 2
#> 1st Qu. NA 2
#> Median NA 2
#> Mean NA 2
#> 3rd Qu. NA 2
#> Max. NA 2
# pretty-printed summary:
nex # this is the same as show(nex)
#> A nexml object representing:
#> 1 phylogenetic tree block(s), where:
#> block 1 contains 1 phylogenetic tree(s)
#> 2 character block(s), where:
#> block 1 defines 1 continuous character(s)
#> matrix 1 has 10 row(s)
#> block 2 defines 1 standard/discrete character(s), with 2 states each
#> and 0 polymorphic or uncertain state(s) defined
#> matrix 2 has 10 row(s)
#> 10 taxonomic units in 1 block(s)
#> Taxa: taxon_1, taxon_2, taxon_3, taxon_4, taxon_5, taxon_6 ...
#> Metadata annotations:
#> 2 at top level
#> 0 in block 1 at otu level
#> 0 in block 1 at char level
#> 0 in block 2 at char level
#> 0 in block 1 at state level
#> 0 in block 2 at state level
#>
#> Author(s): rvosa
#>
#> NeXML generated by Bio::Phylo::Project v.0.56 using schema version: 0.9
#> Size: 289.3 Kb