[Biojava-l] Exporting accessions to Genbank files

Hoebeke Mark Mark.Hoebeke at jouy.inra.fr
Thu Jun 3 05:39:12 EDT 2004


Hi all,

In the context of importing/exporting genbank files into/from a database
I stumbled across an oddity :
 - when building a Sequence instance from a genbank file
(SeqIOTools.readGenbank()), the accession is available through the
"ACCESSION" property of its Annotation
 - when exporting a Sequence instance into a genbank file
(SeqIOTools.writeGenBank()), after having intialized the accession
through the "ACCESSION" property, no ACCESSION line is generated.

Wading through the code (stable 1.3 or 1.4pre1) I noticed the following
comment in  GenBankFormat.java :
(...)
 * Added GenBank header	info to	the sequence annotation. The ACCESSION
header
 * tag is not included.	Stored in sequence.getName().
(...)

which I interpreted as "the ACCESSION property is not written to the
file".

To solve my problem I has to resort to the ugly line below :

	annot.setProperty(GenbankProcessor.PROPERTY_GENBANK_ACCESSIONS,acces);

I'm sure there must be a better way. If anyone has a pointer related to
this issue, I'll gladly adopt a cleaner way of coding this.

Thanks 

Mark

-- 
--------------------------Mark.Hoebeke at jouy.inra.fr----------------------
Unité Statistique & Génome                                      Unité MIG
+33 (0)1 60 87 38 03                   Tél.          +33 (0)1 34 65 28 85
+33 (0)1 60 87 38 09                   Fax.          +33 (0)1 34 65 29 01
Tour Evry 2, 523 pl. des Terrasses              INRA - Domaine de Vilvert
F - 91000 Evry                              F - 78352 Jouy-en-Josas CEDEX




More information about the Biojava-l mailing list