Bonjour,
Voici le format de l'objet
J'aimerais récupérer le titre, les auteurs ainsi que la location. Il faut utiliser les méthodes du module Bio::Annotation::Reference. Le problème est que je ne sais pas comment accéder à cet objet contenant ces données.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 '_annotation' => bless( { '_typemap' => bless( { '_type' => { 'keyword' => 'Bio::Annotation::SimpleValue', 'comment' => 'Bio::Annotation::Comment', 'reference' => 'Bio::Annotation::Reference', 'date_changed' => 'Bio::Annotation::SimpleValue', 'dblink' => 'Bio::Annotation::DBLink' } }, 'Bio::Annotation::TypeManager' ), '_annotation' => { 'keyword' => [ bless( { 'value' => '', '_root_verbose' => 0, 'tagname' => 'keyword' }, 'Bio::Annotation::SimpleValue' ) ], 'reference' => [ bless( { 'authors' => 'Beutin,L. and Burgos,Y.', 'location' => 'Unpublished', 'title' => 'Characterization of plasmid encoded alpha-haemolysin determinants', '_root_verbose' => 0, 'tagname' => 'reference' }, 'Bio::Annotation::Reference' ),
Voici mon script
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 #!/usr/local/bin/perl use strict; use Bio::DB::GenBank; use Data::Dumper; no warnings qw/redefine/; my @request = qw (FM210349); my $gb = new Bio::DB::GenBank; foreach my $acc (@request){ # Recherche dans Genbank #-------------------------- my $info = $gb->get_Seq_by_acc($acc); # print Dumper $info; my $seq = $info->seq(); my $acc = $info->accession(); my $gi = $info->primary_id; my $def = $info->description; $def =~ s/([\\'])/\\$1/g; # pour insertion en DB my $seq_length = length($seq); my ($title, $authors, $location); print "acc : $acc\ngi : $gi\nLongueur de la séquence $seq_length nucléotides\ndescription : $def\ntitle : $title\n\n\n"; }
Avez-vous une idée de la façon de récupérer ces 3 valeurs?
Merci,
Partager