[Biojava-dev] Please help with Features and Annotations?
mark.schreiber at group.novartis.com
mark.schreiber at group.novartis.com
Wed Sep 1 23:14:48 EDT 2004
Hi Michael -
The BJIA example that uses the FeatureTree will show you exaclty where
they end up. Basically things that are global to a sequence are
Annotations. Things that are bound by a location are Features. Note that
Features are Annotatable so anything global to the Feature can be added as
an annotation. In you example the db_xref would be an annotation of the
Feature.
You can add any object label pair to an Annotation so it's up to you to
decide where to put things. If you use SeqIOTools to read that flat file
the SeqIO listeners will decide for you. Pretty much everything you have
in the header below will end up in the Sequences Annotation bundle. I
really reccomend looking at the FeatureTree example for a quick view on
where everything ends up for any sequence you read in.
- Mark
Michael Griffith <mg at base-pair.com>
Sent by: biojava-dev-bounces at portal.open-bio.org
09/02/2004 11:01 AM
To: Mark Schreiber/GP/Novartis at PH
cc: biojava-dev at open-bio.org
Subject: Re: [Biojava-dev] Please help with Features and Annotations?
Mark,
Thanks for the reply.
Some follow on questions...
If you were to look at the NCBI GenBank record:
http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=text&db=nucleotide&uid=314
18377&dopt=GenBank
Are things like these below considered to be annotations or features?
LOCUS BC053409 2172 bp mRNA linear ROD
19-NOV-2003
DEFINITION Mus musculus Unknown (protein for MGC:60843), mRNA (cDNA clone
MGC:60843 IMAGE:30076516), complete cds.
ACCESSION BC053409
VERSION BC053409.1 GI:31418377
KEYWORDS MGC.
SOURCE Mus musculus (house mouse)
ORGANISM Mus musculus
Things like:
gene 1..2172
/gene="MGC60843"
/db_xref="LocusID:380798"
I would consider features for sure.
If I were to create a Sequence with XXXTools classes, and wrap it in a
ViewSequence, I am not clear on how I might add the DEFINITION or GI,
which
appears as a sub-element of VERSION. Most of the examples deal with how
to
manipulate the sequence string itself.
If you (or someone can help me understand this better, I would be willing
to
write some demo programs to include, or contribute to the documentation
effort related to this topic.
Again, thanks for your reply.
Cheers!
Michael Griffith
On 9/1/04 8:56 PM, "mark.schreiber at group.novartis.com"
<mark.schreiber at group.novartis.com> wrote:
> Hi Michael -
>
> The problem with the createDNASequence() method is that is creates a
> Sequence with an Annotation.EMPTY_ANNOTATION place holder for the
> annotation of the Sequence. This Annotation is empty (as the name
> suggests) and cannot be modified so any sequence made this way cannot be
> annotated.
> One way around this is to create a ViewSequence that wraps the Sequence
> and can have an Annotation added to it. If you read a sequence from a
flat
> file (eg fasta) you can add an Annotation to it. Finally if you want to
> add Annotations another approach is to create a SimpleSequence and
supply
> it with a SymbolList, Name, URN (can be "" or null) and an Annotation
> (which could be EMPTY_ANNOTATION or SimpleAnnotation or any
implementation
> of Annotation).
>
> This is a good example of how the static XXXTools methods are convenient
> but don't expose the full flexibility of the biojava API. If you want to
> see how some of that flexibility can be used it can be good to look at
the
> code behind the static methods. This reveals how the full API is used
and
> shows areas where you can borrow that code and customize it to your
needs.
> Eg it would be v simple to write a method for you program that borrows
> code from DNATools.createDNASequence() and takes an Annotation as an
> argument.
>
> Finally, the Annotation and Feature examples on the BJIA page
> (http://www.biojava.org/docs/bj_in_anger/) may be useful. This link also
> shows how to make a program that views the Annotation and Feature
> structure in a JTree
> (http://www.biojava.org/docs/bj_in_anger/treeView.htm)
>
> - Mark
>
>
>
>
>
>
>
> Michael Griffith <mg at base-pair.com>
> Sent by: biojava-dev-bounces at portal.open-bio.org
> 09/02/2004 06:57 AM
>
>
> To: <biojava-dev at biojava.org>
> cc:
> Subject: [Biojava-dev] Please help with Features and
Annotations?
>
>
> Yikes! Is there a good explanation somewhere on Features and
annotations?
> I
> am creating a new Sequence using the DNATools.createDNASequence()
method,
> but I want to set some features on it like the GI # and the DEFINITION.
I
> can't seem to figure out how this works.
>
> Any help would be greatly appreciated!
>
> MG
>
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at biojava.org
> http://biojava.org/mailman/listinfo/biojava-dev
>
>
>
>
_______________________________________________
biojava-dev mailing list
biojava-dev at biojava.org
http://biojava.org/mailman/listinfo/biojava-dev
More information about the biojava-dev
mailing list