line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bio::Resistome::Accessions; |
2
|
|
|
|
|
|
|
# ABSTRACT: Take in a list of accession numbers and extract the gene metadata |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
980786
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use Bio::Resistome::EMBL::AccessionLookup; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has 'accession_numbers' => ( is => 'ro', isa => 'ArrayRef[Str]', required => 1 ); |
9
|
|
|
|
|
|
|
has 'accessions_metadata' => ( is => 'ro', isa => 'ArrayRef[Bio::Resistome::GeneMetaData]', lazy => 1, builder => '_build_accessions_metadata'); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has '_accession_number_lookup_service' => ( is => 'ro', isa => 'Str', default => 'http://www.ebi.ac.uk/ena/data/view/' ); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub _build_accessions_metadata |
14
|
|
|
|
|
|
|
{ |
15
|
|
|
|
|
|
|
my ($self) = @_; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my @accession_numbers; |
18
|
|
|
|
|
|
|
for my $accession (@{$self->accession_numbers}) |
19
|
|
|
|
|
|
|
{ |
20
|
|
|
|
|
|
|
my $accession_lookup = Bio::Resistome::EMBL::AccessionLookup->new( |
21
|
|
|
|
|
|
|
accession_number => $accession, |
22
|
|
|
|
|
|
|
accession_number_lookup_service => $self->_accession_number_lookup_service |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
push( @accession_numbers, $accession_lookup->accession_metadata); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
return \@accession_numbers; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
no Moose; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=pod |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Bio::Resistome::Accessions - Take in a list of accession numbers and extract the gene metadata |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 VERSION |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
version 1.123560 |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SYNOPSIS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Take in a list of accession numbers and extract the gene metadata |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
use Bio::Resistome::AccessionLookup; |
52
|
|
|
|
|
|
|
my $obj = Bio::Resistome::Accessions->new( |
53
|
|
|
|
|
|
|
accession_numbers => 'ABC' |
54
|
|
|
|
|
|
|
); |
55
|
|
|
|
|
|
|
$obj->accessions_metadata; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 METHODS |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 accessions_metadata |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Returns an array of populated Bio::Resistome::GeneMetaData objects. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 SEE ALSO |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=over 4 |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=item * |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
L<Bio::Resistome::EMBL::AccessionLookup> |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=back |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 AUTHOR |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Andrew J. Page <ap13@sanger.ac.uk> |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
This software is Copyright (c) 2012 by Wellcome Trust Sanger Institute. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
This is free software, licensed under: |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
The GNU General Public License, Version 3, June 2007 |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=cut |