[Biojava-l] Using Annotation to Model a Tree Hierarchy

Ron Kuhn rkuhn@Cellomics.com
Thu, 18 Oct 2001 09:15:00 -0400


Sure... How do I get my changes into the Biojava???
Ron

-----Original Message-----
From: Thomas Down [mailto:td2@sanger.ac.uk]
Sent: Thursday, October 18, 2001 5:43 AM
To: Ron Kuhn
Cc: 'biojava-l@biojava.org'
Subject: Re: [Biojava-l] Using Annotation to Model a Tree Hierarchy


On Wed, Oct 17, 2001 at 04:05:12PM -0400, Ron Kuhn wrote:
> Biojava,
> I solved the problem that I mentioned previously where the Genbank and
> Swissprot flat file parsers utilized one SimpleAnnotation object to hold
all
> the references information about a sequence. The problem is that there is
no
> way to relate the title and authors values back to the parent references.
> 
> To solve the problem, I stored all the reference information in a separate
> SimpleAnnotation and added it to the root annotation. It states in the
> biojava docs that Annotations may contain keys that have Annotations as
> values to model hierarchical data. For Genbank, the REFERENCE key
> corresponds to an Annotation or an array of Annotations with the child
> REFERENCE keys (i.e. AUTHORS, TITLE, etc.) stored in the child Annotation.
> The same model exists for the Swissprot RN key. I had to make changes to
the
> SwissprotProcessor.java and GenbankProcessor.java files. What do you
> think???

Sounds good to me!

The only thing I'd possibly do differently might be to use
List objects rather than arrays -- but that's a convention
issue, rather than anything else.

Are you interested in getting your patch back into the main
tree?  It sounds like a useful improvement for
everyone who uses these parsers.

    Thomas.