| 1 | package NCBIx::Geo::Item; | ||||||||||||||||||||||||||||
| 2 | 1 | ▶ | use base qw(NCBIx::Geo::Base); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use Carp; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 1 | ▶ | use version; our $VERSION = qv('1.0.0'); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | { | ||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 1 | my %series_title_of :ATTR( :get<series_title> :set<series_title> :default<''> :init_arg<series_title> ); | |||||||||||||||||||||||||||
| 13 | 1 | my %n_samples_of :ATTR( :get<n_samples> :set<n_samples> :default<''> :init_arg<n_samples> ); | |||||||||||||||||||||||||||
| 14 | 1 | my %gds_type_of :ATTR( :get<gds_type> :set<gds_type> :default<''> :init_arg<gds_type> ); | |||||||||||||||||||||||||||
| 15 | 1 | my %ptech_type_of :ATTR( :get<ptech_type> :set<ptech_type> :default<''> :init_arg<ptech_type> ); | |||||||||||||||||||||||||||
| 16 | 1 | my %samples_of :ATTR( :get<samples> :set<samples> :default<''> :init_arg<samples> ); | |||||||||||||||||||||||||||
| 17 | 1 | my %projects_of :ATTR( :get<projects> :set<projects> :default<''> :init_arg<projects> ); | |||||||||||||||||||||||||||
| 18 | 1 | my %gse_of :ATTR( :get<gse> :set<gse> :default<''> :init_arg<gse> ); | |||||||||||||||||||||||||||
| 19 | 1 | my %summary_of :ATTR( :get<summary> :set<summary> :default<''> :init_arg<summary> ); | |||||||||||||||||||||||||||
| 20 | 1 | my %gsm_titles_l_of :ATTR( :get<gsm_titles_l> :set<gsm_titles_l> :default<''> :init_arg<gsm_titles_l> ); | |||||||||||||||||||||||||||
| 21 | 1 | my %pubmed_ids_of :ATTR( :get<pubmed_ids> :set<pubmed_ids> :default<''> :init_arg<pubmed_ids> ); | |||||||||||||||||||||||||||
| 22 | 1 | my %relations_of :ATTR( :get<relations> :set<relations> :default<''> :init_arg<relations> ); | |||||||||||||||||||||||||||
| 23 | 1 | my %gpl_of :ATTR( :get<gpl> :set<gpl> :default<''> :init_arg<gpl> ); | |||||||||||||||||||||||||||
| 24 | 1 | my %ss_info_of :ATTR( :get<ss_info> :set<ss_info> :default<''> :init_arg<ss_info> ); | |||||||||||||||||||||||||||
| 25 | 1 | my %supp_file_of :ATTR( :get<supp_file> :set<supp_file> :default<''> :init_arg<supp_file> ); | |||||||||||||||||||||||||||
| 26 | 1 | my %taxon_of :ATTR( :get<taxon> :set<taxon> :default<''> :init_arg<taxon> ); | |||||||||||||||||||||||||||
| 27 | 1 | my %gsm_l_of :ATTR( :get<gsm_l> :set<gsm_l> :default<''> :init_arg<gsm_l> ); | |||||||||||||||||||||||||||
| 28 | 1 | my %entry_type_of :ATTR( :get<entry_type> :set<entry_type> :default<''> :init_arg<entry_type> ); | |||||||||||||||||||||||||||
| 29 | 1 | my %val_type_of :ATTR( :get<val_type> :set<val_type> :default<''> :init_arg<val_type> ); | |||||||||||||||||||||||||||
| 30 | 1 | my %pdat_of :ATTR( :get<pdat> :set<pdat> :default<''> :init_arg<pdat> ); | |||||||||||||||||||||||||||
| 31 | 1 | my %platform_taxa_of :ATTR( :get<platform_taxa> :set<platform_taxa> :default<''> :init_arg<platform_taxa> ); | |||||||||||||||||||||||||||
| 32 | 1 | my %samples_taxa_of :ATTR( :get<samples_taxa> :set<samples_taxa> :default<''> :init_arg<samples_taxa> ); | |||||||||||||||||||||||||||
| 33 | 1 | my %gds_of :ATTR( :get<gds> :set<gds> :default<''> :init_arg<gds> ); | |||||||||||||||||||||||||||
| 34 | 1 | my %subset_info_of :ATTR( :get<subset_info> :set<subset_info> :default<''> :init_arg<subset_info> ); | |||||||||||||||||||||||||||
| 35 | 1 | my %title_of :ATTR( :get<title> :set<title> :default<''> :init_arg<title> ); | |||||||||||||||||||||||||||
| 36 | 1 | my %platform_title_of :ATTR( :get<platform_title> :set<platform_title> :default<''> :init_arg<platform_title> ); | |||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | 1 | my %related_gpl_of :ATTR( :get<related_gpl> :set<related_gpl> :default<''> :init_arg<related_gpl> ); | |||||||||||||||||||||||||||
| 39 | 1 | my %related_gds_of :ATTR( :get<related_gds> :set<related_gds> :default<''> :init_arg<related_gds> ); | |||||||||||||||||||||||||||
| 40 | 1 | my %related_gse_of :ATTR( :get<related_gse> :set<related_gse> :default<''> :init_arg<related_gse> ); | |||||||||||||||||||||||||||
| 41 | 1 | my %samples_count_of :ATTR( :get<samples_count> :set<samples_count> :default<''> :init_arg<samples_count> ); | |||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | 0 | ▶ | sub START { | ||||||||||||||||||||||||||
|
Subroutine
START: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 44 | 0 | my ($self, $ident, $arg_ref) = @_; | |||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | 0 | return; | |||||||||||||||||||||||||||
| 48 | } | ||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | 0 | ▶ | sub add_related { | ||||||||||||||||||||||||||
|
Subroutine
add_related: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 51 | 0 | my ( $self, $item ) = @_; | |||||||||||||||||||||||||||
| 52 | 0 | my $acc_type = $item->get_entry_type(); | |||||||||||||||||||||||||||
| 53 | 0 | ▶ | if ( $acc_type =~ m/GPL/ ) { $self->set_related_gpl( $item ); } | ||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||
| 54 | 0 | elsif ( $acc_type =~ m/GDS/ ) { $self->set_related_gds( $item ); } | |||||||||||||||||||||||||||
| 55 | 0 | elsif ( $acc_type =~ m/GSE/ ) { $self->set_related_gse( $item ); } | |||||||||||||||||||||||||||
| 56 | 0 | return $self; | |||||||||||||||||||||||||||
| 57 | } | ||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | 0 | ▶ | sub get_sample_ids { | ||||||||||||||||||||||||||
|
Subroutine
get_sample_ids: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 60 | 0 | my ( $self ) = @_; | |||||||||||||||||||||||||||
| 61 | 0 | my @sample_accns; | |||||||||||||||||||||||||||
| 62 | 0 | foreach my $sample ( @{ $self->get_samples() } ) { | |||||||||||||||||||||||||||
| 63 | 0 | push @sample_accns, $sample->{Accession}; | |||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||
| 65 | 0 | return join( ';', @sample_accns ); | |||||||||||||||||||||||||||
| 66 | } | ||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||
| 68 | 0 | ▶ | sub get_sample_descs { | ||||||||||||||||||||||||||
|
Subroutine
get_sample_descs: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 69 | 0 | my ( $self ) = @_; | |||||||||||||||||||||||||||
| 70 | 0 | my @sample_accns; | |||||||||||||||||||||||||||
| 71 | 0 | foreach my $sample ( @{ $self->get_samples() } ) { | |||||||||||||||||||||||||||
| 72 | 0 | push @sample_accns, $sample->{Accession} . "\t" . $sample->{Title}; | |||||||||||||||||||||||||||
| 73 | } | ||||||||||||||||||||||||||||
| 74 | 0 | return join( "\n", @sample_accns ) . "\n"; | |||||||||||||||||||||||||||
| 75 | } | ||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||
| 77 | 0 | ▶ | sub desc { | ||||||||||||||||||||||||||
|
Subroutine
desc: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 78 | 0 | my ( $self ) = @_; | |||||||||||||||||||||||||||
| 79 | 0 | my $entry_type = $self->get_entry_type(); | |||||||||||||||||||||||||||
| 80 | 0 | my $gse = $self->get_gse(); | |||||||||||||||||||||||||||
| 81 | 0 | my $gpl = $self->get_gpl(); | |||||||||||||||||||||||||||
| 82 | 0 | my $gds = $self->get_gds(); | |||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||
| 84 | 0 | my $desc = "[$entry_type] GPL: $gpl \n"; | |||||||||||||||||||||||||||
| 85 | 0 | $desc .= "[$entry_type] GDS: $gds \n"; | |||||||||||||||||||||||||||
| 86 | 0 | $desc .= "[$entry_type] GSE: $gse \n\n"; | |||||||||||||||||||||||||||
| 87 | |||||||||||||||||||||||||||||
| 88 | 0 | return $desc; | |||||||||||||||||||||||||||
| 89 | } | ||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||
| 91 | 0 | ▶ | sub dump { | ||||||||||||||||||||||||||
|
Subroutine
dump: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 92 | 0 | my ( $self ) = @_; | |||||||||||||||||||||||||||
| 93 | 0 | my $series_title = $self->get_series_title(); | |||||||||||||||||||||||||||
| 94 | 0 | my $n_samples = $self->get_n_samples(); | |||||||||||||||||||||||||||
| 95 | 0 | my $gds_type = $self->get_gds_type(); | |||||||||||||||||||||||||||
| 96 | 0 | my $ptech_type = $self->get_ptech_type(); | |||||||||||||||||||||||||||
| 97 | 0 | my $samples = $self->get_samples(); | |||||||||||||||||||||||||||
| 98 | 0 | my $projects = $self->get_projects(); | |||||||||||||||||||||||||||
| 99 | 0 | my $gse = $self->get_gse(); | |||||||||||||||||||||||||||
| 100 | 0 | my $summary = $self->get_summary(); | |||||||||||||||||||||||||||
| 101 | 0 | my $gsm_titles_l = $self->get_gsm_titles_l(); | |||||||||||||||||||||||||||
| 102 | 0 | my $pubmed_ids = $self->get_pubmed_ids(); | |||||||||||||||||||||||||||
| 103 | 0 | my $relations = $self->get_relations(); | |||||||||||||||||||||||||||
| 104 | 0 | my $gpl = $self->get_gpl(); | |||||||||||||||||||||||||||
| 105 | 0 | my $ss_info = $self->get_ss_info(); | |||||||||||||||||||||||||||
| 106 | 0 | my $supp_file = $self->get_supp_file(); | |||||||||||||||||||||||||||
| 107 | 0 | my $taxon = $self->get_taxon(); | |||||||||||||||||||||||||||
| 108 | 0 | my $gsm_l = $self->get_gsm_l(); | |||||||||||||||||||||||||||
| 109 | 0 | my $entry_type = $self->get_entry_type(); | |||||||||||||||||||||||||||
| 110 | 0 | my $val_type = $self->get_val_type(); | |||||||||||||||||||||||||||
| 111 | 0 | my $pdat = $self->get_pdat(); | |||||||||||||||||||||||||||
| 112 | 0 | my $platform_taxa = $self->get_platform_taxa(); | |||||||||||||||||||||||||||
| 113 | 0 | my $samples_taxa = $self->get_samples_taxa(); | |||||||||||||||||||||||||||
| 114 | 0 | my $gds = $self->get_gds(); | |||||||||||||||||||||||||||
| 115 | 0 | my $subset_info = $self->get_subset_info(); | |||||||||||||||||||||||||||
| 116 | 0 | my $title = $self->get_title(); | |||||||||||||||||||||||||||
| 117 | 0 | my $platform_title = $self->get_platform_title(); | |||||||||||||||||||||||||||
| 118 | |||||||||||||||||||||||||||||
| 119 | 0 | print " ITEM: $series_title, $n_samples, $gds_type, $ptech_type, $samples, $projects, $gse, $summary, $gsm_titles_l, $pubmed_ids, $relations, $gpl, $ss_info, $supp_file, $taxon, $gsm_l, $entry_type, $val_type, $pdat, $platform_taxa, $samples_taxa, $gds, $subset_info, $title, $platform_title \n"; | |||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||
| 121 | 0 | return; | |||||||||||||||||||||||||||
| 122 | } | ||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||
| 124 | 0 | ▶ | sub check_sample_count { | ||||||||||||||||||||||||||
|
Subroutine
check_sample_count: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 125 | 0 | my ( $self ) = @_; | |||||||||||||||||||||||||||
| 126 | 0 | my $n_samples = $self->get_n_samples(); | |||||||||||||||||||||||||||
| 127 | 0 | my $samples_count = scalar( @{ $self->get_samples() } ); | |||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||
| 129 | 0 | ▶ | if ( $n_samples || $samples_count ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$n_samples or $samples_count
MC/DC0%0/2
$n_samples or $samples_count
$n_samples
$samples_count
Truth table0%0/3
A or B
A= $n_samplesB= $samples_count
| |||||||||||||||||||||||||||||
| 130 | 0 | ▶ | if ( $n_samples != $samples_count ) { return 0; } | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 131 | } | ||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||
| 133 | 0 | return 1; | |||||||||||||||||||||||||||
| 134 | } | ||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||
| 136 | } | ||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||
| 138 | 1 | 1; # Magic true value required at end of module | |||||||||||||||||||||||||||
| 139 | __END__ | ||||||||||||||||||||||||||||