| 1 | package Bio::MUST::Apps::Debrief42::TaxReport::NewSeq; | ||||||||||||
| 2 | # ABSTRACT: Internal class for tabular tax-report parser | ||||||||||||
| 3 | # CONTRIBUTOR: Mick VAN VLIERBERGHE <mvanvlierberghe@doct.uliege.be> | ||||||||||||
| 4 | 1 | $Bio::MUST::Apps::Debrief42::TaxReport::NewSeq::VERSION = '0.210570'; | |||||||||||
| 5 | 1 | ▶ | use Moose; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | 1 | ▶ | use namespace::autoclean; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | |||||||||||||
| 8 | |||||||||||||
| 9 | # public attributes | ||||||||||||
| 10 | |||||||||||||
| 11 | has $_ => ( | ||||||||||||
| 12 | is => 'ro', | ||||||||||||
| 13 | isa => 'Maybe[Str]', | ||||||||||||
| 14 | required => 1, | ||||||||||||
| 15 | 1 | ) for qw( seq_id contam_org lca lineage acc seq ); | |||||||||||
| 16 | |||||||||||||
| 17 | has $_ => ( | ||||||||||||
| 18 | is => 'ro', | ||||||||||||
| 19 | isa => 'Maybe[Num]', | ||||||||||||
| 20 | required => 1, | ||||||||||||
| 21 | 1 | ) for qw( top_score rel_n mean_len mean_ident start end strand ); | |||||||||||
| 22 | |||||||||||||
| 23 | 1 | has 'outfile' => ( | |||||||||||
| 24 | is => 'ro', | ||||||||||||
| 25 | isa => 'Str', | ||||||||||||
| 26 | ); | ||||||||||||
| 27 | |||||||||||||
| 28 | |||||||||||||
| 29 | |||||||||||||
| 30 | sub heads { | ||||||||||||
| 31 | 0 | ▶ | my $class = shift; | ||||||||||
|
Subroutine
heads: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 32 | |||||||||||||
| 33 | 0 | return qw( | |||||||||||
| 34 | seq_id contam_org | ||||||||||||
| 35 | top_score | ||||||||||||
| 36 | rel_n mean_len mean_ident lca lineage | ||||||||||||
| 37 | acc start end strand seq | ||||||||||||
| 38 | ); # Note: outfile attr is added by TaxReport parser! | ||||||||||||
| 39 | } | ||||||||||||
| 40 | |||||||||||||
| 41 | |||||||||||||
| 42 | sub stringify { | ||||||||||||
| 43 | 0 | ▶ | my $self = shift; | ||||||||||
|
Subroutine
stringify: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 44 | 0 | ▶ | return join "\t", map { $self->$_ // q{} } $self->heads; | ||||||||||
|
Condition0%0/2
$self->$_ // ""
MC/DC0%0/1
$self->$_ // ""
$self->$_
Truth table0%0/2
A
A= $self->$_
| |||||||||||||
| 45 | } | ||||||||||||
| 46 | |||||||||||||
| 47 | |||||||||||||
| 48 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||||
| 49 | 1 | 1; | |||||||||||
| 50 | |||||||||||||
| 51 | __END__ | ||||||||||||
| 52 | |||||||||||||
| 53 | =pod | ||||||||||||
| 54 | |||||||||||||
| 55 | =head1 NAME | ||||||||||||
| 56 | |||||||||||||
| 57 | Bio::MUST::Apps::Debrief42::TaxReport::NewSeq - Internal class for tabular tax-report parser | ||||||||||||
| 58 | |||||||||||||
| 59 | =head1 VERSION | ||||||||||||
| 60 | |||||||||||||
| 61 | version 0.210570 | ||||||||||||
| 62 | |||||||||||||
| 63 | =head1 SYNOPSIS | ||||||||||||
| 64 | |||||||||||||
| 65 | # TODO | ||||||||||||
| 66 | |||||||||||||
| 67 | =head1 DESCRIPTION | ||||||||||||
| 68 | |||||||||||||
| 69 | # TODO | ||||||||||||
| 70 | |||||||||||||
| 71 | =head1 METHODS | ||||||||||||
| 72 | |||||||||||||
| 73 | =head2 heads | ||||||||||||
| 74 | |||||||||||||
| 75 | Class method returning all the attribute names (not an array reference). | ||||||||||||
| 76 | |||||||||||||
| 77 | use aliased 'Bio::MUST::Apps::Debrief42::TaxReport::NewSeq'; | ||||||||||||
| 78 | |||||||||||||
| 79 | # $tax_report is an output file | ||||||||||||
| 80 | open my $fh, '>', $tax_report; | ||||||||||||
| 81 | say {$fh} '# ' . join "\t", NewSeq->heads; | ||||||||||||
| 82 | |||||||||||||
| 83 | This method does not accept any arguments. | ||||||||||||
| 84 | |||||||||||||
| 85 | =head2 stringify | ||||||||||||
| 86 | |||||||||||||
| 87 | Returns a string corresponding to NewSeq attribute values. The string is ready | ||||||||||||
| 88 | to be printed as a single TaxReport line. | ||||||||||||
| 89 | |||||||||||||
| 90 | # $fh is an output filehandle | ||||||||||||
| 91 | say {$fh} $new_seq->stringify; | ||||||||||||
| 92 | |||||||||||||
| 93 | This method does not accept any arguments. | ||||||||||||
| 94 | |||||||||||||
| 95 | =head1 AUTHOR | ||||||||||||
| 96 | |||||||||||||
| 97 | Denis BAURAIN <denis.baurain@uliege.be> | ||||||||||||
| 98 | |||||||||||||
| 99 | =head1 CONTRIBUTOR | ||||||||||||
| 100 | |||||||||||||
| 101 | =for stopwords Mick VAN VLIERBERGHE | ||||||||||||
| 102 | |||||||||||||
| 103 | Mick VAN VLIERBERGHE <mvanvlierberghe@doct.uliege.be> | ||||||||||||
| 104 | |||||||||||||
| 105 | =head1 COPYRIGHT AND LICENSE | ||||||||||||
| 106 | |||||||||||||
| 107 | This software is copyright (c) 2013 by University of Liege / Unit of Eukaryotic Phylogenomics / Denis BAURAIN. | ||||||||||||
| 108 | |||||||||||||
| 109 | This is free software; you can redistribute it and/or modify it under | ||||||||||||
| 110 | the same terms as the Perl 5 programming language system itself. | ||||||||||||
| 111 | |||||||||||||
| 112 | =cut | ||||||||||||