Salut,

Je suis parvenu à extraire la majeure partie des informations d'un fichier GenBank grâce au module Bio::SeqIO.

En revanche lorsque je récupère les annotations je ne récupère pas les positions ce qui est assez problématique.

Voici une partie du fichier gb, ce que je n'arrive pas à récupérer est en gras
FEATURES Location/Qualifiers
source 1..1460
/organism="Homo sapiens"
/mol_type="mRNA"
/db_xref="taxon:9606"
/chromosome="19"
/map="19q13.12"
gene 1..1460
/gene="FXYD3"
/gene_synonym="MAT8; PLML"
/note="FXYD domain containing ion transport regulator 3"
/db_xref="GeneID:5349"
/db_xref="HGNC:4027"
/db_xref="MIM:604996"
exon 1..132
/gene="FXYD3"
/gene_synonym="MAT8; PLML"
/inference="alignment:Splign"
/number=1
misc_feature 129..131
/gene="FXYD3"
/gene_synonym="MAT8; PLML"
/note="upstream in-frame stop codon"
exon 133..228
/gene="FXYD3"
/gene_synonym="MAT8; PLML"
/inference="alignment:Splign"
/number=2
exon 229..282
/gene="FXYD3"
/gene_synonym="MAT8; PLML"
/inference="alignment:Splign"
/number=5

Voici donc le script en question
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/usr/bin/perl
 
use strict;
use warnings;
 
use Bio::SeqIO;
 
my $in = Bio::SeqIO->new(-format => 'GenBank', -file => $ARGV[0]) || die "Erreur, $!";
my $seq_object = $in->next_seq();
 
#ACCESSION
my $num_acc = $seq_object->accession();
print "Numéro d'Accession : ".$num_acc."\n";
 
#DEFINITION
my $desc = $seq_object->desc();
print "Description : ".$desc."\n";
 
#VERSION/GI
my $gi = $seq_object->primary_id();
my $version = $seq_object->version();
print "VERSION : ".$num_acc.".".$version."\t"."GI : ".$gi."\n";
 
print "\n\n";
 
#ORGANISM
my $espece = $seq_object->species()->node_name();
print "Organisme : ".$espece."\n";
 
#CLASSIFICATION
my @classification = $seq_object->species()->classification();
@classification = reverse(@classification);
my $j = 0;
print "Classification : "."\n";
foreach (@classification){
	for(my $i=0; $i<$j; $i++){
		print "   ";
	}
	print $_."\n";
	$j++;
}
 
print "\n\n";
 
#Annotations
my @annotations = $seq_object->annotation()->get_Annotations();
foreach (@annotations){
	my $tagname = uc($_->tagname());
	print $tagname." : ".$_->display_text()."\n";
}
 
print "\n\n";
 
#FEATURES
my @features = $seq_object->get_SeqFeatures();
foreach my $features_object (@features){
	my $primary_tag = $features_object->primary_tag();
	$primary_tag = uc($primary_tag);
	print $primary_tag." :\n";
 
	for($features_object->get_all_tags()){
		my $tag = $_;
		print "\t".$tag." : ";
		for my $valeur ($features_object->get_tag_values($tag)){
			print $valeur."\n";
 
		}	
	}
 
	print "\n\n";
 
}
 
 
print "Afficher séquence -Y/N- ? ";
chomp(my $choix = <STDIN>);
 
if($choix eq 'y'){
	print "\n"."SEQUENCE : "."\n";
	print $seq_object->seq."\n";
}