[Biojava-l] Create SimpleSequence / setSeqName

Thomas Down td2@sanger.ac.uk
Thu, 18 Oct 2001 15:48:28 +0100


On Thu, Oct 18, 2001 at 02:53:22PM +0200, Stein Aerts wrote:
> BioJava,
> 
> - I use the biojava-20010920.jar for my BioJava code. When I try to work
> with a SubSequence I get the java.lang.NoClassDefFoundError.
> I also get this error when I run the TestSubSequence.java from the
> biojava-live/demos.

Have you downloaded bytecode.jar?  (the most recent version
of this is available from our binary download site).  Some
parts of BioJava use on-the-fly code generation techniques,
and require this library to be available on your CLASSPATH.

The exception you posted suggests that this is missing.

> - I can also work without using the SubSequence class by creating a new
> SimpleSequence starting with a subList. In this case, is there a simple way
> to set the sequence name directly to the newly created SimpleSequence?

No, the `name' property of a SimpleSequence can only be
set at construction time.  This could probably changed if 
there was a good reason, though.

> - Is there an explanation for the fact that the annotation of a Embl
> sequence disappears when you add new features to it and write it to file?

By `annotation' do you mean the set of metadata in
the header which is not the feature table?  The BioJava
parsers do extract this information from the file, and
store it in an Annotation object.  However, very little
of it currently gets re-exported by the EMBL writer.

It shouldn't be too bad a job to add the code to write
this data, but it probably requires more familiarity
with the details of the EMBL format than I can offer...


    Thomas.