Phylo/Matrices/Characters.pm

filter: Statementstmt 70.3% 19 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 8 / 10 Podpod 100% 1 / 1 totaltotal 73.6% 28 / 38 CC 2 SCAR 6.9
CC
2
Cov
70%
to_xml
6.0
_container
2.0
BEGIN
1.0
CRAP 2.0
« Phylo/PhyloWS/Resource/Description.pm ↑ Summary Phylo/Util/OptionalInterface.pm »
1 package Bio::Phylo::Matrices::Characters;
2 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 11 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 11 ▶use base 'Bio::Phylo::Matrices::TypeSafeData';
Subroutine BEGIN: called CC=1 SCAR=0.0
5 11 ▶use Bio::Phylo::Util::CONSTANT qw'_CHARACTERS_ _NONE_';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 11 ▶use Bio::Phylo::Factory;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 Bio::Phylo::Matrices::Characters - Container of character objects
11  
12 =head1 SYNOPSIS
13  
14 # No direct usage
15  
16 =head1 DESCRIPTION
17  
18 Objects of this type hold a list of L<Bio::Phylo::Matrices::Character> objects,
19 i.e. columns in a matrix. By default, a matrix will be initialized to hold
20 one object of this type (which can be retrieved using $matrix->get_characters).
21 Its main function is to facilitate NeXML serialization of matrix objects, though
22 this may expand in the future.
23  
24 =head1 METHODS
25  
26 =head2 SERIALIZERS
27  
28 =over
29  
30 =item to_xml()
31  
32 Serializes characters to nexml format.
33  
34 Type : Format convertor
35 Title : to_xml
36 Usage : my $xml = $characters->to_xml;
37 Function: Converts characters object into a nexml element structure.
38 Returns : Nexml block (SCALAR).
39 Args : NONE
40  
41 =cut
42  
43 0 ▶sub to_xml {
Subroutine to_xml: not called CC=2 SCAR=17.9
Pod documented
44 0 my $self = shift;
45 0 my $xml = '';
46 0 for my $ent ( @{ $self->get_entities } ) {
47 0 $xml .= $ent->to_xml;
48 }
49 0 $xml .= $self->sets_to_xml;
50 0 return $xml;
51 }
52 68 ▶sub _validate { 1 }
Subroutine _validate: called CC=1 SCAR=0.0
53 0 ▶sub _container { _NONE_ }
Subroutine _container: not called CC=1 SCAR=6.9
54 499 ▶sub _type { _CHARACTERS_ }
Subroutine _type: called CC=1 SCAR=0.0
55 9 ▶sub _tag { 'chars' }
Subroutine _tag: called CC=1 SCAR=0.0
56  
57 =back
58  
59 =cut
60  
61 # podinherit_insert_token
62  
63 =head1 SEE ALSO
64  
65 There is a mailing list at L<https://groups.google.com/forum/#!forum/bio-phylo>
66 for any user or developer questions and discussions.
67  
68 =over
69  
70 =item L<Bio::Phylo::Matrices::TypeSafeData>
71  
72 This object inherits from L<Bio::Phylo::Matrices::TypeSafeData>, so the
73 methods defined therein are also applicable to characters objects
74 objects.
75  
76 =item L<Bio::Phylo::Manual>
77  
78 Also see the manual: L<Bio::Phylo::Manual> and L<http://rutgervos.blogspot.com>.
79  
80 =back
81  
82 =head1 CITATION
83  
84 If you use Bio::Phylo in published research, please cite it:
85  
86 B<Rutger A Vos>, B<Jason Caravas>, B<Klaas Hartmann>, B<Mark A Jensen>
87 and B<Chase Miller>, 2011. Bio::Phylo - phyloinformatic analysis using Perl.
88 I<BMC Bioinformatics> B<12>:63.
89 L<http://dx.doi.org/10.1186/1471-2105-12-63>
90  
91 =cut
92  
93 11 1;
« Phylo/PhyloWS/Resource/Description.pm ↑ Summary Phylo/Util/OptionalInterface.pm »