line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
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
|
|
|
|
|
|
|
$Bio::MUST::Apps::Debrief42::TaxReport::NewSeq::VERSION = '0.210370'; |
5
|
1
|
|
|
1
|
|
737
|
use Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
6
|
1
|
|
|
1
|
|
7152
|
use namespace::autoclean; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
8
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# public attributes |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has $_ => ( |
12
|
|
|
|
|
|
|
is => 'ro', |
13
|
|
|
|
|
|
|
isa => 'Maybe[Str]', |
14
|
|
|
|
|
|
|
required => 1, |
15
|
|
|
|
|
|
|
) for qw( seq_id contam_org lca lineage acc seq ); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has $_ => ( |
18
|
|
|
|
|
|
|
is => 'ro', |
19
|
|
|
|
|
|
|
isa => 'Maybe[Num]', |
20
|
|
|
|
|
|
|
required => 1, |
21
|
|
|
|
|
|
|
) for qw( top_score rel_n mean_len mean_ident start end strand ); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has 'outfile' => ( |
24
|
|
|
|
|
|
|
is => 'ro', |
25
|
|
|
|
|
|
|
isa => 'Str', |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub heads { |
31
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
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
|
|
|
0
|
1
|
|
my $self = shift; |
44
|
0
|
|
0
|
|
|
|
return join "\t", map { $self->$_ // q{} } $self->heads; |
|
0
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
49
|
|
|
|
|
|
|
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.210370 |
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 |