lib/Pheno/Ranker/Compare.pm

filter: Statementstmt 100% 55 / 55 Branchbran 100% 2 / 2 Conditioncond 50.0% 3 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 100% 19 / 19 Podpod 0.0% 0 / 6 totaltotal 86.8% 79 / 91 CC 5 SCAR 3.0
CC
5
Cov
95%
remap_hash
2.0
compare_and_rank
2.0
create_glob_and_ref_hashes
2.0
CRAP 1.4
« lib/Pheno/Ranker/Compare/Ontology.pm ↑ Summary lib/Pheno/Ranker/Context.pm »
1 package Pheno::Ranker::Compare;
2  
3 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 8 ▶use autodie;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 8 ▶use Pheno::Ranker::Compare::Alignment qw(create_alignment recreate_array);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 use Pheno::Ranker::Compare::Encoding
8 8 ▶ qw(create_binary_digit_string binary_to_base64 _base64_to_binary);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 8 ▶use Pheno::Ranker::Compare::Matrix qw(cohort_comparison);
Subroutine BEGIN: called CC=1 SCAR=0.0
10 8 ▶use Pheno::Ranker::Compare::Ontology qw(parse_hpo_json);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 8 ▶use Pheno::Ranker::Compare::Prepare ();
Subroutine BEGIN: called CC=1 SCAR=0.0
12 use Pheno::Ranker::Compare::Prune
13 8 ▶ qw(prune_excluded_included set_excluded_phenotypicFeatures prune_keys_with_weight_zero);
Subroutine BEGIN: called CC=1 SCAR=0.0
14 8 ▶use Pheno::Ranker::Compare::Rank ();
Subroutine BEGIN: called CC=1 SCAR=0.0
15 8 ▶use Pheno::Ranker::Compare::Remap qw(add_id2key guess_label);
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 8 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
18 8 our @EXPORT =
19 qw(check_format cohort_comparison compare_and_rank create_glob_and_ref_hashes randomize_variables remap_hash create_binary_digit_string parse_hpo_json);
20  
21 8 ▶use constant DEVEL_MODE => 0;
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 8 our %nomenclature = ();
24  
25 1 ▶sub add_hpo_ascendants {
Subroutine add_hpo_ascendants: called CC=1 SCAR=0.0
Pod undocumented
26 1 return Pheno::Ranker::Compare::Ontology::add_hpo_ascendants(
27 @_,
28 \%nomenclature
29 );
30 }
31  
32 17 ▶sub remap_hash {
Subroutine remap_hash: called CC=2 SCAR=7.1
Pod undocumented
33 17 my $arg = shift;
34 17 ▶ $arg->{nomenclature} ||= \%nomenclature;
Condition50%1/2
$arg->{"nomenclature"} ||= \%Pheno::Ranker::Compare::nomenclature
l!l
017
MC/DC0%0/1
$arg->{"nomenclature"} ||= \%Pheno::Ranker::Compare::nomenclature
$arg->{"nomenclature"}
Truth table50%1/2
A
A= $arg->{"nomenclature"}
Aresult
11
00
35 17 return Pheno::Ranker::Compare::Remap::remap_hash($arg);
36 }
37  
38 7 ▶sub compare_and_rank {
Subroutine compare_and_rank: called CC=2 SCAR=7.1
Pod undocumented
39 7 my $arg = shift;
40 7 ▶ $arg->{nomenclature} ||= \%nomenclature;
Condition50%1/2
$arg->{"nomenclature"} ||= \%Pheno::Ranker::Compare::nomenclature
l!l
07
MC/DC0%0/1
$arg->{"nomenclature"} ||= \%Pheno::Ranker::Compare::nomenclature
$arg->{"nomenclature"}
Truth table50%1/2
A
A= $arg->{"nomenclature"}
Aresult
11
00
41 7 return Pheno::Ranker::Compare::Rank::compare_and_rank($arg);
42 }
43  
44 19 ▶sub create_glob_and_ref_hashes {
Subroutine create_glob_and_ref_hashes: called CC=2 SCAR=7.1
Pod undocumented
45 19 my ( $array, $weight, $self, $nomenclature ) = @_;
46 19 ▶ $nomenclature ||= \%nomenclature;
Condition50%1/2
$nomenclature ||= \%Pheno::Ranker::Compare::nomenclature
l!l
019
MC/DC0%0/1
$nomenclature ||= \%Pheno::Ranker::Compare::nomenclature
$nomenclature
Truth table50%1/2
A
A= $nomenclature
Aresult
11
00
47 19 return Pheno::Ranker::Compare::Prepare::create_glob_and_ref_hashes(
48 $array, $weight, $self, $nomenclature
49 );
50 }
51  
52 2 ▶sub randomize_variables {
Subroutine randomize_variables: called CC=1 SCAR=0.0
Pod undocumented
53 2 return Pheno::Ranker::Compare::Prepare::randomize_variables(@_);
54 }
55  
56 17 ▶sub check_format {
Subroutine check_format: called CC=2 SCAR=6.9
Pod undocumented
57 17 my $data = shift;
58 17 ▶ return exists $data->[0]{subject} ? 'PXF' : 'BFF';
Branch: 1 branch
BranchTrueFalseTotal
exists $data->[0]{'subject'} ? : 4 13 17
59 }
60  
61 8 1;
« lib/Pheno/Ranker/Compare/Ontology.pm ↑ Summary lib/Pheno/Ranker/Context.pm »