[BioSQL-l] [Fwd: Re: Increasing value of rank in table seqfeature]

Gabrielle Doan gabrielle_doan at gmx.net
Mon Sep 1 13:38:28 UTC 2008


Hi Hilmar,
you are right. I'm using BioJava to insert the features into my 
database. I'm suprised at the rank because in my source code I always 
set the rank to zero for each new feature I want to add to the human 
chromosome 1 and 2. But in my database the rank is always incremented.

private void makeAFeature(String id, String chr, int startpos, int 
endpos, Strand strand, float score, String gene)
             throws ChangeVetoException, IllegalSymbolException {
         RichSequence rs = chromosomes.get(chr);
         if (rs == null) {
             rs = db.SearchForSequence(chr);
             chromosomes.put(chr, rs);
         }
         RichFeature feat = RichFeature.Tools.makeEmptyFeature();
         // System.out.println("setParent " + rs.getName());
         feat.setName(id);
         RichLocation rl = new SimpleRichLocation(new 
SimplePosition(startpos),new SimplePosition(endpos), 0, strand);
         feat.setLocation(rl);
         try { 
feat.setTypeTerm(RichObjectFactory.getDefaultOntology()
                 .getOrCreateTerm("miRNA"));
             feat.setType(feat.getTypeTerm().getName());
         } catch (InvalidTermException e) {
             // TODO Auto-generated catch block
             e.printStackTrace();
         }
         feat.getAnnotation().setProperty("score", Float.valueOf(score));
         feat.getAnnotation().setProperty("gene", gene);
         feat.setParent(rs);
         rs.getFeatureSet().add(feat);
     }

It would be very nice if you could help me or give me any hint.
Thanks a lot.
cheers,
Gabrielle


-------- Original-Nachricht --------
Betreff: Re: [BioSQL-l] Increasing value of rank in table seqfeature
Datum: Fri, 29 Aug 2008 10:45:26 -0400
Von: Hilmar Lapp <hlapp at gmx.net>
An: Gabrielle Doan <gabrielle_doan at gmx.net>
CC: biosql-l at lists.open-bio.org
Referenzen: <48B7ED4A.5000008 at gmx.net>

Hi Gabrielle,

smallint can take values up to 65535 if unsigned. I can see that this
can become a limitation if the bioentry to which the features belong
is a whole chromosome.

Note that the uniqueness constraint is not on bioentry (sequence) and
rank. Instead, it is on the combination of bioentry (sequence), type
term, source term, and rank. I.e., at present, with the smallint
constraint, you can't have more than 65535 features of the same type
and from the same source for a particular sequence.

It's possible that the software you are using (Biojava?) increments
the rank for every single feature, rather than resetting for each new
combination of type and source. Is that what you are seeing?

	-hilmar

On Aug 29, 2008, at 8:36 AM, Gabrielle Doan wrote:

> Hi all,
> I have a BioSQL database which contains several chromosomes and  
> features. And now I would like to insert chromosome 2 with some  
> miRNA as a new feature. I meet the problem that in the table  
> seqfeature the entry rank just can store smallint(5) unsigned  
> values. As fare as I know each rank has to be unique. If you want to  
> store many information this value will be excess quickly. Isn't it  
> better to increase this value?
>
> It would be very nice if someone could comment my suggestion. Thanks  
> a lot.
>
> Cheers,
> Gabrielle
> _______________________________________________
> BioSQL-l mailing list
> BioSQL-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biosql-l

-- 
===========================================================
: Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
===========================================================






More information about the BioSQL-l mailing list